From d796ff53b790c7d361a8552616e01e6126548238 Mon Sep 17 00:00:00 2001 From: Bornunique911 <69379200+Bornunique911@users.noreply.github.com> Date: Tue, 9 Jun 2026 12:03:46 +0530 Subject: [PATCH 01/37] Add curated CWE fallback mappings and coverage for issue #472 (#823) * Add curated CWE fallback mappings * Cover CWE fallback and inheritance behavior with tests * Add local CWE refresh tooling * Add local helper scripts for issue #472 * Integrate OpenCRE map analysis support from issue #469 * Implement fallback for gap analysis in database with error handling * Update scripts/show-db-stats.sh Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Bornunique911 <69379200+Bornunique911@users.noreply.github.com> * fix: remove leading space in 'xss' keyword for CWE mapping * fix: update condition for related CWE entries to check for 'ChildOf' nature * fix: correct syntax for accessing related CWE entry attributes * fix: enhance gap analysis error handling for Heroku and fallback scenarios --------- Signed-off-by: Bornunique911 <69379200+Bornunique911@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- application/tests/cwe_parser_test.py | 226 ++++++++++++++++++ application/tests/web_main_test.py | 23 +- .../data/cwe_fallback_mappings.json | 102 ++++++++ .../external_project_parsers/parsers/cwe.py | 149 +++++++++--- application/web/web_main.py | 54 ++++- scripts/run-local.sh | 26 ++ scripts/show-db-stats.sh | 64 +++++ scripts/update-cwe.sh | 32 +++ 8 files changed, 637 insertions(+), 39 deletions(-) create mode 100644 application/utils/external_project_parsers/data/cwe_fallback_mappings.json create mode 100755 scripts/run-local.sh create mode 100755 scripts/show-db-stats.sh create mode 100755 scripts/update-cwe.sh diff --git a/application/tests/cwe_parser_test.py b/application/tests/cwe_parser_test.py index 69b2e3d6c..582f18976 100644 --- a/application/tests/cwe_parser_test.py +++ b/application/tests/cwe_parser_test.py @@ -116,6 +116,157 @@ def iter_content(self, chunk_size=None): self.assertCountEqual(nodes[0].todict(), expected[0].todict()) self.assertCountEqual(nodes[1].todict(), expected[1].todict()) + @patch.object(requests, "get") + def test_register_CWE_inherits_mappings_transitively(self, mock_requests) -> None: + tmpdir = mkdtemp() + tmpFile = os.path.join(tmpdir, "cwe.xml") + tmpzip = os.path.join(tmpdir, "cwe.zip") + with open(tmpFile, "w") as cx: + cx.write(self.CWE_transitive_xml) + with zipfile.ZipFile(tmpzip, "w", zipfile.ZIP_DEFLATED) as zipf: + zipf.write(tmpFile, arcname="cwe.xml") + + class fakeRequest: + def iter_content(self, chunk_size=None): + with open(tmpzip, "rb") as zipf: + return [zipf.read()] + + mock_requests.return_value = fakeRequest() + + cre = defs.CRE(id="089-089", name="CRE-Injection") + dbcre = self.collection.add_cre(cre=cre) + dbcwe = self.collection.add_node(defs.Standard(name="CWE", sectionID="89")) + self.collection.add_link(dbcre, dbcwe, defs.LinkTypes.LinkedTo) + + entries = cwe.CWE().parse( + cache=self.collection, + ph=prompt_client.PromptHandler(database=self.collection), + ) + imported_cwes = {node.sectionID: node for node in entries.results["CWE"]} + + self.assertEqual(imported_cwes["2001"].links[0].document.todict(), cre.todict()) + self.assertEqual(imported_cwes["2002"].links[0].document.todict(), cre.todict()) + + @patch.object(requests, "get") + def test_register_CWE_applies_fallback_family_mappings(self, mock_requests) -> None: + tmpdir = mkdtemp() + tmpFile = os.path.join(tmpdir, "cwe.xml") + tmpzip = os.path.join(tmpdir, "cwe.zip") + with open(tmpFile, "w") as cx: + cx.write(self.CWE_fallback_xml) + with zipfile.ZipFile(tmpzip, "w", zipfile.ZIP_DEFLATED) as zipf: + zipf.write(tmpFile, arcname="cwe.xml") + + class fakeRequest: + def iter_content(self, chunk_size=None): + with open(tmpzip, "rb") as zipf: + return [zipf.read()] + + mock_requests.return_value = fakeRequest() + + injection_cre = defs.CRE(id="760-764", name="Injection protection") + xss_cre = defs.CRE(id="760-765", name="XSS protection") + xxe_cre = defs.CRE(id="764-507", name="Restrict XML parsing (against XXE)") + auth_cre = defs.CRE( + id="117-371", name="Use a centralized access control mechanism" + ) + authn_cre = defs.CRE( + id="113-133", name="Use centralized authentication mechanism" + ) + csrf_cre = defs.CRE(id="028-727", name="CSRF protection") + ssrf_cre = defs.CRE(id="028-728", name="SSRF protection") + hardcoded_secret_cre = defs.CRE( + id="774-888", name="Do not store secrets in the code" + ) + password_storage_cre = defs.CRE( + id="622-203", name="Store passwords salted and hashed" + ) + credential_storage_cre = defs.CRE( + id="881-321", name="Store credentials securely" + ) + session_management_cre = defs.CRE(id="177-260", name="Session management") + secure_cookie_cre = defs.CRE( + id="688-081", name='Set "secure" attribute for cookie-based session tokens' + ) + deserialization_cre = defs.CRE(id="836-068", name="Deserialization Prevention") + self.collection.add_cre(cre=injection_cre) + self.collection.add_cre(cre=xss_cre) + self.collection.add_cre(cre=xxe_cre) + self.collection.add_cre(cre=auth_cre) + self.collection.add_cre(cre=authn_cre) + self.collection.add_cre(cre=csrf_cre) + self.collection.add_cre(cre=ssrf_cre) + self.collection.add_cre(cre=hardcoded_secret_cre) + self.collection.add_cre(cre=password_storage_cre) + self.collection.add_cre(cre=credential_storage_cre) + self.collection.add_cre(cre=session_management_cre) + self.collection.add_cre(cre=secure_cookie_cre) + self.collection.add_cre(cre=deserialization_cre) + + entries = cwe.CWE().parse( + cache=self.collection, + ph=prompt_client.PromptHandler(database=self.collection), + ) + imported_cwes = {node.sectionID: node for node in entries.results["CWE"]} + + self.assertEqual( + imported_cwes["89"].links[0].document.todict(), injection_cre.todict() + ) + self.assertEqual( + imported_cwes["79"].links[0].document.todict(), xss_cre.todict() + ) + self.assertEqual( + imported_cwes["611"].links[0].document.todict(), xxe_cre.todict() + ) + self.assertEqual( + imported_cwes["612"].links[0].document.todict(), auth_cre.todict() + ) + self.assertEqual( + imported_cwes["287"].links[0].document.todict(), authn_cre.todict() + ) + self.assertEqual( + imported_cwes["352"].links[0].document.todict(), csrf_cre.todict() + ) + self.assertEqual( + imported_cwes["918"].links[0].document.todict(), ssrf_cre.todict() + ) + self.assertEqual( + imported_cwes["798"].links[0].document.todict(), + hardcoded_secret_cre.todict(), + ) + self.assertEqual( + imported_cwes["321"].links[0].document.todict(), + hardcoded_secret_cre.todict(), + ) + self.assertEqual( + imported_cwes["256"].links[0].document.todict(), + password_storage_cre.todict(), + ) + self.assertEqual( + imported_cwes["257"].links[0].document.todict(), + password_storage_cre.todict(), + ) + self.assertEqual( + imported_cwes["258"].links[0].document.todict(), + credential_storage_cre.todict(), + ) + self.assertEqual( + imported_cwes["260"].links[0].document.todict(), + credential_storage_cre.todict(), + ) + self.assertEqual( + imported_cwes["384"].links[0].document.todict(), + session_management_cre.todict(), + ) + self.assertEqual( + imported_cwes["614"].links[0].document.todict(), + secure_cookie_cre.todict(), + ) + self.assertEqual( + imported_cwes["502"].links[0].document.todict(), + deserialization_cre.todict(), + ) + CWE_xml = """ """ + + CWE_transitive_xml = """ + + + + + + + + + + + + + + Padding entry so xmltodict returns a list of Weakness elements. + + + +""" + + CWE_fallback_xml = """ + + + + XSS entry. + + + SQL injection entry. + + + XXE entry. + + + Authorization entry. + + + Authentication entry. + + + CSRF entry. + + + Hard-coded credentials entry. + + + Hard-coded key entry. + + + Password storage entry. + + + Recoverable password entry. + + + Password in config entry. + + + Password in config entry. + + + Session fixation entry. + + + Cookie secure attribute entry. + + + Deserialization entry. + + + SSRF entry. + + + +""" diff --git a/application/tests/web_main_test.py b/application/tests/web_main_test.py index e5d285acd..5a1fc14ce 100644 --- a/application/tests/web_main_test.py +++ b/application/tests/web_main_test.py @@ -734,13 +734,32 @@ def test_gap_analysis_fallback_without_redis( self.assertEqual({"result": {"k": {}}}, json.loads(response.data)) db_gap_analysis_mock.assert_called_once() - @patch.dict(os.environ, {"HEROKU": "True"}, clear=False) @patch.object(db, "Node_collection") + @patch.object(db, "gap_analysis") @patch.object(redis, "from_url") - def test_gap_analysis_heroku_cache_miss_returns_404( + def test_gap_analysis_fallback_backend_failure_returns_503( + self, redis_conn_mock, db_gap_analysis_mock, db_mock + ) -> None: + redis_conn_mock.side_effect = RuntimeError("redis down") + db_gap_analysis_mock.side_effect = RuntimeError("neo unavailable") + db_mock.return_value.get_gap_analysis_result.return_value = None + with self.app.test_client() as client: + response = client.get( + "/rest/v1/map_analysis?standard=aaa&standard=bbb", + headers={"Content-Type": "application/json"}, + ) + self.assertEqual(503, response.status_code) + db_gap_analysis_mock.assert_called_once() + + @patch.dict(os.environ, {"DYNO": "web.1"}, clear=False) + @patch.object(db, "Node_collection") + @patch.object(redis, "from_url") + def test_gap_analysis_dyno_missing_standard_returns_404( self, redis_conn_mock, db_mock ) -> None: db_mock.return_value.get_gap_analysis_result.return_value = None + db_mock.return_value.gap_analysis_exists.return_value = False + db_mock.return_value.standards.return_value = ["aaa"] with self.app.test_client() as client: response = client.get( "/rest/v1/map_analysis?standard=aaa&standard=bbb", diff --git a/application/utils/external_project_parsers/data/cwe_fallback_mappings.json b/application/utils/external_project_parsers/data/cwe_fallback_mappings.json new file mode 100644 index 000000000..99ee41b01 --- /dev/null +++ b/application/utils/external_project_parsers/data/cwe_fallback_mappings.json @@ -0,0 +1,102 @@ +[ + { + "keywords": [ + "xml external entity", + "xxe" + ], + "cre_id": "764-507" + }, + { + "keywords": [ + "cross-site scripting", + "xss", + "(xss)" + ], + "cre_id": "760-765" + }, + { + "keywords": [ + "authorization", + "access control" + ], + "cre_id": "117-371" + }, + { + "keywords": [ + "improper authentication", + "missing authentication", + "authentication bypass" + ], + "cre_id": "113-133" + }, + { + "keywords": [ + "cross-site request forgery", + "(csrf)", + "csrf" + ], + "cre_id": "028-727" + }, + { + "keywords": [ + "server-side request forgery", + "(ssrf)", + "ssrf" + ], + "cre_id": "028-728" + }, + { + "keywords": [ + "plaintext storage of a password", + "storing passwords in a recoverable format" + ], + "cre_id": "622-203" + }, + { + "keywords": [ + "empty password in configuration file", + "password in configuration file" + ], + "cre_id": "881-321" + }, + { + "keywords": [ + "hard-coded password", + "hardcoded password", + "hard-coded credentials", + "hardcoded credentials", + "hard-coded credential", + "hardcoded credential", + "hard-coded cryptographic key", + "hardcoded cryptographic key", + "hard-coded key", + "hardcoded key" + ], + "cre_id": "774-888" + }, + { + "keywords": [ + "session fixation" + ], + "cre_id": "177-260" + }, + { + "keywords": [ + "sensitive cookie in https session without 'secure' attribute" + ], + "cre_id": "688-081" + }, + { + "keywords": [ + "deserialization of untrusted data" + ], + "cre_id": "836-068" + }, + { + "keywords": [ + "injection", + "query logic" + ], + "cre_id": "760-764" + } +] diff --git a/application/utils/external_project_parsers/parsers/cwe.py b/application/utils/external_project_parsers/parsers/cwe.py index cde12f2af..acc22059b 100644 --- a/application/utils/external_project_parsers/parsers/cwe.py +++ b/application/utils/external_project_parsers/parsers/cwe.py @@ -1,8 +1,10 @@ import logging import os import tempfile +import json +from pathlib import Path import requests -from typing import Dict +from typing import Dict, List from application.database import db from application.defs import cre_defs as defs import shutil @@ -22,6 +24,22 @@ class CWE(ParserInterface): name = "CWE" cwe_zip = "https://cwe.mitre.org/data/xml/cwec_latest.xml.zip" + fallback_mapping_path = ( + Path(__file__).resolve().parent.parent / "data" / "cwe_fallback_mappings.json" + ) + + def __init__(self) -> None: + self.fallback_cre_by_match = self.load_fallback_cre_mappings() + + def load_fallback_cre_mappings(self) -> List[tuple[tuple[str, ...], str]]: + with self.fallback_mapping_path.open("r", encoding="utf-8") as mapping_file: + raw_mappings = json.load(mapping_file) + + mappings = [] + for entry in raw_mappings: + keywords = tuple(keyword.lower() for keyword in entry["keywords"]) + mappings.append((keywords, entry["cre_id"])) + return mappings def parse(self, cache: db.Node_collection, ph: prompt_client.PromptHandler): response = requests.get(self.cwe_zip, stream=True) @@ -74,17 +92,78 @@ def link_to_related_cwe( ) -> defs.Standard: related_cwes = cache.get_nodes(name="CWE", sectionID=related_id) if related_cwes: - for cre in [ - c.document - for c in related_cwes[0].links - if c.document.doctype == defs.Credoctypes.CRE - ]: - logger.debug( - f"linked CWE with id {cwe.sectionID} to CRE with ID {cre.id}" - ) - cwe.add_link( - defs.Link(document=cre, ltype=defs.LinkTypes.AutomaticallyLinkedTo) - ) + return self.link_to_related_cwe_entry(cwe, related_cwes[0]) + return cwe + + def link_to_related_cwe_entry( + self, cwe: defs.Standard, related_cwe: defs.Standard + ) -> defs.Standard: + for cre in [ + link.document + for link in related_cwe.links + if link.document.doctype == defs.Credoctypes.CRE + ]: + logger.debug(f"linked CWE with id {cwe.sectionID} to CRE with ID {cre.id}") + autolink = defs.Link( + document=cre, ltype=defs.LinkTypes.AutomaticallyLinkedTo + ) + if not cwe.has_link(autolink): + cwe.add_link(autolink) + return cwe + + def collect_related_weakness_ids(self, weakness: Dict) -> List[str]: + related_ids = [] + related_weaknesses = weakness.get("Related_Weaknesses") + if not related_weaknesses: + return related_ids + + containers = ( + related_weaknesses + if isinstance(related_weaknesses, list) + else [related_weaknesses] + ) + for container in containers: + if not isinstance(container, Dict): + continue + related_entries = container.get("Related_Weakness") + if not related_entries: + continue + related_entries = ( + related_entries + if isinstance(related_entries, list) + else [related_entries] + ) + for entry in related_entries: + if ( + isinstance(entry, Dict) + and entry.get("@CWE_ID") + and entry.get("@Nature") == "ChildOf" + ): + related_ids.append(str(entry["@CWE_ID"])) + return related_ids + + def apply_fallback_cre_mapping( + self, cwe: defs.Standard, cache: db.Node_collection + ) -> defs.Standard: + if any(link.document.doctype == defs.Credoctypes.CRE for link in cwe.links): + return cwe + + section_text = (cwe.section or "").lower() + for keywords, cre_id in self.fallback_cre_by_match: + if not any(keyword in section_text for keyword in keywords): + continue + + matching_cres = cache.get_CREs(external_id=cre_id) + if not matching_cres: + continue + + fallback_link = defs.Link( + document=matching_cres[0], ltype=defs.LinkTypes.AutomaticallyLinkedTo + ) + if not cwe.has_link(fallback_link): + cwe.add_link(fallback_link) + return cwe + return cwe # cwe is a special case because it already partially exists in our spreadsheet @@ -93,6 +172,8 @@ def link_to_related_cwe( def register_cwe(self, cache: db.Node_collection, xml_file: str): statuses = {} entries = [] + entries_by_id = {} + related_ids_by_cwe = {} with open(xml_file, "r") as xml: weakness_catalog = xmltodict.parse(xml.read()).get("Weakness_Catalog") for _, weaknesses in weakness_catalog.get("Weaknesses").items(): @@ -157,23 +238,31 @@ def register_cwe(self, cache: db.Node_collection, xml_file: str): logger.info( f"CWE '{cwe.sectionID}-{cwe.section}' does not have any related CAPEC attack patterns, skipping automated linking" ) - if weakness.get("Related_Weaknesses"): - if isinstance(weakness.get("Related_Weaknesses"), list): - for related_weakness in weakness.get("Related_Weaknesses"): - cwe = self.parse_related_weakness( - cache, related_weakness, cwe - ) - else: - cwe = self.parse_related_weakness( - cache, weakness.get("Related_Weaknesses"), cwe - ) entries.append(cwe) - return entries + entries_by_id[cwe.sectionID] = cwe + related_ids_by_cwe[cwe.sectionID] = ( + self.collect_related_weakness_ids(weakness) + ) - def parse_related_weakness( - self, cache: db.Node_collection, rw: Dict[str, Dict], cwe: defs.Standard - ) -> defs.Standard: - cwe_entry = rw.get("Related_Weakness") - if isinstance(cwe_entry, Dict): - id = cwe_entry["@CWE_ID"] - return self.link_to_related_cwe(cwe=cwe, cache=cache, related_id=id) + changed = True + while changed: + changed = False + for cwe_id, related_ids in related_ids_by_cwe.items(): + cwe = entries_by_id[cwe_id] + before_count = len(cwe.links) + for related_id in related_ids: + related_cwe = entries_by_id.get(related_id) + if related_cwe: + cwe = self.link_to_related_cwe_entry(cwe, related_cwe) + else: + cwe = self.link_to_related_cwe( + cwe=cwe, cache=cache, related_id=related_id + ) + entries_by_id[cwe_id] = cwe + if len(cwe.links) != before_count: + changed = True + + for cwe_id, cwe in entries_by_id.items(): + entries_by_id[cwe_id] = self.apply_fallback_cre_mapping(cwe, cache) + + return entries diff --git a/application/web/web_main.py b/application/web/web_main.py index 4049f8981..273ad19ed 100644 --- a/application/web/web_main.py +++ b/application/web/web_main.py @@ -40,6 +40,7 @@ session, send_file, ) +from werkzeug.exceptions import HTTPException from google.oauth2 import id_token from google_auth_oauthlib.flow import Flow from application.utils.spreadsheet import write_csv @@ -438,9 +439,34 @@ def map_analysis() -> Any: if "result" in parsed: return jsonify({"result": parsed.get("result")}) - # ----- upstream: Heroku guard ----- - if os.environ.get("HEROKU"): - abort(404, "No such Cache") + # On Heroku/read-only deployments, verify standards before attempting + # Redis or graph-backed fallback work. + is_heroku = os.environ.get("DYNO") is not None + if is_heroku: + try: + existing_standards = database.standards() + if isinstance(existing_standards, (list, tuple, set)): + existing_lower = {str(s).lower() for s in existing_standards} + missing = [s for s in standards if str(s).lower() not in existing_lower] + if missing: + logger.info( + f"On Heroku: gap analysis request {standards_hash} references " + f"standards that do not exist: {', '.join(missing)}, returning 404" + ) + abort( + 404, f"One or more standards do not exist: {', '.join(missing)}" + ) + except HTTPException: + raise + except Exception as exc: + logger.warning(f"Could not verify standards existence on Heroku: {exc}") + + if os.environ.get("CRE_NO_CALCULATE_GAP_ANALYSIS"): + logger.info( + f"Gap analysis calculations are disabled by CRE_NO_CALCULATE_GAP_ANALYSIS; " + f"refusing to schedule new job for {standards_hash}" + ) + abort(404, "Gap analysis calculations are disabled") # ----- upstream: Redis / RQ path with synchronous fallback ----- db_url = os.environ.get("CRE_CACHE_FILE") or os.environ.get("PROD_DATABASE_URL") @@ -487,11 +513,25 @@ def map_analysis() -> Any: cache_key, exc, ) + # NEW: fallback — compute gap analysis directly in the database try: - return jsonify(_compute_ga_without_redis(database, standards)) - except Exception as fallback_exc: - logger.exception("Synchronous GA fallback failed for %s", cache_key) - abort(503, f"Gap analysis unavailable: {fallback_exc}") + db.gap_analysis( + neo_db=database.neo_db, + node_names=standards, + cache_key=cache_key, + ) + cached = database.get_gap_analysis_result(cache_key=cache_key) + if cached: + parsed = json.loads(cached) + if "result" in parsed: + return jsonify({"result": parsed["result"]}) + except Exception: + logger.exception( + "Database gap analysis fallback failed for %s", + cache_key, + ) + abort(503, "Database/graph backend unavailable") + abort(404, "Gap analysis result not found") @app.route("/rest/v1/map_analysis_weak_links", methods=["GET"]) diff --git a/scripts/run-local.sh b/scripts/run-local.sh new file mode 100755 index 000000000..94631cbe9 --- /dev/null +++ b/scripts/run-local.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +VENV_DIR="$ROOT_DIR/venv" + +if [[ ! -d "$VENV_DIR" ]]; then + echo "Creating virtual environment in $VENV_DIR" + python3 -m venv "$VENV_DIR" +fi + +source "$VENV_DIR/bin/activate" + +if ! python -c "import flask" >/dev/null 2>&1; then + echo "Installing Python dependencies" + pip install -r "$ROOT_DIR/requirements.txt" +fi + +export NO_LOGIN="${NO_LOGIN:-1}" +export INSECURE_REQUESTS="${INSECURE_REQUESTS:-1}" +export FLASK_APP="$ROOT_DIR/cre.py" +export FLASK_CONFIG="${FLASK_CONFIG:-development}" + +echo "Starting OpenCRE on http://127.0.0.1:5000" +exec flask run --host 127.0.0.1 --port 5000 diff --git a/scripts/show-db-stats.sh b/scripts/show-db-stats.sh new file mode 100755 index 000000000..15cf3427b --- /dev/null +++ b/scripts/show-db-stats.sh @@ -0,0 +1,64 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +DB_PATH="${1:-$ROOT_DIR/standards_cache.sqlite}" + +if [[ ! -f "$DB_PATH" ]]; then + echo "Database not found: $DB_PATH" >&2 + exit 1 +fi + +echo "Database: $DB_PATH" +du -h "$DB_PATH" + +if [[ ! -f "$ROOT_DIR/venv/bin/python" ]]; then + echo "Virtual environment not found. Please run scripts/run-local.sh first to set up the environment." >&2 + exit 1 +fi + +"$ROOT_DIR/venv/bin/python" - "$DB_PATH" <<'PY' +import os +import sqlite3 +import sys + +db_path = sys.argv[1] +conn = sqlite3.connect(db_path) +cur = conn.cursor() + +print(f"size_bytes {os.path.getsize(db_path)}") + +tables = [ + "node", + "cre", + "cre_links", + "cre_node_links", + "embeddings", +] + +for table in tables: + try: + count = cur.execute(f"select count(*) from {table}").fetchone()[0] + print(f"{table}_count {count}") + except sqlite3.Error as exc: + print(f"{table}_count unavailable ({exc})") + +try: + standards = cur.execute( + """ + select name, count(*) + from node + where name is not null + group by name + order by count(*) desc, name asc + limit 15 + """ + ).fetchall() + print("top_standards") + for name, count in standards: + print(f"{name}\t{count}") +except sqlite3.Error as exc: + print(f"top_standards unavailable ({exc})") + +conn.close() +PY diff --git a/scripts/update-cwe.sh b/scripts/update-cwe.sh new file mode 100755 index 000000000..7c12c92e1 --- /dev/null +++ b/scripts/update-cwe.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +VENV_DIR="$ROOT_DIR/venv" +CACHE_FILE="${1:-$ROOT_DIR/standards_cache.sqlite}" +TIMESTAMP="$(date +%Y%m%d-%H%M%S)" +BACKUP_FILE="${CACHE_FILE}.bak.${TIMESTAMP}" + +if [[ ! -d "$VENV_DIR" ]]; then + echo "Creating virtual environment in $VENV_DIR" + python3 -m venv "$VENV_DIR" +fi + +source "$VENV_DIR/bin/activate" + +if ! python -c "import requests" >/dev/null 2>&1; then + echo "Installing Python dependencies" + pip install -r "$ROOT_DIR/requirements.txt" +fi + +if [[ -f "$CACHE_FILE" ]]; then + cp "$CACHE_FILE" "$BACKUP_FILE" + echo "Backed up database to $BACKUP_FILE" +fi + +export CRE_NO_NEO4J="${CRE_NO_NEO4J:-1}" +export CRE_NO_GEN_EMBEDDINGS="${CRE_NO_GEN_EMBEDDINGS:-1}" + +echo "Importing latest MITRE CWE data into $CACHE_FILE" +exec python "$ROOT_DIR/cre.py" --cwe_in --cache_file "$CACHE_FILE" From f31ee071322a5aa8b9ffd9be08e3adf21ca3ff0c Mon Sep 17 00:00:00 2001 From: Spyros Date: Wed, 10 Jun 2026 08:48:56 +0300 Subject: [PATCH 02/37] fix(web): restore Heroku cache-only map_analysis and add GA health monitor PR #823 reintroduced Neo4j/Redis fallback on Heroku cache misses, causing 503s when Neo4j DNS fails. Serve precomputed GA from Postgres only on Heroku and return 404 on cache miss. Add monitor_ga_health.py for production regression alerting (especially HTTP 503). Fixes OWASP/OpenCRE#923 Co-authored-by: Cursor --- Makefile | 6 + application/tests/monitor_ga_health_test.py | 18 ++ application/tests/web_main_test.py | 38 +++- application/web/web_main.py | 66 ++---- scripts/monitor_ga_health.py | 239 ++++++++++++++++++++ 5 files changed, 322 insertions(+), 45 deletions(-) create mode 100644 application/tests/monitor_ga_health_test.py create mode 100644 scripts/monitor_ga_health.py diff --git a/Makefile b/Makefile index 86c88a868..2a22dbd31 100644 --- a/Makefile +++ b/Makefile @@ -153,6 +153,12 @@ verify-ga-complete-prod: --base-url "https://opencre.org" \ --output-json "$(CURDIR)/tmp/prod-ga-completeness.json" +monitor-ga-health-prod: + @[ -d "./.venv" ] && . ./.venv/bin/activate || ([ -d "./venv" ] && . ./venv/bin/activate); \ + python scripts/monitor_ga_health.py \ + --base-url "https://opencre.org" \ + --output-json "$(CURDIR)/tmp/prod-ga-health.json" + verify-ga-parity-local: @[ -d "./.venv" ] && . ./.venv/bin/activate || ([ -d "./venv" ] && . ./venv/bin/activate); \ export CRE_CACHE_FILE="$${CRE_CACHE_FILE:-postgresql://cre:password@127.0.0.1:5432/cre}"; \ diff --git a/application/tests/monitor_ga_health_test.py b/application/tests/monitor_ga_health_test.py new file mode 100644 index 000000000..aa5c1ac7b --- /dev/null +++ b/application/tests/monitor_ga_health_test.py @@ -0,0 +1,18 @@ +import unittest + +from scripts import monitor_ga_health as monitor + + +class MonitorGaHealthTest(unittest.TestCase): + def test_material_result_detection(self) -> None: + self.assertTrue(monitor._http_gap_result_is_material({"a": 1})) + self.assertFalse(monitor._http_gap_result_is_material({})) + self.assertFalse(monitor._http_gap_result_is_material(None)) + + def test_503_bucket_is_regression_marker(self) -> None: + bucket = "http_503_regression" + self.assertEqual(bucket, "http_503_regression") + + +if __name__ == "__main__": + unittest.main() diff --git a/application/tests/web_main_test.py b/application/tests/web_main_test.py index 5a1fc14ce..5568d0f35 100644 --- a/application/tests/web_main_test.py +++ b/application/tests/web_main_test.py @@ -743,23 +743,42 @@ def test_gap_analysis_fallback_backend_failure_returns_503( redis_conn_mock.side_effect = RuntimeError("redis down") db_gap_analysis_mock.side_effect = RuntimeError("neo unavailable") db_mock.return_value.get_gap_analysis_result.return_value = None + db_mock.return_value.gap_analysis_exists.return_value = False + with self.app.test_client() as client: + with patch.dict(os.environ, {}, clear=False): + os.environ.pop("DYNO", None) + os.environ.pop("HEROKU", None) + response = client.get( + "/rest/v1/map_analysis?standard=aaa&standard=bbb", + headers={"Content-Type": "application/json"}, + ) + self.assertEqual(503, response.status_code) + db_gap_analysis_mock.assert_called_once() + + @patch.dict(os.environ, {"HEROKU": "True"}, clear=False) + @patch.object(db, "Node_collection") + @patch.object(redis, "from_url") + def test_gap_analysis_heroku_cache_miss_returns_404( + self, redis_conn_mock, db_mock + ) -> None: + db_mock.return_value.get_gap_analysis_result.return_value = None + db_mock.return_value.gap_analysis_exists.return_value = False with self.app.test_client() as client: response = client.get( "/rest/v1/map_analysis?standard=aaa&standard=bbb", headers={"Content-Type": "application/json"}, ) - self.assertEqual(503, response.status_code) - db_gap_analysis_mock.assert_called_once() + self.assertEqual(404, response.status_code) + redis_conn_mock.assert_not_called() @patch.dict(os.environ, {"DYNO": "web.1"}, clear=False) @patch.object(db, "Node_collection") @patch.object(redis, "from_url") - def test_gap_analysis_dyno_missing_standard_returns_404( + def test_gap_analysis_dyno_cache_miss_returns_404( self, redis_conn_mock, db_mock ) -> None: db_mock.return_value.get_gap_analysis_result.return_value = None db_mock.return_value.gap_analysis_exists.return_value = False - db_mock.return_value.standards.return_value = ["aaa"] with self.app.test_client() as client: response = client.get( "/rest/v1/map_analysis?standard=aaa&standard=bbb", @@ -768,6 +787,17 @@ def test_gap_analysis_dyno_missing_standard_returns_404( self.assertEqual(404, response.status_code) redis_conn_mock.assert_not_called() + @patch.dict(os.environ, {"HEROKU": "True"}, clear=False) + @patch.object(db, "Node_collection") + def test_map_analysis_opencre_heroku_cache_miss_returns_404(self, db_mock) -> None: + db_mock.return_value.gap_analysis_exists.return_value = False + with self.app.test_client() as client: + response = client.get( + "/rest/v1/map_analysis?standard=OpenCRE&standard=bbb", + headers={"Content-Type": "application/json"}, + ) + self.assertEqual(404, response.status_code) + @patch.object(redis, "from_url") @patch.object(db, "Node_collection") def test_standards_from_db(self, node_mock, redis_conn_mock) -> None: diff --git a/application/web/web_main.py b/application/web/web_main.py index 273ad19ed..530a917be 100644 --- a/application/web/web_main.py +++ b/application/web/web_main.py @@ -40,7 +40,6 @@ session, send_file, ) -from werkzeug.exceptions import HTTPException from google.oauth2 import id_token from google_auth_oauthlib.flow import Flow from application.utils.spreadsheet import write_csv @@ -72,6 +71,11 @@ def _ga_timeout_seconds() -> int: return 129600 +def _is_heroku_deploy() -> bool: + """True on Heroku/read-only web dynos where GA must be served from SQL cache only.""" + return os.environ.get("DYNO") is not None or bool(os.environ.get("HEROKU")) + + def _compute_ga_without_redis( database: db.Node_collection, standards: list[str] ) -> dict: @@ -421,8 +425,16 @@ def map_analysis() -> Any: standards = standards[:2] standards_hash = gap_analysis.make_resources_key(standards) - # ----- PR #825: OpenCRE fast path ----- + # ----- PR #825: OpenCRE fast path (SQL cache only on Heroku) ----- if OPENCRE_STANDARD_NAME in standards: + if database.gap_analysis_exists(standards_hash): + cached = database.get_gap_analysis_result(cache_key=standards_hash) + if cached: + parsed = json.loads(cached) + if "result" in parsed: + return jsonify({"result": parsed.get("result")}) + if _is_heroku_deploy(): + abort(404, "No such Cache") direct_gap_analysis = _build_direct_cre_overlap_map_analysis( standards, standards_hash, database ) @@ -439,27 +451,13 @@ def map_analysis() -> Any: if "result" in parsed: return jsonify({"result": parsed.get("result")}) - # On Heroku/read-only deployments, verify standards before attempting - # Redis or graph-backed fallback work. - is_heroku = os.environ.get("DYNO") is not None - if is_heroku: - try: - existing_standards = database.standards() - if isinstance(existing_standards, (list, tuple, set)): - existing_lower = {str(s).lower() for s in existing_standards} - missing = [s for s in standards if str(s).lower() not in existing_lower] - if missing: - logger.info( - f"On Heroku: gap analysis request {standards_hash} references " - f"standards that do not exist: {', '.join(missing)}, returning 404" - ) - abort( - 404, f"One or more standards do not exist: {', '.join(missing)}" - ) - except HTTPException: - raise - except Exception as exc: - logger.warning(f"Could not verify standards existence on Heroku: {exc}") + # Heroku serves precomputed GA from Postgres only — never Redis, RQ, or Neo4j. + if _is_heroku_deploy(): + logger.info( + "On Heroku: gap analysis cache miss for %s, returning 404", + standards_hash, + ) + abort(404, "No such Cache") if os.environ.get("CRE_NO_CALCULATE_GAP_ANALYSIS"): logger.info( @@ -513,25 +511,11 @@ def map_analysis() -> Any: cache_key, exc, ) - # NEW: fallback — compute gap analysis directly in the database try: - db.gap_analysis( - neo_db=database.neo_db, - node_names=standards, - cache_key=cache_key, - ) - cached = database.get_gap_analysis_result(cache_key=cache_key) - if cached: - parsed = json.loads(cached) - if "result" in parsed: - return jsonify({"result": parsed["result"]}) - except Exception: - logger.exception( - "Database gap analysis fallback failed for %s", - cache_key, - ) - abort(503, "Database/graph backend unavailable") - abort(404, "Gap analysis result not found") + return jsonify(_compute_ga_without_redis(database, standards)) + except Exception as fallback_exc: + logger.exception("Synchronous GA fallback failed for %s", cache_key) + abort(503, f"Gap analysis unavailable: {fallback_exc}") @app.route("/rest/v1/map_analysis_weak_links", methods=["GET"]) diff --git a/scripts/monitor_ga_health.py b/scripts/monitor_ga_health.py new file mode 100644 index 000000000..de8911e7e --- /dev/null +++ b/scripts/monitor_ga_health.py @@ -0,0 +1,239 @@ +#!/usr/bin/env python3 +""" +Monitor production (or staging) gap-analysis health over HTTP. + +Alerts when map_analysis responses are incomplete, especially HTTP 503 which +indicates the Heroku Neo4j/Redis fallback regression path. + +Exit codes: + 0 — all directed GA pairs return 200 with material ``result`` + 1 — incomplete pairs and/or 503 responses detected + 2 — configuration or request failure +""" + +from __future__ import annotations + +import argparse +import json +import os +import sys +import urllib.error +import urllib.parse +import urllib.request +from collections import Counter +from typing import Any + + +def _http_gap_result_is_material(result: Any) -> bool: + if result is None: + return False + if isinstance(result, dict): + return len(result) > 0 + if isinstance(result, list): + return len(result) > 0 + return bool(result) + + +def _parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "--base-url", + default=os.environ.get("OPENCRE_GA_MONITOR_BASE_URL", "https://opencre.org"), + help="OpenCRE base URL (default: https://opencre.org)", + ) + parser.add_argument( + "--timeout-seconds", + type=int, + default=int(os.environ.get("OPENCRE_GA_MONITOR_TIMEOUT", "40")), + help="HTTP timeout in seconds (default: 40)", + ) + parser.add_argument( + "--output-json", + default="", + help="Optional output JSON report path", + ) + parser.add_argument( + "--max-failures-print", + type=int, + default=50, + help="Max individual incomplete pairs to print (default: 50)", + ) + parser.add_argument( + "--webhook-url", + default=os.environ.get("OPENCRE_GA_MONITOR_WEBHOOK_URL", ""), + help="Optional webhook URL for alert payload (JSON POST)", + ) + return parser.parse_args() + + +def _get_json(url: str, timeout: int) -> Any: + req = urllib.request.Request(url, headers={"Accept": "application/json"}) + with urllib.request.urlopen(req, timeout=timeout) as resp: + return json.loads(resp.read().decode("utf-8")) + + +def _check_pair( + base_rest: str, sa: str, sb: str, timeout: int +) -> dict[str, Any] | None: + if sa == sb: + return None + query = urllib.parse.urlencode([("standard", sa), ("standard", sb)]) + url = f"{base_rest}/map_analysis?{query}" + try: + req = urllib.request.Request(url, headers={"Accept": "application/json"}) + with urllib.request.urlopen(req, timeout=timeout) as resp: + code = resp.status + body = resp.read().decode("utf-8", errors="replace") + except urllib.error.HTTPError as exc: + code = exc.code + body = (exc.read() or b"").decode("utf-8", errors="replace") + except Exception as exc: + return { + "pair": f"{sa}->{sb}", + "status_code": None, + "bucket": "request_exception", + "error": str(exc), + } + + body_preview = body.strip().replace("\n", " ")[:200] + if code != 200: + bucket = f"http_{code}" + if code == 503: + bucket = "http_503_regression" + return { + "pair": f"{sa}->{sb}", + "status_code": code, + "bucket": bucket, + "body_preview": body_preview, + } + + try: + payload = json.loads(body) + except json.JSONDecodeError: + return { + "pair": f"{sa}->{sb}", + "status_code": 200, + "bucket": "invalid_json_200", + "body_preview": body_preview, + } + + result = payload.get("result") + if _http_gap_result_is_material(result): + return None + if result is not None and not _http_gap_result_is_material(result): + return { + "pair": f"{sa}->{sb}", + "status_code": 200, + "bucket": "empty_result_200", + "body_preview": body_preview, + } + if payload.get("job_id"): + return { + "pair": f"{sa}->{sb}", + "status_code": 200, + "bucket": "job_id_only", + "job_id": payload.get("job_id"), + } + return { + "pair": f"{sa}->{sb}", + "status_code": 200, + "bucket": "missing_result", + "body_preview": body_preview, + } + + +def _post_webhook(webhook_url: str, payload: dict[str, Any]) -> None: + data = json.dumps(payload).encode("utf-8") + req = urllib.request.Request( + webhook_url, + data=data, + headers={"Content-Type": "application/json"}, + method="POST", + ) + with urllib.request.urlopen(req, timeout=30) as resp: + if resp.status >= 400: + raise RuntimeError(f"webhook returned HTTP {resp.status}") + + +def main() -> int: + args = _parse_args() + base_url = args.base_url.rstrip("/") + rest = f"{base_url}/rest/v1" + timeout = args.timeout_seconds + + try: + standards = _get_json(f"{rest}/ga_standards", timeout) + except Exception as exc: + print(f"Failed to fetch ga_standards from {base_url}: {exc}", file=sys.stderr) + return 2 + if not isinstance(standards, list): + print("ga_standards response is not a list", file=sys.stderr) + return 2 + + failures: list[dict[str, Any]] = [] + success_count = 0 + total_pairs = 0 + bucket_counts: Counter[str] = Counter() + + for sa in standards: + for sb in standards: + if sa == sb: + continue + total_pairs += 1 + item = _check_pair(rest, sa, sb, timeout) + if item is None: + success_count += 1 + bucket_counts["ok_result"] += 1 + else: + failures.append(item) + bucket_counts[item["bucket"]] += 1 + + report: dict[str, Any] = { + "base_url": base_url, + "ga_standards_count": len(standards), + "directed_pairs_tested": total_pairs, + "complete_pairs": success_count, + "incomplete_pairs": len(failures), + "buckets": dict(bucket_counts), + "incomplete_examples": failures[: args.max_failures_print], + "alert": len(failures) > 0, + "regression_503_count": bucket_counts.get("http_503_regression", 0), + } + + print( + f"GA health check for {base_url}: " + f"{success_count}/{total_pairs} complete, {len(failures)} incomplete" + ) + if bucket_counts.get("http_503_regression"): + print( + f"ALERT: {bucket_counts['http_503_regression']} pair(s) returned HTTP 503 " + "(Heroku Neo4j/Redis fallback regression)" + ) + if failures: + print("Incomplete buckets:") + for key, count in sorted(bucket_counts.items(), key=lambda kv: (-kv[1], kv[0])): + if key == "ok_result": + continue + print(f" - {key}: {count}") + print("Incomplete pair samples:") + for item in failures[: args.max_failures_print]: + print(f" - {item['pair']} [{item['bucket']}]") + + if args.output_json: + with open(args.output_json, "w", encoding="utf-8") as handle: + json.dump(report, handle, indent=2) + print(f"Wrote report: {args.output_json}") + + if args.webhook_url and failures: + try: + _post_webhook(args.webhook_url, report) + print(f"Posted alert to webhook ({len(failures)} incomplete pairs)") + except Exception as exc: + print(f"Webhook alert failed: {exc}", file=sys.stderr) + return 2 + + return 0 if not failures else 1 + + +if __name__ == "__main__": + raise SystemExit(main()) From 9c77a3fd09ba3d58f37f23407c89b5cff8b15f41 Mon Sep 17 00:00:00 2001 From: Spyros Date: Wed, 10 Jun 2026 08:56:26 +0300 Subject: [PATCH 03/37] fix(scripts): send User-Agent in GA health monitor HTTP requests Cloudflare blocks anonymous urllib requests to ga_standards on production. Co-authored-by: Cursor --- scripts/monitor_ga_health.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/monitor_ga_health.py b/scripts/monitor_ga_health.py index de8911e7e..c7fc8ae37 100644 --- a/scripts/monitor_ga_health.py +++ b/scripts/monitor_ga_health.py @@ -66,8 +66,14 @@ def _parse_args() -> argparse.Namespace: return parser.parse_args() +_DEFAULT_HEADERS = { + "Accept": "application/json", + "User-Agent": "OpenCRE-GA-Monitor/1.0 (+https://opencre.org)", +} + + def _get_json(url: str, timeout: int) -> Any: - req = urllib.request.Request(url, headers={"Accept": "application/json"}) + req = urllib.request.Request(url, headers=_DEFAULT_HEADERS) with urllib.request.urlopen(req, timeout=timeout) as resp: return json.loads(resp.read().decode("utf-8")) @@ -80,7 +86,7 @@ def _check_pair( query = urllib.parse.urlencode([("standard", sa), ("standard", sb)]) url = f"{base_rest}/map_analysis?{query}" try: - req = urllib.request.Request(url, headers={"Accept": "application/json"}) + req = urllib.request.Request(url, headers=_DEFAULT_HEADERS) with urllib.request.urlopen(req, timeout=timeout) as resp: code = resp.status body = resp.read().decode("utf-8", errors="replace") From 3b104f27cbf1d058f411635cdd1571fa117e8594 Mon Sep 17 00:00:00 2001 From: Spyros Date: Wed, 10 Jun 2026 08:59:09 +0300 Subject: [PATCH 04/37] docs(agents): track AGENTS.md with production GA cache-only policy Allow AGENTS.md through the *.md gitignore exception and document that Heroku/opencreorg gap analysis is cache-only (no compute on production). Co-authored-by: Cursor --- .gitignore | 1 + AGENTS.md | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 AGENTS.md diff --git a/.gitignore b/.gitignore index 831738958..f660f1339 100644 --- a/.gitignore +++ b/.gitignore @@ -64,6 +64,7 @@ standards_cache.sqlite ### Docs *.md +!AGENTS.md ### Dev DBDumps *.sql diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..24b54bf16 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,41 @@ +# OpenCRE Agent Instructions + +Cursor agents working in this repo must follow the rules in `.cursor/rules/`. + +## Quick start + +1. **Requirements gate** — If goal, success criteria, `@` file refs, or constraints are missing, stop and ask (`requirements-gate.mdc`). +2. **Plan first** — Non-trivial or multi-file work requires a plan and user approval before coding (`plan-first-workflow.mdc`, `multi-agent-workflow.mdc`). +3. **Verify** — After code changes, run checks and iterate until green (`verifiable-goals.mdc`): + - `make lint` + - `make mypy` + - `make test` + - `make frontend` (if frontend touched) +4. **Review** — Substantive work needs independent judge/subagent review (`multi-agent-workflow.mdc`). +5. **Production gap analysis** — On Heroku/opencreorg, gap analysis is cache-only: serve precomputed rows from Postgres; do not compute GA on production (cache miss → 404). + +## Rule index + +| Rule | Purpose | +|------|---------| +| `requirements-gate.mdc` | Clarifying questions + requirements template | +| `complete-ticket.mdc` | Ticket gate for `.md`/`.txt` files; uses `requirements-gate` template + coding standards | +| `plan-first-workflow.mdc` | Plan Mode before non-trivial edits | +| `multi-agent-workflow.mdc` | Big changes, approval gates, builder ≠ judge | +| `verifiable-goals.mdc` | Lint, mypy, test, CI — show evidence | +| `never-assume.mdc` | No guessing; complete code; minimal scope | +| `tdd-workflow.mdc` | Test-first for new behavior and importers | +| `autonomous-workflow.mdc` | Execute after approval; no unsolicited commits | +| `context-management.mdc` | `/clear`, `@` refs, stale context recovery | +| `production-db-ops-safety.mdc` | Destructive prod DB confirmation | +| `alembic-deploy-guardrail.mdc` | Pre-deploy migration guardrail | + +## OpenCRE commands + +```bash +make lint # black + frontend prettier +make mypy # Python typecheck +make test # Python unittest suite +make frontend # yarn build (when TS/TSX changed) +make alembic-guardrail # before deploy/migration ops +``` From d219a6bebf9d7a73156bb124c5651d57e3f14c9f Mon Sep 17 00:00:00 2001 From: Spyros Date: Wed, 10 Jun 2026 08:59:42 +0300 Subject: [PATCH 05/37] fix(ga): block empty primary cache writes and clobbering Guard add_gap_analysis_result so non-material {"result":{}} primary rows are not inserted and cannot overwrite material cache; subresource keys unchanged. Co-authored-by: Cursor --- application/database/db.py | 17 +++++ application/tests/db_test.py | 62 ++++++++++++++++++- .../tests/gap_analysis_pair_job_test.py | 19 ++++++ application/utils/gap_analysis.py | 19 ++++++ 4 files changed, 115 insertions(+), 2 deletions(-) diff --git a/application/database/db.py b/application/database/db.py index 398eff4ee..dad2b0318 100644 --- a/application/database/db.py +++ b/application/database/db.py @@ -47,6 +47,7 @@ make_resources_key, make_subresources_key, primary_gap_analysis_payload_is_material, + should_persist_primary_gap_analysis_cache, ) @@ -2428,6 +2429,22 @@ def add_gap_analysis_result(self, cache_key: str, ga_object: str): .filter(GapAnalysisResults.cache_key == cache_key) .first() ) + if gap_analysis_cache_key_is_primary(cache_key): + existing_payload = existing.ga_object if existing else None + if not should_persist_primary_gap_analysis_cache( + ga_object, existing_payload + ): + if existing is None: + logger.info( + "Skipping empty primary gap analysis cache insert for %s", + cache_key, + ) + else: + logger.warning( + "Refusing non-material primary gap analysis update for %s", + cache_key, + ) + return if existing: existing.ga_object = ga_object self.session.add(existing) diff --git a/application/tests/db_test.py b/application/tests/db_test.py index 88f2cdbaf..87a1ec8f4 100644 --- a/application/tests/db_test.py +++ b/application/tests/db_test.py @@ -1327,15 +1327,73 @@ def test_gap_analysis_paths_without_base_standard_nodes(self, gap_mock): collection.gap_analysis_exists(make_resources_key(["788-788", "788-789"])), ) + def test_add_gap_analysis_result_skips_empty_primary_insert(self): + collection = db.Node_collection() + key = make_resources_key(["788-788", "b"]) + collection.add_gap_analysis_result(key, '{"result": {}}') + self.assertIsNone( + collection.session.query(db.GapAnalysisResults) + .filter(db.GapAnalysisResults.cache_key == key) + .first() + ) + self.assertFalse(collection.gap_analysis_exists(key)) + + def test_add_gap_analysis_result_does_not_clobber_material_primary(self): + collection = db.Node_collection() + key = make_resources_key(["788-788", "b"]) + material = '{"result": {"111-111": {"paths": {}}}}' + collection.add_gap_analysis_result(key, material) + collection.add_gap_analysis_result(key, '{"result": {}}') + row = ( + collection.session.query(db.GapAnalysisResults) + .filter(db.GapAnalysisResults.cache_key == key) + .first() + ) + self.assertEqual(row.ga_object, material) + self.assertTrue(collection.gap_analysis_exists(key)) + + def test_add_gap_analysis_result_allows_material_over_empty_primary(self): + collection = db.Node_collection() + key = make_resources_key(["788-788", "b"]) + collection.session.add( + db.GapAnalysisResults(cache_key=key, ga_object='{"result": {}}') + ) + collection.session.commit() + material = '{"result": {"111-111": {"paths": {}}}}' + collection.add_gap_analysis_result(key, material) + row = ( + collection.session.query(db.GapAnalysisResults) + .filter(db.GapAnalysisResults.cache_key == key) + .first() + ) + self.assertEqual(row.ga_object, material) + + def test_add_gap_analysis_result_allows_empty_subresource(self): + collection = db.Node_collection() + sub = make_subresources_key(["788-788", "b"], "111-111") + collection.add_gap_analysis_result(sub, '{"result": {}}') + row = ( + collection.session.query(db.GapAnalysisResults) + .filter(db.GapAnalysisResults.cache_key == sub) + .first() + ) + self.assertIsNotNone(row) + self.assertEqual(row.ga_object, '{"result": {}}') + @patch.object(db.NEO_DB, "gap_analysis") def test_gap_analysis_removes_stale_empty_primary_when_neo_empty(self, gap_mock): """Placeholder ``{"result":{}}`` rows must not survive a recompute with no Neo paths.""" collection = db.Node_collection() collection.neo_db.connected = True key = make_resources_key(["788-788", "b"]) - collection.add_gap_analysis_result(key, '{"result": {}}') + collection.session.add( + db.GapAnalysisResults(cache_key=key, ga_object='{"result": {}}') + ) sub = make_subresources_key(["788-788", "b"], "111-111") - collection.add_gap_analysis_result(sub, '{"result": {}}') + collection.session.add( + db.GapAnalysisResults(cache_key=sub, ga_object='{"result": {}}') + ) + collection.session.commit() self.assertFalse(collection.gap_analysis_exists(key)) gap_mock.return_value = ([], []) diff --git a/application/tests/gap_analysis_pair_job_test.py b/application/tests/gap_analysis_pair_job_test.py index bf50cb797..eeeb86007 100644 --- a/application/tests/gap_analysis_pair_job_test.py +++ b/application/tests/gap_analysis_pair_job_test.py @@ -27,6 +27,25 @@ def get_gap_analysis_result(self, cache_key: str): class TestGapAnalysisPairJob(unittest.TestCase): + def test_should_persist_primary_gap_analysis_cache(self): + g = gap_analysis + self.assertFalse( + g.should_persist_primary_gap_analysis_cache('{"result":{}}', None) + ) + self.assertFalse( + g.should_persist_primary_gap_analysis_cache( + '{"result":{}}', '{"result":{"k":1}}' + ) + ) + self.assertTrue( + g.should_persist_primary_gap_analysis_cache( + '{"result":{"k":1}}', '{"result":{}}' + ) + ) + self.assertTrue( + g.should_persist_primary_gap_analysis_cache('{"result":{"k":1}}', None) + ) + def test_primary_gap_analysis_payload_is_material(self): g = gap_analysis self.assertFalse(g.primary_gap_analysis_payload_is_material(None)) diff --git a/application/utils/gap_analysis.py b/application/utils/gap_analysis.py index 8a320a462..dfde5578e 100644 --- a/application/utils/gap_analysis.py +++ b/application/utils/gap_analysis.py @@ -59,6 +59,25 @@ def primary_gap_analysis_payload_is_material(ga_object: Optional[str]) -> bool: return bool(res) +def should_persist_primary_gap_analysis_cache( + ga_object: str, + existing_ga_object: Optional[str] = None, +) -> bool: + """ + True when a primary GA SQL cache write should be applied. + + Non-material empty ``{"result": {}}`` payloads must not be inserted and must + not overwrite an existing material row. + """ + if primary_gap_analysis_payload_is_material(ga_object): + return True + if existing_ga_object is None: + return False + if primary_gap_analysis_payload_is_material(existing_ga_object): + return False + return False + + def get_path_score(path): score = 0 previous_id = path["start"].id From bcd3b436558f684f414195bc8bb0dc18453a0f4b Mon Sep 17 00:00:00 2001 From: Spyros Date: Wed, 10 Jun 2026 19:43:17 +0300 Subject: [PATCH 06/37] Restore GA sync script with material-only merge upsert. Supports postgres-to-postgres sync via temp-table merge for prod tables without a unique index on cache_key. Co-authored-by: Cursor --- scripts/sync_gap_analysis_table.py | 181 +++++++++++++++++++++++++++++ 1 file changed, 181 insertions(+) create mode 100644 scripts/sync_gap_analysis_table.py diff --git a/scripts/sync_gap_analysis_table.py b/scripts/sync_gap_analysis_table.py new file mode 100644 index 000000000..6a6661f38 --- /dev/null +++ b/scripts/sync_gap_analysis_table.py @@ -0,0 +1,181 @@ +#!/usr/bin/env python3 +"""Copy material ``gap_analysis_results`` rows between databases (upsert only).""" + +from __future__ import annotations + +import argparse +import json +import sqlite3 +import sys +import urllib.parse +from typing import Iterable, List, Optional, Sequence, Tuple + +import psycopg2 +from psycopg2 import extras + + +def _normalize_pg_url(url: str) -> str: + if url.startswith("postgres://"): + return "postgresql://" + url[len("postgres://") :] + return url + + +def _pg_host_is_loopback(url: str) -> bool: + p = urllib.parse.urlparse(_normalize_pg_url(url)) + h = (p.hostname or "").lower() + return h in ("127.0.0.1", "localhost", "::1", "0.0.0.0") or h == "" + + +def _payload_is_material(ga_object: Optional[str]) -> bool: + if not ga_object or not isinstance(ga_object, str): + return False + try: + parsed = json.loads(ga_object) + except json.JSONDecodeError: + return False + res = parsed.get("result") + if res is None: + return False + if isinstance(res, (dict, list)): + return len(res) > 0 + return bool(res) + + +def _fetch_sqlite_rows(path: str, material_only: bool) -> List[Tuple[str, Optional[str]]]: + conn = sqlite3.connect(path) + cur = conn.execute("SELECT cache_key, ga_object FROM gap_analysis_results") + rows: List[Tuple[str, Optional[str]]] = [] + for k, v in cur.fetchall(): + payload = None if v is None else str(v) + if material_only and not _payload_is_material(payload): + continue + rows.append((str(k), payload)) + conn.close() + return rows + + +def _fetch_postgres_rows(pg_url: str, material_only: bool) -> List[Tuple[str, Optional[str]]]: + conn = psycopg2.connect(_normalize_pg_url(pg_url)) + try: + cur = conn.cursor() + cur.execute("SELECT cache_key, ga_object FROM public.gap_analysis_results") + rows: List[Tuple[str, Optional[str]]] = [] + for cache_key, ga_object in cur.fetchall(): + payload = None if ga_object is None else str(ga_object) + if material_only and not _payload_is_material(payload): + continue + rows.append((str(cache_key), payload)) + cur.close() + return rows + finally: + conn.close() + + +def _merge_postgres_rows( + pg_url: str, rows: Sequence[Tuple[str, Optional[str]]] +) -> None: + """Update existing rows and insert missing keys (works without a unique index).""" + conn = psycopg2.connect(_normalize_pg_url(pg_url)) + conn.autocommit = False + batch_size = 500 + try: + cur = conn.cursor() + for i in range(0, len(rows), batch_size): + batch = list(rows[i : i + batch_size]) + cur.execute( + """ + CREATE TEMP TABLE ga_sync_stage ( + cache_key text PRIMARY KEY, + ga_object text + ) ON COMMIT DROP + """ + ) + extras.execute_batch( + cur, + "INSERT INTO ga_sync_stage (cache_key, ga_object) VALUES (%s, %s)", + batch, + page_size=200, + ) + cur.execute( + """ + UPDATE public.gap_analysis_results AS g + SET ga_object = s.ga_object + FROM ga_sync_stage AS s + WHERE g.cache_key = s.cache_key + """ + ) + cur.execute( + """ + INSERT INTO public.gap_analysis_results (cache_key, ga_object) + SELECT s.cache_key, s.ga_object + FROM ga_sync_stage AS s + LEFT JOIN public.gap_analysis_results AS g + ON g.cache_key = s.cache_key + WHERE g.cache_key IS NULL + """ + ) + conn.commit() + print(f"merged batch {i // batch_size + 1}: {len(batch)} row(s)", flush=True) + cur.close() + finally: + conn.close() + + +def _fetch_rows( + from_sqlite: Optional[str], + from_postgres: Optional[str], + material_only: bool, +) -> List[Tuple[str, Optional[str]]]: + if from_sqlite: + return _fetch_sqlite_rows(from_sqlite, material_only) + if from_postgres: + return _fetch_postgres_rows(from_postgres, material_only) + raise ValueError("one of --from-sqlite or --from-postgres is required") + + +def main() -> int: + p = argparse.ArgumentParser(description=__doc__) + src = p.add_mutually_exclusive_group(required=True) + src.add_argument("--from-sqlite", metavar="PATH") + src.add_argument("--from-postgres", metavar="URL") + p.add_argument("--to-postgres", required=True, metavar="URL") + p.add_argument( + "--material-only", + action="store_true", + default=True, + help="Sync only rows with non-empty result payloads (default: true)", + ) + p.add_argument( + "--include-non-material", + action="store_true", + help="Also sync empty/placeholder rows (overrides --material-only)", + ) + p.add_argument("--require-local-destination", action="store_true") + p.add_argument("--allow-nonloopback-destination", action="store_true") + args = p.parse_args() + + material_only = not args.include_non_material + + if args.require_local_destination and not _pg_host_is_loopback(args.to_postgres): + print("error: destination is not loopback", file=sys.stderr) + return 2 + if ( + not _pg_host_is_loopback(args.to_postgres) + and not args.allow_nonloopback_destination + ): + print( + "error: remote destination requires --allow-nonloopback-destination", + file=sys.stderr, + ) + return 2 + + rows = _fetch_rows(args.from_sqlite, args.from_postgres, material_only) + source = args.from_sqlite or args.from_postgres + print(f"read {len(rows)} row(s) from {source!r} (material_only={material_only})") + _merge_postgres_rows(args.to_postgres, rows) + print(f"merged {len(rows)} row(s) to postgres") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) From 44f4c7be284fd21f20e46b9efaa43efbbcaaad7f Mon Sep 17 00:00:00 2001 From: Spyros Date: Thu, 11 Jun 2026 01:24:38 +0300 Subject: [PATCH 07/37] Add PCI CRE linker, agent ops docs, and address GA review feedback. Document operational scripts and weekly prod GA checks in AGENTS.md; add link_pci_dss_cre.py for embedding-based CRE linking. Harden primary GA cache key detection, sync script materiality guards, monitor 503 test, and DSN redaction. Co-authored-by: Cursor --- AGENTS.md | 95 ++++++++++++ application/tests/ga_parity_test.py | 10 ++ application/tests/monitor_ga_health_test.py | 21 ++- application/utils/gap_analysis.py | 8 +- scripts/link_pci_dss_cre.py | 161 ++++++++++++++++++++ scripts/sync_gap_analysis_table.py | 76 ++++++++- 6 files changed, 361 insertions(+), 10 deletions(-) create mode 100644 scripts/link_pci_dss_cre.py diff --git a/AGENTS.md b/AGENTS.md index 24b54bf16..75b31bd40 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,6 +14,101 @@ Cursor agents working in this repo must follow the rules in `.cursor/rules/`. 4. **Review** — Substantive work needs independent judge/subagent review (`multi-agent-workflow.mdc`). 5. **Production gap analysis** — On Heroku/opencreorg, gap analysis is cache-only: serve precomputed rows from Postgres; do not compute GA on production (cache miss → 404). +## Operational scripts + +Prefer existing Makefile targets and `scripts/` helpers over ad-hoc Docker, GA, import, or prod-DB setup. Read script headers or `--help` for env vars and flags; do not reimplement their logic. + +### Local Docker services + +Use Makefile targets — do not hand-roll `docker run`: + +```bash +make docker-neo4j # Neo4j (7474/7687) +make docker-redis # Redis Stack (6379/8001) +make docker-postgres # local Postgres (5432, cre/password) +make start-containers # neo4j + redis only +make migrate-upgrade # after postgres is up +``` + +Reset volumes: `make docker-neo4j-rm` / `make docker-redis-rm`. + +### Imports and Neo4j populate + +```bash +make import-all # full standards import via scripts/import-all.sh +make import-projects # skip core CRE import (CRE_SKIP_IMPORT_CORE=1) +make import-neo4j # populate Neo4j from cache +``` + +`scripts/import-all.sh` handles parallel importers, SQLite export, and verification. For embeddings-only SQLite → Postgres push, use `scripts/sync_embeddings_table.py` (see its docstring). + +### Gap analysis (local compute, prod verify) + +**Local backfill** (starts containers, workers, migrations — see `scripts/backfill_gap_analysis.sh`): + +```bash +make backfill-gap-analysis # parallel workers + --ga_backfill_missing +make backfill-gap-analysis-sync # Neo4j populate + backfill without queue +make sync-gap-analysis-table-local # upsert material rows sqlite → local Postgres +``` + +**Prod / staging checks** (HTTP only — never compute GA on opencreorg): + +```bash +make verify-ga-complete-prod # scripts/verify_ga_completeness.py +make monitor-ga-health-prod # scripts/monitor_ga_health.py (503 / empty result alerts) +make verify-ga-parity-local # scripts/verify_ga_postgres_neo_parity.py +``` + +Table sync between databases: `scripts/sync_gap_analysis_table.py`, `scripts/sync_embeddings_table.py`. + +### Production DB (Heroku opencreorg) + +Use `scripts/db/*` — never raw destructive `psql` against prod without these wrappers. All flows capture and wait for a fresh Heroku backup first (`scripts/db/common.sh`). + +```bash +scripts/db/backup-opencreorg.sh # backup only +scripts/db/surgery-opencreorg.sh --sql-file path/to/change.sql # targeted SQL +scripts/db/surgery-opencreorg.sh --sql-file … --destructive # DELETE/DROP/TRUNCATE +scripts/db/sync-local-to-opencreorg.sh [--table node]… # local → prod sync +``` + +Destructive surgery requires `CONFIRM_DESTRUCTIVE=I_UNDERSTAND_OPENCREORG_PROD_DB_DESTRUCTIVE_ACTION` (exact phrase). Override app: `APP_NAME=opencreorg`. See `production-db-ops-safety.mdc`. + +After prod GA cache changes, verify with `make verify-ga-complete-prod` / `make monitor-ga-health-prod`. + +### Weekly prod GA & data completeness (Cursor Automation) + +Schedule a **Cursor Automation** (not GitHub Actions) to run weekly — prod is cache-only; checks are HTTP + repo scripts only. + +| Setting | Value | +|---------|--------| +| Trigger | Cron: `0 9 * * 1` (Mondays 09:00) | +| Repo | `OWASP/OpenCRE`, branch `main` | +| Tools | None required (cloud agent uses repo checkout) | + +**Agent prompt (paste into Automations editor):** + +``` +Weekly OpenCRE prod GA and data completeness for opencreorg. + +1. python3 scripts/monitor_ga_health.py --base-url https://opencre.org --output-json tmp/prod-ga-health.json +2. python3 scripts/verify_ga_completeness.py --base-url https://opencre.org --output-json tmp/prod-ga-completeness.json +3. Confirm /rest/v1/standards and /rest/v1/ga_standards return non-empty lists. +4. If incomplete_pairs > 0 or non-zero exit: list failing pairs/buckets; recommend AGENTS.md Operational scripts (local backfill + scripts/sync_gap_analysis_table.py). Do not compute GA on Heroku or run destructive prod DB ops without explicit approval. +5. If all pass: report complete/total pairs and standards counts. +``` + +Create via **Cursor → Automations → New** (Agents Window). Do not hand-roll docker/GA setup in the automation prompt. + +### Staging bootstrap + +`scripts/setup-heroku-staging.sh` — provisions staging from prod + local SQLite; supports `--embeddings`, `--gap_analysis`, or full sync. Requires `PROD_APP`, `STAGING_APP`, `LOCAL_SQLITE_DB`. + +### Deploy / migrations + +Before deploy or `flask db upgrade`: `make alembic-guardrail` (or `python scripts/check_alembic_revision_guardrail.py`). + ## Rule index | Rule | Purpose | diff --git a/application/tests/ga_parity_test.py b/application/tests/ga_parity_test.py index f5ee85f5e..68b53c1c5 100644 --- a/application/tests/ga_parity_test.py +++ b/application/tests/ga_parity_test.py @@ -35,6 +35,16 @@ def test_empty_result_json_not_material(self): def test_whitespace_only_tags_not_material(self): self.assertFalse(gap_analysis.primary_gap_analysis_payload_is_material(" ")) + def test_primary_cache_key_ignores_arrow_in_importing_name(self): + self.assertTrue( + gap_analysis.gap_analysis_cache_key_is_primary("A->B >> Compare") + ) + self.assertFalse( + gap_analysis.gap_analysis_cache_key_is_primary( + "A >> Compare->node-section-id" + ) + ) + if __name__ == "__main__": unittest.main() diff --git a/application/tests/monitor_ga_health_test.py b/application/tests/monitor_ga_health_test.py index aa5c1ac7b..9fdc1e373 100644 --- a/application/tests/monitor_ga_health_test.py +++ b/application/tests/monitor_ga_health_test.py @@ -1,4 +1,7 @@ +import io import unittest +import urllib.error +from unittest import mock from scripts import monitor_ga_health as monitor @@ -9,9 +12,21 @@ def test_material_result_detection(self) -> None: self.assertFalse(monitor._http_gap_result_is_material({})) self.assertFalse(monitor._http_gap_result_is_material(None)) - def test_503_bucket_is_regression_marker(self) -> None: - bucket = "http_503_regression" - self.assertEqual(bucket, "http_503_regression") + def test_check_pair_503_uses_regression_bucket(self) -> None: + body = b"Service Unavailable" + + def _raise_503(*_args, **_kwargs): + raise urllib.error.HTTPError( + "http://example", 503, "Service Unavailable", {}, io.BytesIO(body) + ) + + with mock.patch("urllib.request.urlopen", side_effect=_raise_503): + result = monitor._check_pair("https://opencre.org/rest/v1", "A", "B", 10) + + self.assertIsNotNone(result) + assert result is not None + self.assertEqual(result["bucket"], "http_503_regression") + self.assertEqual(result["status_code"], 503) if __name__ == "__main__": diff --git a/application/utils/gap_analysis.py b/application/utils/gap_analysis.py index dfde5578e..01137013e 100644 --- a/application/utils/gap_analysis.py +++ b/application/utils/gap_analysis.py @@ -34,7 +34,13 @@ def make_subresources_key(standards: List[str], key: str) -> str: def gap_analysis_cache_key_is_primary(cache_key: str) -> bool: """Primary directed-standard rows use ``A >> B``; drill-down rows append ``->...``.""" - return "->" not in cache_key + marker = " >> " + idx = cache_key.find(marker) + if idx < 0: + return False + # Subresource keys are ``A >> B->nodeKey``; only inspect text after the pair. + suffix = cache_key[idx + len(marker) :] + return "->" not in suffix def primary_gap_analysis_payload_is_material(ga_object: Optional[str]) -> bool: diff --git a/scripts/link_pci_dss_cre.py b/scripts/link_pci_dss_cre.py new file mode 100644 index 000000000..265c80be2 --- /dev/null +++ b/scripts/link_pci_dss_cre.py @@ -0,0 +1,161 @@ +#!/usr/bin/env python3 +""" +Link existing PCI DSS nodes to CRE via embedding similarity. + +Use when PCI controls were imported with embeddings but without cre_node_links +(e.g. import ran with CRE_NO_GEN_EMBEDDINGS or linking failed). Mirrors the +linking logic in pci_dss.PciDss.__parse without re-fetching the spreadsheet. +""" + +from __future__ import annotations + +import argparse +import logging +import os +import sys + +_REPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +if _REPO_ROOT not in sys.path: + sys.path.insert(0, _REPO_ROOT) + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "--cache-file", + default=os.environ.get("CRE_CACHE_FILE") + or os.environ.get("PROD_DATABASE_URL") + or "postgresql://cre:password@127.0.0.1:5432/cre", + ) + parser.add_argument( + "--dry-run", + action="store_true", + help="Report link candidates without writing", + ) + args = parser.parse_args() + + logging.basicConfig(level=logging.INFO, format="%(levelname)s %(message)s") + logger = logging.getLogger(__name__) + + from application.cmd import cre_main + from application.database import db + from application.defs import cre_defs as defs + from application.prompt_client import prompt_client + + collection = cre_main.db_connect(args.cache_file) + ph = prompt_client.PromptHandler(database=collection) + + pci_rows = ( + collection.session.query(db.Node) + .filter(db.Node.name == "PCI DSS") + .order_by(db.Node.section_id) + .all() + ) + if not pci_rows: + logger.error("No PCI DSS nodes found in database") + return 1 + + pci_ids = [n.id for n in pci_rows if n.id] + linked_before = ( + collection.session.query(db.Links).filter(db.Links.node.in_(pci_ids)).count() + if pci_ids + else 0 + ) + logger.info( + "PCI DSS nodes=%s existing cre_node_links=%s", + len(pci_rows), + linked_before, + ) + + created = 0 + skipped_linked = 0 + skipped_no_match = 0 + + for db_node in pci_rows: + existing = ( + collection.session.query(db.Links) + .filter(db.Links.node == db_node.id) + .first() + ) + if existing: + skipped_linked += 1 + continue + + emb_row = ( + collection.session.query(db.Embeddings) + .filter(db.Embeddings.node_id == db_node.id) + .first() + ) + if not emb_row or not emb_row.embeddings: + logger.warning("No embedding for PCI node %s; skipping", db_node.section_id) + skipped_no_match += 1 + continue + + control_embeddings = [float(e) for e in emb_row.embeddings.split(",")] + cre_id = ph.get_id_of_most_similar_cre(control_embeddings) + if not cre_id: + standard_id = ph.get_id_of_most_similar_node(control_embeddings) + if standard_id: + dbstandard = collection.get_nodes(db_id=standard_id) + if dbstandard: + cres = collection.find_cres_of_node(dbstandard[0]) + if cres: + cre_row_candidate = ( + collection.session.query(db.CRE) + .filter(db.CRE.external_id == cres[0].id) + .first() + ) + if cre_row_candidate: + cre_id = cre_row_candidate.id + if not cre_id: + logger.info( + "No CRE match for PCI %s (%s)", + db_node.section_id or "", + (db_node.section or "")[:60], + ) + skipped_no_match += 1 + continue + + cre_row = collection.session.query(db.CRE).filter(db.CRE.id == cre_id).first() + if not cre_row: + skipped_no_match += 1 + continue + + if args.dry_run: + logger.info( + "Would link PCI %s -> CRE %s", + db_node.section_id or "", + cre_row.name, + ) + created += 1 + continue + + collection.add_link( + cre=cre_row, + node=db_node, + ltype=defs.LinkTypes.AutomaticallyLinkedTo, + ) + created += 1 + if created % 50 == 0: + logger.info("Linked %s PCI controls so far", created) + + linked_after = ( + collection.session.query(db.Links).filter(db.Links.node.in_(pci_ids)).count() + if pci_ids + else 0 + ) + logger.info( + "Done: new_links=%s skipped_already_linked=%s skipped_no_match=%s " + "cre_node_links before=%s after=%s dry_run=%s", + created, + skipped_linked, + skipped_no_match, + linked_before, + linked_after, + args.dry_run, + ) + return 0 if created > 0 or linked_after > linked_before else 1 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/scripts/sync_gap_analysis_table.py b/scripts/sync_gap_analysis_table.py index 6a6661f38..730ba97e9 100644 --- a/scripts/sync_gap_analysis_table.py +++ b/scripts/sync_gap_analysis_table.py @@ -26,6 +26,22 @@ def _pg_host_is_loopback(url: str) -> bool: return h in ("127.0.0.1", "localhost", "::1", "0.0.0.0") or h == "" +def _redact_pg_url(url: str) -> str: + p = urllib.parse.urlparse(_normalize_pg_url(url)) + host = p.hostname or "unknown" + port = f":{p.port}" if p.port else "" + db = (p.path or "").lstrip("/") or "postgres" + return f"postgresql://***@{host}{port}/{db}" + + +def _is_primary_cache_key(cache_key: str) -> bool: + marker = " >> " + idx = cache_key.find(marker) + if idx < 0: + return False + return "->" not in cache_key[idx + len(marker) :] + + def _payload_is_material(ga_object: Optional[str]) -> bool: if not ga_object or not isinstance(ga_object, str): return False @@ -41,7 +57,9 @@ def _payload_is_material(ga_object: Optional[str]) -> bool: return bool(res) -def _fetch_sqlite_rows(path: str, material_only: bool) -> List[Tuple[str, Optional[str]]]: +def _fetch_sqlite_rows( + path: str, material_only: bool +) -> List[Tuple[str, Optional[str]]]: conn = sqlite3.connect(path) cur = conn.execute("SELECT cache_key, ga_object FROM gap_analysis_results") rows: List[Tuple[str, Optional[str]]] = [] @@ -54,7 +72,9 @@ def _fetch_sqlite_rows(path: str, material_only: bool) -> List[Tuple[str, Option return rows -def _fetch_postgres_rows(pg_url: str, material_only: bool) -> List[Tuple[str, Optional[str]]]: +def _fetch_postgres_rows( + pg_url: str, material_only: bool +) -> List[Tuple[str, Optional[str]]]: conn = psycopg2.connect(_normalize_pg_url(pg_url)) try: cur = conn.cursor() @@ -71,6 +91,34 @@ def _fetch_postgres_rows(pg_url: str, material_only: bool) -> List[Tuple[str, Op conn.close() +def _existing_primary_payloads( + cur: psycopg2.extensions.cursor, cache_keys: Sequence[str] +) -> dict[str, Optional[str]]: + primary_keys = [k for k in cache_keys if _is_primary_cache_key(k)] + if not primary_keys: + return {} + cur.execute( + "SELECT cache_key, ga_object FROM public.gap_analysis_results " + "WHERE cache_key = ANY(%s)", + (list(primary_keys),), + ) + return {str(k): v for k, v in cur.fetchall()} + + +def _may_overwrite_primary( + cache_key: str, + new_payload: Optional[str], + existing_payload: Optional[str], +) -> bool: + if not _is_primary_cache_key(cache_key): + return True + if _payload_is_material(new_payload): + return True + if existing_payload is None: + return False + return not _payload_is_material(existing_payload) + + def _merge_postgres_rows( pg_url: str, rows: Sequence[Tuple[str, Optional[str]]] ) -> None: @@ -82,6 +130,14 @@ def _merge_postgres_rows( cur = conn.cursor() for i in range(0, len(rows), batch_size): batch = list(rows[i : i + batch_size]) + existing_by_key = _existing_primary_payloads(cur, [k for k, _ in batch]) + batch = [ + (k, v) + for k, v in batch + if _may_overwrite_primary(k, v, existing_by_key.get(k)) + ] + if not batch: + continue cur.execute( """ CREATE TEMP TABLE ga_sync_stage ( @@ -115,7 +171,10 @@ def _merge_postgres_rows( """ ) conn.commit() - print(f"merged batch {i // batch_size + 1}: {len(batch)} row(s)", flush=True) + print( + f"merged batch {i // batch_size + 1}: {len(batch)} row(s)", + flush=True, + ) cur.close() finally: conn.close() @@ -170,10 +229,15 @@ def main() -> int: return 2 rows = _fetch_rows(args.from_sqlite, args.from_postgres, material_only) - source = args.from_sqlite or args.from_postgres - print(f"read {len(rows)} row(s) from {source!r} (material_only={material_only})") + if args.from_postgres: + source_label = _redact_pg_url(args.from_postgres) + else: + source_label = args.from_sqlite or "unknown" + print( + f"read {len(rows)} row(s) from {source_label!r} (material_only={material_only})" + ) _merge_postgres_rows(args.to_postgres, rows) - print(f"merged {len(rows)} row(s) to postgres") + print(f"merged {len(rows)} row(s) to {_redact_pg_url(args.to_postgres)!r}") return 0 From 4c354bc3b1d5f5818ff518c534a947ec590abd38 Mon Sep 17 00:00:00 2001 From: Spyros Date: Thu, 11 Jun 2026 01:36:01 +0300 Subject: [PATCH 08/37] fix(scripts): drop PROD_DATABASE_URL default from PCI linker Avoid accidental production writes when running link_pci_dss_cre.py without explicit --cache-file or CRE_CACHE_FILE. Co-authored-by: Cursor --- scripts/link_pci_dss_cre.py | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/link_pci_dss_cre.py b/scripts/link_pci_dss_cre.py index 265c80be2..0b5a94b19 100644 --- a/scripts/link_pci_dss_cre.py +++ b/scripts/link_pci_dss_cre.py @@ -24,7 +24,6 @@ def main() -> int: parser.add_argument( "--cache-file", default=os.environ.get("CRE_CACHE_FILE") - or os.environ.get("PROD_DATABASE_URL") or "postgresql://cre:password@127.0.0.1:5432/cre", ) parser.add_argument( From 0f5f8274161548f236dd4f82885d64106615143b Mon Sep 17 00:00:00 2001 From: Spyros Date: Thu, 11 Jun 2026 13:37:51 +0300 Subject: [PATCH 09/37] Fix IndexError in get_cre_by_db_id when get_CREs is empty Guard against an empty get_CREs result so callers get None instead of IndexError when a DB row exists but no matching CRE document is found. Co-authored-by: Cursor --- application/database/db.py | 8 +++++++- application/tests/db_test.py | 9 +++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/application/database/db.py b/application/database/db.py index dad2b0318..6a30d3c65 100644 --- a/application/database/db.py +++ b/application/database/db.py @@ -1344,7 +1344,13 @@ def get_cre_by_db_id(self, id: str) -> cre_defs.CRE: if not external_id: logger.error(f"CRE {id} does not exist in the db") return None - return self.get_CREs(external_id=external_id[0])[0] + cres = self.get_CREs(external_id=external_id[0]) + if not cres: + logger.error( + f"CRE {id} exists but get_CREs returned no results for external_id={external_id[0]}" + ) + return None + return cres[0] def list_node_ids_by_ntype(self, ntype: str) -> List[str]: # Always return plain strings (never SQLAlchemy row tuples). diff --git a/application/tests/db_test.py b/application/tests/db_test.py index 87a1ec8f4..d3e3a17f4 100644 --- a/application/tests/db_test.py +++ b/application/tests/db_test.py @@ -745,6 +745,15 @@ def test_get_CREs(self) -> None: self.assertEqual([c_id_only], collection.get_CREs(internal_id=db_id_only.id)) + @patch.object(db.Node_collection, "get_CREs") + def test_get_cre_by_db_id_returns_none_when_get_cres_empty( + self, get_cres_mock + ) -> None: + get_cres_mock.return_value = [] + result = self.collection.get_cre_by_db_id(self.dbcre.id) + self.assertIsNone(result) + get_cres_mock.assert_called_once_with(external_id=self.dbcre.external_id) + def test_get_standards(self) -> None: """Given: a Standard 'S1' that links to cres return the Standard in Document format""" From 68c7d3516af96b7139f99e643f44b1581468ed71 Mon Sep 17 00:00:00 2001 From: Spyros Date: Sat, 6 Jun 2026 01:37:58 +0300 Subject: [PATCH 10/37] Fix OpenCRE map analysis 503 on Heroku (#915) Serve precomputed OpenCRE GA from cache on Heroku instead of computing on the web dyno, expand backfill to include automatic CRE links, and harden PCI DSS / Secure Headers imports with better linking and parser fixes. Co-authored-by: Cursor --- Makefile | 5 + application/cmd/cre_main.py | 7 +- .../tests/opencre_gap_analysis_test.py | 91 ++++++++ application/tests/pci_dss_parser_test.py | 199 +++++++++++++++-- .../tests/secure_headers_parser_test.py | 118 +++++++++- application/tests/web_main_test.py | 118 +++++----- .../parsers/pci_dss.py | 190 ++++++++++++---- .../parsers/secure_headers.py | 107 ++++++--- application/utils/gap_analysis.py | 167 ++++++++++++++ application/web/web_main.py | 114 +--------- cre.py | 5 + scripts/compute_pci_dss_cre_mappings.py | 208 ++++++++++++++++++ 12 files changed, 1069 insertions(+), 260 deletions(-) create mode 100644 application/tests/opencre_gap_analysis_test.py create mode 100644 scripts/compute_pci_dss_cre_mappings.py diff --git a/Makefile b/Makefile index 2a22dbd31..075f99cce 100644 --- a/Makefile +++ b/Makefile @@ -174,4 +174,9 @@ backfill-gap-analysis-sync: python cre.py --cache_file "$$CRE_CACHE_FILE" --populate_neo4j_db && \ python cre.py --cache_file "$$CRE_CACHE_FILE" --ga_backfill_missing --ga_backfill_no_queue +backfill-opencre-ga: + @[ -d "./.venv" ] && . ./.venv/bin/activate || ([ -d "./venv" ] && . ./venv/bin/activate); \ + export FLASK_APP="$(CURDIR)/cre.py"; \ + python cre.py --cache_file "$${CRE_CACHE_FILE:-$(CURDIR)/standards_cache.sqlite}" --ga_backfill_opencre_direct + all: clean lint test dev dev-run diff --git a/application/cmd/cre_main.py b/application/cmd/cre_main.py index b87085aa6..b3dfe91c4 100644 --- a/application/cmd/cre_main.py +++ b/application/cmd/cre_main.py @@ -730,12 +730,14 @@ def backfill_gap_analysis_only( if os.environ.get("CRE_NO_NEO4J") != "1": populate_neo4j_db(db_connection_str) + gap_analysis.backfill_opencre_direct_pairs(collection, refresh=True) + missing = _missing_ga_pairs(collection) if max_pairs > 0: missing = missing[:max_pairs] total = len(missing) if total == 0: - logger.info("GA backfill: no missing pairs") + logger.info("GA backfill: no missing neo4j pairs") return logger.info( @@ -952,6 +954,9 @@ def run(args: argparse.Namespace) -> None: # pragma: no cover if args.preload_map_analysis_target_url: gap_analysis.preload(target_url=args.preload_map_analysis_target_url) + if getattr(args, "ga_backfill_opencre_direct", False): + collection = db_connect(path=args.cache_file) + gap_analysis.backfill_opencre_direct_pairs(collection, refresh=True) if getattr(args, "ga_backfill_missing", False): backfill_gap_analysis_only( args.cache_file, diff --git a/application/tests/opencre_gap_analysis_test.py b/application/tests/opencre_gap_analysis_test.py new file mode 100644 index 000000000..c87902b8a --- /dev/null +++ b/application/tests/opencre_gap_analysis_test.py @@ -0,0 +1,91 @@ +import json +import unittest +from unittest.mock import Mock, patch + +from application import create_app, sqla # type: ignore +from application.database import db +from application.defs import cre_defs as defs +from application.utils.gap_analysis import ( + OPENCRE_STANDARD_NAME, + backfill_opencre_direct_pairs, + make_resources_key, +) + + +class TestOpencreGapAnalysis(unittest.TestCase): + def tearDown(self) -> None: + sqla.session.remove() + sqla.drop_all() + self.app_context.pop() + + def setUp(self) -> None: + self.app = create_app(mode="test") + self.app_context = self.app.app_context() + self.app_context.push() + sqla.create_all() + self.collection = db.Node_collection() + + def test_backfill_populates_secure_headers_pair_from_auto_linked_nodes(self) -> None: + cre = self.collection.add_cre( + defs.CRE( + id="636-347", + name="HTTP security headers", + description="", + ) + ) + header_node = self.collection.add_node( + defs.Standard( + name="Secure Headers", + section="Prevent information disclosure via HTTP headers", + hyperlink="https://owasp.org/example", + ) + ) + self.collection.add_link( + cre=cre, + node=header_node, + ltype=defs.LinkTypes.AutomaticallyLinkedTo, + ) + + written = backfill_opencre_direct_pairs(self.collection, refresh=True) + cache_key = make_resources_key([OPENCRE_STANDARD_NAME, "Secure Headers"]) + + self.assertGreaterEqual(written, 1) + self.assertTrue(self.collection.gap_analysis_exists(cache_key)) + payload = json.loads(self.collection.get_gap_analysis_result(cache_key)) + self.assertIn("636-347", payload["result"]) + path = next(iter(payload["result"]["636-347"]["paths"].values())) + self.assertEqual( + "AUTOMATICALLY_LINKED_TO", path["path"][0]["relationship"] + ) + + @patch( + "application.utils.gap_analysis.build_direct_cre_overlap_map_analysis", + return_value={"result": {"x": {}}}, + ) + def test_backfill_refresh_recomputes_cached_pairs( + self, build_mock: Mock + ) -> None: + collection = Mock() + collection.standards.return_value = ["ASVS"] + + backfill_opencre_direct_pairs(collection, refresh=False) + build_mock.assert_not_called() + + backfill_opencre_direct_pairs(collection, refresh=True) + self.assertEqual(2, build_mock.call_count) + + @patch( + "application.utils.gap_analysis.build_direct_cre_overlap_map_analysis", + return_value={"result": {"x": {}}}, + ) + def test_backfill_missing_only_skips_when_cache_exists( + self, build_mock: Mock + ) -> None: + collection = Mock() + collection.standards.return_value = ["ASVS"] + collection.gap_analysis_exists.return_value = True + + written = backfill_opencre_direct_pairs(collection, refresh=False) + + self.assertEqual(0, written) + build_mock.assert_not_called() diff --git a/application/tests/pci_dss_parser_test.py b/application/tests/pci_dss_parser_test.py index 3e51a8624..69691d70e 100644 --- a/application/tests/pci_dss_parser_test.py +++ b/application/tests/pci_dss_parser_test.py @@ -1,7 +1,79 @@ import unittest from unittest.mock import Mock, patch -from application.utils.external_project_parsers.parsers.pci_dss import PciDss +from application.defs import cre_defs as defs +from application.utils.external_project_parsers.parsers import pci_dss as pci_mod +from application.utils.external_project_parsers.parsers.pci_dss import ( + PciDss, + PciDssLinkError, + best_cre_via_bridge_standard, + pci_control_embedding_text, + resolve_cre_for_pci_control, +) + + +class TestPciDssLinking(unittest.TestCase): + def test_pci_control_embedding_text_uses_id_section_and_description(self) -> None: + control = defs.Standard( + name="PCI DSS", + sectionID="1.2.3", + section="Requirement title", + description="Longer requirement body", + ) + text = pci_control_embedding_text(control) + self.assertIn("1.2.3", text) + self.assertIn("Requirement title", text) + self.assertIn("Longer requirement body", text) + self.assertNotIn("family:standard", text) + + def test_resolve_cre_uses_paginated_cre_match_first(self) -> None: + cache = Mock() + linked_cre = defs.CRE(id="123-456", name="Linked CRE", description="") + cache.get_cre_by_db_id.return_value = linked_cre + prompt = Mock() + prompt.get_id_of_most_similar_cre_paginated.return_value = ("cre-db-id", 0.82) + + cre = resolve_cre_for_pci_control(prompt, cache, [0.1, 0.2]) + + self.assertEqual(linked_cre, cre) + prompt.get_id_of_most_similar_cre_paginated.assert_called() + prompt.get_id_of_most_similar_node.assert_not_called() + + def test_resolve_cre_falls_back_to_bridge_standard(self) -> None: + cache = Mock() + prompt = Mock() + prompt.get_id_of_most_similar_cre_paginated.return_value = (None, None) + bridge_cre = defs.CRE(id="999-001", name="Bridge CRE", description="") + + with patch.object( + pci_mod, "best_cre_via_bridge_standard", side_effect=[None, bridge_cre] + ) as bridge_mock: + cre = resolve_cre_for_pci_control(prompt, cache, [0.1, 0.2]) + + self.assertEqual(bridge_cre, cre) + self.assertEqual(2, bridge_mock.call_count) + + def test_best_cre_via_bridge_standard_picks_highest_similarity_linked_node( + self, + ) -> None: + cache = Mock() + low_node = defs.Standard(name="NIST 800-53 v5", section="low", sectionID="a") + high_node = defs.Standard(name="NIST 800-53 v5", section="high", sectionID="b") + low_cre = defs.CRE(id="111-111", name="Low", description="") + high_cre = defs.CRE(id="222-222", name="High", description="") + cache.get_nodes.return_value = [low_node, high_node] + cache.get_embeddings_for_doc.side_effect = [[0.0, 1.0], [1.0, 0.0]] + cache.find_cres_of_node.side_effect = [ + [Mock(id="low-db")], + [Mock(id="high-db")], + ] + cache.get_cre_by_db_id.side_effect = [low_cre, high_cre] + + cre = best_cre_via_bridge_standard( + cache, [1.0, 0.0], "NIST 800-53 v5", min_similarity=0.0 + ) + + self.assertEqual(high_cre, cre) class TestPciDssParser(unittest.TestCase): @@ -15,14 +87,11 @@ def test_parse_skips_standard_fallback_when_no_standard_id( cache = Mock() cache.get_nodes.return_value = None - cache.find_cres_of_node.return_value = [] - cache.get_cre_by_db_id.return_value = None - cache.get_embeddings_by_doc_type.return_value = {} + linked_cre = defs.CRE(id="123-456", name="Linked CRE", description="") + cache.get_embeddings_by_doc_type.return_value = {"cre-1": [0.1]} prompt = Mock() prompt.get_text_embeddings.return_value = [0.1, 0.2] - prompt.get_id_of_most_similar_cre.return_value = None - prompt.get_id_of_most_similar_node.return_value = None prompt_handler_mock.return_value = prompt pci_file = { @@ -35,19 +104,115 @@ def test_parse_skips_standard_fallback_when_no_standard_id( ] } - out = parser.parse_4(pci_file=pci_file, cache=cache) + with patch.object( + pci_mod, "resolve_cre_for_pci_control", return_value=linked_cre + ): + out = parser.parse_4(pci_file=pci_file, cache=cache) self.assertEqual(1, len(out)) - self.assertEqual(1, cache.get_nodes.call_count) - self.assertEqual( - { - "name": "PCI DSS", - "section": "Test requirement text", - "sectionID": "1.1.1", - }, - cache.get_nodes.call_args.kwargs, - ) - prompt.generate_embeddings_for.assert_called_once() + self.assertEqual(1, len(out[0].links)) + prompt.generate_embeddings_for.assert_not_called() + + @patch( + "application.utils.external_project_parsers.parsers.pci_dss.prompt_client.PromptHandler" + ) + def test_parse_raises_when_control_cannot_be_linked(self, prompt_handler_mock): + parser = PciDss() + + cache = Mock() + cache.get_nodes.return_value = None + cache.get_embeddings_by_doc_type.return_value = {"cre-1": [0.1]} + + prompt = Mock() + prompt.get_text_embeddings.return_value = [0.1, 0.2] + prompt_handler_mock.return_value = prompt + + pci_file = { + "Original Content": [ + { + "Defined Approach Requirements": "Test requirement text", + "PCI DSS ID": "1.1.1", + "Requirement Description": "desc", + } + ] + } + + with patch.object(pci_mod, "resolve_cre_for_pci_control", return_value=None): + with self.assertRaises(PciDssLinkError): + parser.parse_4(pci_file=pci_file, cache=cache) + + @patch( + "application.utils.external_project_parsers.parsers.pci_dss.prompt_client.PromptHandler" + ) + def test_parse_raises_when_any_control_in_batch_is_unlinked( + self, prompt_handler_mock + ): + parser = PciDss() + cache = Mock() + cache.get_nodes.return_value = None + linked_cre = defs.CRE(id="123-456", name="Linked CRE", description="") + cache.get_embeddings_by_doc_type.return_value = {"cre-1": [0.1]} + + prompt = Mock() + prompt.get_text_embeddings.return_value = [0.1, 0.2] + prompt_handler_mock.return_value = prompt + + pci_file = { + "Original Content": [ + { + "Defined Approach Requirements": "Linked requirement", + "PCI DSS ID": "1.1.1", + "Requirement Description": "desc", + }, + { + "Defined Approach Requirements": "Unlinked requirement", + "PCI DSS ID": "1.1.2", + "Requirement Description": "desc", + }, + ] + } + + with patch.object( + pci_mod, + "resolve_cre_for_pci_control", + side_effect=[linked_cre, None], + ): + with self.assertRaisesRegex(PciDssLinkError, "1 control\\(s\\) failed"): + parser.parse_4(pci_file=pci_file, cache=cache) + + @patch( + "application.utils.external_project_parsers.parsers.pci_dss.prompt_client.PromptHandler" + ) + def test_parse_adds_single_automatic_link_per_control(self, prompt_handler_mock): + parser = PciDss() + cache = Mock() + cache.get_nodes.return_value = None + linked_cre = defs.CRE(id="123-456", name="Linked CRE", description="") + cache.get_embeddings_by_doc_type.return_value = {"cre-1": [0.1]} + + prompt = Mock() + prompt.get_text_embeddings.return_value = [0.1, 0.2] + prompt_handler_mock.return_value = prompt + + pci_file = { + "Original Content": [ + { + "Defined Approach Requirements": "Test requirement text", + "PCI DSS ID": "1.1.1", + "Requirement Description": "desc", + } + ] + } + + with patch.object( + pci_mod, "resolve_cre_for_pci_control", return_value=linked_cre + ): + out = parser.parse_4(pci_file=pci_file, cache=cache) + + self.assertEqual(1, len(out)) + self.assertEqual(1, len(out[0].links)) + self.assertEqual(defs.LinkTypes.AutomaticallyLinkedTo, out[0].links[0].ltype) + self.assertEqual("123-456", out[0].links[0].document.id) if __name__ == "__main__": diff --git a/application/tests/secure_headers_parser_test.py b/application/tests/secure_headers_parser_test.py index 094f0b862..a262e2a7a 100644 --- a/application/tests/secure_headers_parser_test.py +++ b/application/tests/secure_headers_parser_test.py @@ -3,6 +3,9 @@ from application import create_app, sqla # type: ignore from application.prompt_client.prompt_client import PromptHandler from application.utils.external_project_parsers.parsers import secure_headers +from application.utils.external_project_parsers.parsers.secure_headers import ( + SecureHeadersLinkError, +) from application.database import db from application.utils import git import tempfile @@ -45,7 +48,11 @@ class Repo: name="Secure Headers", hyperlink="https://example.com/foo/bar", section="headerAsection", - links=[defs.Link(document=cre, ltype=defs.LinkTypes.LinkedTo)], + links=[ + defs.Link( + document=cre, ltype=defs.LinkTypes.AutomaticallyLinkedTo + ) + ], tags=[ "family:guidance", "subtype:cheatsheet", @@ -61,6 +68,115 @@ class Repo: self.assertEqual(len(nodes), 1) self.assertCountEqual(expected.todict(), nodes[0].todict()) + @patch.object(git, "clone") + def test_register_headers_creates_one_entry_per_opencre_link(self, mock_clone) -> None: + class Repo: + working_dir = "" + + repo = Repo() + loc = tempfile.mkdtemp() + tmpdir = os.path.join(loc, "content") + os.mkdir(tmpdir) + repo.working_dir = loc + cre_a = defs.CRE(name="HTTP security headers", id="636-347") + cre_b = defs.CRE( + name="Do not disclose technical information in HTTP header or response", + id="743-110", + ) + self.collection.add_cre(cre_a) + self.collection.add_cre(cre_b) + md = """See [first](https://www.opencre.org/cre/636-347?name=Secure+Headers§ion=First&link=https%3A%2F%2Fexample.com%2Ffirst) +and [second](https://www.opencre.org/cre/403-005?name=Secure+Headers§ion=Second&link=https%3A%2F%2Fexample.com%2Fsecond) +""" + with open(os.path.join(tmpdir, "cs.md"), "w") as mdf: + mdf.write(md) + mock_clone.return_value = repo + entries = secure_headers.SecureHeaders().parse( + cache=self.collection, ph=PromptHandler(database=self.collection) + ) + nodes = entries.results[secure_headers.SecureHeaders().name] + self.assertEqual(2, len(nodes)) + self.assertEqual({"First", "Second"}, {node.section for node in nodes}) + self.assertEqual( + {"636-347", "743-110"}, + {node.links[0].document.id for node in nodes}, + ) + + @patch.object(git, "clone") + def test_register_headers_raises_for_unknown_cre_id(self, mock_clone) -> None: + class Repo: + working_dir = "" + + repo = Repo() + loc = tempfile.mkdtemp() + tmpdir = os.path.join(loc, "content") + os.mkdir(tmpdir) + repo.working_dir = loc + md = """See [missing](https://www.opencre.org/cre/999-999?name=Secure+Headers§ion=Missing&link=https%3A%2F%2Fexample.com%2Fmissing) +""" + with open(os.path.join(tmpdir, "cs.md"), "w") as mdf: + mdf.write(md) + mock_clone.return_value = repo + + with self.assertRaises(SecureHeadersLinkError): + secure_headers.SecureHeaders().parse( + cache=self.collection, ph=PromptHandler(database=self.collection) + ) + + @patch.object(git, "clone") + def test_register_headers_keeps_first_link_when_it_is_the_only_valid_one( + self, mock_clone + ) -> None: + class Repo: + working_dir = "" + + repo = Repo() + loc = tempfile.mkdtemp() + tmpdir = os.path.join(loc, "content") + os.mkdir(tmpdir) + repo.working_dir = loc + cre = defs.CRE(name="HTTP security headers", id="636-347") + self.collection.add_cre(cre) + md = """See [first](https://www.opencre.org/cre/636-347?name=Secure+Headers§ion=First&link=https%3A%2F%2Fexample.com%2Ffirst) +""" + with open(os.path.join(tmpdir, "cs.md"), "w") as mdf: + mdf.write(md) + mock_clone.return_value = repo + + entries = secure_headers.SecureHeaders().register_headers( + cache=self.collection, repo=repo, file_path="./", repo_path="" + ) + + self.assertEqual(1, len(entries)) + self.assertEqual("First", entries[0].section) + self.assertEqual("636-347", entries[0].links[0].document.id) + + @patch.object(git, "clone") + def test_register_headers_raises_when_later_link_is_unknown( + self, mock_clone + ) -> None: + class Repo: + working_dir = "" + + repo = Repo() + loc = tempfile.mkdtemp() + tmpdir = os.path.join(loc, "content") + os.mkdir(tmpdir) + repo.working_dir = loc + cre = defs.CRE(name="HTTP security headers", id="636-347") + self.collection.add_cre(cre) + md = """See [first](https://www.opencre.org/cre/636-347?name=Secure+Headers§ion=First&link=https%3A%2F%2Fexample.com%2Ffirst) +and [missing](https://www.opencre.org/cre/999-999?name=Secure+Headers§ion=Missing&link=https%3A%2F%2Fexample.com%2Fmissing) +""" + with open(os.path.join(tmpdir, "cs.md"), "w") as mdf: + mdf.write(md) + mock_clone.return_value = repo + + with self.assertRaises(SecureHeadersLinkError): + secure_headers.SecureHeaders().register_headers( + cache=self.collection, repo=repo, file_path="./", repo_path="" + ) + md = """ # Secure Headers 1. [Introduction](#1-Introduction) diff --git a/application/tests/web_main_test.py b/application/tests/web_main_test.py index 5568d0f35..776fdc50a 100644 --- a/application/tests/web_main_test.py +++ b/application/tests/web_main_test.py @@ -789,14 +789,19 @@ def test_gap_analysis_dyno_cache_miss_returns_404( @patch.dict(os.environ, {"HEROKU": "True"}, clear=False) @patch.object(db, "Node_collection") - def test_map_analysis_opencre_heroku_cache_miss_returns_404(self, db_mock) -> None: + @patch.object(redis, "from_url") + def test_map_analysis_opencre_heroku_cache_miss_returns_404( + self, redis_conn_mock, db_mock + ) -> None: db_mock.return_value.gap_analysis_exists.return_value = False with self.app.test_client() as client: response = client.get( - "/rest/v1/map_analysis?standard=OpenCRE&standard=bbb", + "/rest/v1/map_analysis?standard=OpenCRE&standard=NIST%20800-53%20v5", headers={"Content-Type": "application/json"}, ) self.assertEqual(404, response.status_code) + db_mock.return_value.get_nodes.assert_not_called() + redis_conn_mock.assert_not_called() @patch.object(redis, "from_url") @patch.object(db, "Node_collection") @@ -825,20 +830,12 @@ def test_gap_analysis_supports_opencre_as_standard( compare.add_link( defs.Link(ltype=defs.LinkTypes.LinkedTo, document=shared_cre.shallow_copy()) ) - opencre = defs.CRE(id="170-772", name="Cryptography", description="") - opencre.add_link( - defs.Link(ltype=defs.LinkTypes.LinkedTo, document=compare.shallow_copy()) - ) db_mock.return_value.get_gap_analysis_result.return_value = None db_mock.return_value.gap_analysis_exists.return_value = False db_mock.return_value.get_nodes.side_effect = lambda name=None, **kwargs: ( [compare] if name == "OWASP Web Security Testing Guide (WSTG)" else [] ) - db_mock.return_value.session.query.return_value.all.return_value = [ - SimpleNamespace(id="cre-internal-1") - ] - db_mock.return_value.get_CREs.return_value = [opencre] with self.app.test_client() as client: response = client.get( @@ -849,15 +846,35 @@ def test_gap_analysis_supports_opencre_as_standard( payload = json.loads(response.data) self.assertEqual(200, response.status_code) self.assertIn("result", payload) - self.assertIn(opencre.id, payload["result"]) - self.assertEqual(1, len(payload["result"][opencre.id]["paths"])) - path = next(iter(payload["result"][opencre.id]["paths"].values())) + self.assertIn(shared_cre.id, payload["result"]) + self.assertEqual(1, len(payload["result"][shared_cre.id]["paths"])) + path = next(iter(payload["result"][shared_cre.id]["paths"].values())) self.assertEqual(compare.id, path["end"]["id"]) schedule_mock.assert_not_called() @patch.object(web_main.gap_analysis, "schedule") @patch.object(db, "Node_collection") - def test_gap_analysis_returns_only_direct_opencre_mappings( + def test_map_analysis_opencre_pair_returns_cached_result( + self, db_mock, schedule_mock + ) -> None: + expected = {"result": {"170-772": {"start": {"id": "170-772"}, "paths": {}}}} + db_mock.return_value.gap_analysis_exists.return_value = True + db_mock.return_value.get_gap_analysis_result.return_value = json.dumps(expected) + + with self.app.test_client() as client: + response = client.get( + "/rest/v1/map_analysis?standard=OpenCRE&standard=NIST%20800-53%20v5", + headers={"Content-Type": "application/json"}, + ) + + self.assertEqual(200, response.status_code) + self.assertEqual(expected, json.loads(response.data)) + db_mock.return_value.get_nodes.assert_not_called() + schedule_mock.assert_not_called() + + @patch.object(web_main.gap_analysis, "schedule") + @patch.object(db, "Node_collection") + def test_gap_analysis_opencre_mappings_include_linked_and_auto( self, db_mock, schedule_mock ) -> None: compare = defs.Standard( @@ -870,9 +887,6 @@ def test_gap_analysis_returns_only_direct_opencre_mappings( name="Set httponly attribute for cookie-based session tokens", description="", ) - direct_cre.add_link( - defs.Link(ltype=defs.LinkTypes.LinkedTo, document=compare.shallow_copy()) - ) auto_linked_cres = [] for i, cre_id in enumerate( [ @@ -891,33 +905,24 @@ def test_gap_analysis_returns_only_direct_opencre_mappings( name=f"Automatically mapped CRE {i}", description="", ) - cre.add_link( + auto_linked_cres.append(cre) + + compare.add_link( + defs.Link(ltype=defs.LinkTypes.LinkedTo, document=direct_cre.shallow_copy()) + ) + for cre in auto_linked_cres: + compare.add_link( defs.Link( ltype=defs.LinkTypes.AutomaticallyLinkedTo, - document=compare.shallow_copy(), + document=cre.shallow_copy(), ) ) - auto_linked_cres.append(cre) - - opencre_documents = [direct_cre] + auto_linked_cres - internal_ids = [ - SimpleNamespace(id=f"cre-internal-{i}") - for i in range(len(opencre_documents)) - ] db_mock.return_value.get_gap_analysis_result.return_value = None db_mock.return_value.gap_analysis_exists.return_value = False db_mock.return_value.get_nodes.side_effect = lambda name=None, **kwargs: ( [compare] if name == "CWE" else [] ) - db_mock.return_value.session.query.return_value.all.return_value = internal_ids - db_mock.return_value.get_CREs.side_effect = lambda internal_id=None, **kwargs: [ - next( - cre - for index, cre in enumerate(opencre_documents) - if internal_id == f"cre-internal-{index}" - ) - ] with self.app.test_client() as client: response = client.get( @@ -929,12 +934,17 @@ def test_gap_analysis_returns_only_direct_opencre_mappings( self.assertEqual(200, response.status_code) self.assertIn("result", payload) self.assertEqual([compare.id], list(payload["result"].keys())) - self.assertEqual(1, len(payload["result"][compare.id]["paths"])) - path = next(iter(payload["result"][compare.id]["paths"].values())) + self.assertEqual(8, len(payload["result"][compare.id]["paths"])) + path = payload["result"][compare.id]["paths"][direct_cre.id] self.assertEqual(compare.id, payload["result"][compare.id]["start"]["id"]) self.assertEqual(direct_cre.name, path["end"]["name"]) self.assertEqual("", path["path"][0]["start"]["id"]) self.assertEqual(direct_cre.id, path["path"][0]["end"]["id"]) + self.assertEqual("LINKED_TO", path["path"][0]["relationship"]) + auto_path = payload["result"][compare.id]["paths"][auto_linked_cres[0].id] + self.assertEqual( + "AUTOMATICALLY_LINKED_TO", auto_path["path"][0]["relationship"] + ) schedule_mock.assert_not_called() @patch.object(web_main.gap_analysis, "schedule") @@ -952,40 +962,26 @@ def test_gap_analysis_returns_only_direct_opencre_mappings_when_opencre_is_left( name="Set httponly attribute for cookie-based session tokens", description="", ) - direct_cre.add_link( - defs.Link(ltype=defs.LinkTypes.LinkedTo, document=compare.shallow_copy()) - ) indirect_cre = defs.CRE( id="117-371", name="Use a centralized access control mechanism", description="", ) - indirect_cre.add_link( + compare.add_link( + defs.Link(ltype=defs.LinkTypes.LinkedTo, document=direct_cre.shallow_copy()) + ) + compare.add_link( defs.Link( ltype=defs.LinkTypes.AutomaticallyLinkedTo, - document=compare.shallow_copy(), + document=indirect_cre.shallow_copy(), ) ) - opencre_documents = [direct_cre, indirect_cre] - internal_ids = [ - SimpleNamespace(id=f"cre-internal-{i}") - for i in range(len(opencre_documents)) - ] - db_mock.return_value.get_gap_analysis_result.return_value = None db_mock.return_value.gap_analysis_exists.return_value = False db_mock.return_value.get_nodes.side_effect = lambda name=None, **kwargs: ( [compare] if name == "CWE" else [] ) - db_mock.return_value.session.query.return_value.all.return_value = internal_ids - db_mock.return_value.get_CREs.side_effect = lambda internal_id=None, **kwargs: [ - next( - cre - for index, cre in enumerate(opencre_documents) - if internal_id == f"cre-internal-{index}" - ) - ] with self.app.test_client() as client: response = client.get( @@ -995,13 +991,19 @@ def test_gap_analysis_returns_only_direct_opencre_mappings_when_opencre_is_left( payload = json.loads(response.data) self.assertEqual(200, response.status_code) - self.assertEqual([direct_cre.id], list(payload["result"].keys())) + self.assertEqual( + sorted([direct_cre.id, indirect_cre.id]), + sorted(payload["result"].keys()), + ) self.assertEqual(1, len(payload["result"][direct_cre.id]["paths"])) path = next(iter(payload["result"][direct_cre.id]["paths"].values())) self.assertEqual(direct_cre.id, payload["result"][direct_cre.id]["start"]["id"]) self.assertEqual(compare.id, path["end"]["id"]) - self.assertEqual(direct_cre.id, path["path"][0]["start"]["id"]) - self.assertEqual(compare.id, path["path"][0]["end"]["id"]) + self.assertEqual("LINKED_TO", path["path"][0]["relationship"]) + auto_path = next(iter(payload["result"][indirect_cre.id]["paths"].values())) + self.assertEqual( + "AUTOMATICALLY_LINKED_TO", auto_path["path"][0]["relationship"] + ) schedule_mock.assert_not_called() @patch.object(cre_main, "resource_name_ga_eligible_in_db") diff --git a/application/utils/external_project_parsers/parsers/pci_dss.py b/application/utils/external_project_parsers/parsers/pci_dss.py index 51f681692..de0904578 100644 --- a/application/utils/external_project_parsers/parsers/pci_dss.py +++ b/application/utils/external_project_parsers/parsers/pci_dss.py @@ -1,7 +1,7 @@ from pprint import pprint import logging import os -from typing import Dict, Any +from typing import Dict, Any, List, Optional from application.database import db from application.defs import cre_defs as defs import re @@ -17,6 +17,129 @@ logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) +PCI_DSS_CRE_SIMILARITY_THRESHOLDS: tuple[float, ...] = tuple( + float(part.strip()) + for part in os.environ.get( + "PCI_DSS_CRE_SIMILARITY_THRESHOLDS", "0.55,0.45,0.35" + ).split(",") + if part.strip() +) +PCI_BRIDGE_STANDARDS: tuple[str, ...] = tuple( + part.strip() + for part in os.environ.get( + "PCI_DSS_BRIDGE_STANDARDS", + "NIST 800-53 v5,ISO 27001,ASVS,CWE", + ).split(",") + if part.strip() +) +PCI_BRIDGE_MIN_SIMILARITY = float( + os.environ.get("PCI_DSS_BRIDGE_MIN_SIMILARITY", "0.4") +) + + +class PciDssLinkError(Exception): + """Raised when one or more PCI DSS controls cannot be linked to a CRE.""" + + +def pci_control_embedding_text(control: defs.Standard) -> str: + """Text used for PCI→CRE similarity (avoid full Standard repr JSON noise).""" + return "\n".join( + part.strip() + for part in (control.sectionID, control.section, control.description) + if part and str(part).strip() + ) + + +def best_cre_via_bridge_standard( + cache: db.Node_collection, + control_embedding: List[float], + standard_name: str, + *, + min_similarity: float = PCI_BRIDGE_MIN_SIMILARITY, +) -> Optional[defs.CRE]: + """Pick the best CRE linked to ``standard_name`` by node embedding similarity.""" + import numpy as np + from scipy import sparse + from sklearn.metrics.pairwise import cosine_similarity + + if not control_embedding: + return None + + embedding_array = sparse.csr_matrix( + np.array(control_embedding, dtype=np.float64).reshape(1, -1) + ) + best_similarity = -1.0 + best_cre: Optional[defs.CRE] = None + + for node in cache.get_nodes(name=standard_name) or []: + node_embedding = cache.get_embeddings_for_doc(node) + if not node_embedding: + continue + node_array = sparse.csr_matrix( + np.array(node_embedding, dtype=np.float64).reshape(1, -1) + ) + similarity = float(cosine_similarity(embedding_array, node_array)[0][0]) + if similarity < min_similarity or similarity <= best_similarity: + continue + linked_cres = cache.find_cres_of_node(node) + if not linked_cres: + continue + cre = cache.get_cre_by_db_id(linked_cres[0].id) + if cre: + best_similarity = similarity + best_cre = cre + + if best_cre: + logger.info( + "PCI DSS bridge match via %s (similarity %.3f)", + standard_name, + best_similarity, + ) + return best_cre + + +def resolve_cre_for_pci_control( + prompt: prompt_client.PromptHandler, + cache: db.Node_collection, + control_embedding: List[float], +) -> Optional[defs.CRE]: + """Resolve a CRE for one PCI control using staged similarity + bridge fallbacks.""" + for threshold in PCI_DSS_CRE_SIMILARITY_THRESHOLDS: + match = prompt.get_id_of_most_similar_cre_paginated( + control_embedding, similarity_threshold=threshold + ) + if match and match[0]: + cre = cache.get_cre_by_db_id(match[0]) + if cre: + logger.info( + "PCI DSS CRE similarity match %.3f (threshold %s)", + match[1], + threshold, + ) + return cre + + for standard_name in PCI_BRIDGE_STANDARDS: + cre = best_cre_via_bridge_standard( + cache, control_embedding, standard_name + ) + if cre: + return cre + + standard_id = prompt.get_id_of_most_similar_node(control_embedding) + if standard_id: + nodes = cache.get_nodes(db_id=standard_id) + if nodes: + linked_cres = cache.find_cres_of_node(nodes[0]) + if linked_cres: + cre = cache.get_cre_by_db_id(linked_cres[0].id) + if cre: + logger.info( + "PCI DSS linked via global standard fallback (%s)", + nodes[0].name, + ) + return cre + return None + class PciDss(ParserInterface): name = "PCI DSS" @@ -70,6 +193,7 @@ def __parse( prompt = prompt_client.PromptHandler(cache) self._ensure_similarity_prereqs(cache, prompt) standard_entries = [] + unlinked_controls: list[str] = [] for row in pci_file.get(pci_file_tab): pci_control = defs.Standard( name=self.name, @@ -117,56 +241,40 @@ def __parse( f"Node {pci_control.todict()} already exists and has embeddings, skipping" ) - control_embeddings = prompt.get_text_embeddings(pci_control.__repr__()) + control_embeddings = prompt.get_text_embeddings( + pci_control_embedding_text(pci_control) + ) pci_control.embeddings = control_embeddings - pci_control.embeddings_text = pci_control.__repr__() - # these embeddings are different to the ones generated from --generate embeddings, this is because we want these embedding to include the optional "description" field, it is not a big difference and cosine similarity works reasonably accurately without it but good to have - cre = None - cre_id = prompt.get_id_of_most_similar_cre(control_embeddings) - if not cre_id: - logger.info( - f"could not find an appropriate CRE for pci {pci_control.section}, findings similarities with standards instead" - ) - standard_id = prompt.get_id_of_most_similar_node(control_embeddings) - if standard_id: - dbstandard = cache.get_nodes(db_id=standard_id) - if dbstandard: - logger.info( - "found an appropriate standard for pci %s, it is: %s", - pci_control.section, - dbstandard.section, - ) - cres = cache.find_cres_of_node(dbstandard) - if cres: - cre_id = cres[0].id - else: - logger.info( - "no standard record found for fallback standard id %s (pci section %s)", - standard_id, - pci_control.section, - ) - else: - logger.info( - "could not find a similar standard for pci %s; skipping fallback link", - pci_control.section, - ) - if cre_id: - cre = cache.get_cre_by_db_id(cre_id) - ctrl_copy = pci_control.shallow_copy() + pci_control.embeddings_text = pci_control_embedding_text(pci_control) + cre = resolve_cre_for_pci_control(prompt, cache, control_embeddings) pci_control.description = "" if cre: pci_control.add_link( defs.Link(document=cre, ltype=defs.LinkTypes.AutomaticallyLinkedTo) ) - pci_control.add_link( - defs.Link(ltype=defs.LinkTypes.AutomaticallyLinkedTo, document=cre) - ) logger.info(f"successfully stored {pci_control.__repr__()}") else: - logger.info( - f"stored pci control: {pci_control.__repr__()} but could not link it to any CRE reliably" + unlinked_controls.append( + f"{pci_control.sectionID}: {pci_control.section}" + ) + logger.error( + "PCI DSS control %s (%s) could not be linked to any CRE", + pci_control.sectionID, + pci_control.section, ) standard_entries.append(pci_control) + if unlinked_controls: + sample = unlinked_controls[:5] + extra = ( + f" (and {len(unlinked_controls) - len(sample)} more)" + if len(unlinked_controls) > len(sample) + else "" + ) + raise PciDssLinkError( + "PCI DSS import requires every control to link to a CRE; " + f"{len(unlinked_controls)} control(s) failed: " + f"{'; '.join(sample)}{extra}" + ) return standard_entries def parse_3_2(self, pci_file: Dict[str, Any], cache: db.Node_collection): diff --git a/application/utils/external_project_parsers/parsers/secure_headers.py b/application/utils/external_project_parsers/parsers/secure_headers.py index 384ef103e..78a7f1c59 100644 --- a/application/utils/external_project_parsers/parsers/secure_headers.py +++ b/application/utils/external_project_parsers/parsers/secure_headers.py @@ -1,12 +1,13 @@ # script to parse secure headers md files find the links to opencre.org and add the page to CRE -from pprint import pprint from typing import List -from application.database import db -from application.utils import git -from application.defs import cre_defs as defs +import logging import os import re from urllib.parse import urlparse, parse_qs + +from application.database import db +from application.defs import cre_defs as defs +from application.utils import git from application.utils.external_project_parsers import base_parser_defs from application.utils.external_project_parsers.base_parser_defs import ( ParserInterface, @@ -14,7 +15,21 @@ ) from application.prompt_client import prompt_client as prompt_client -# GENERIC Markdown file parser for self-contained links! when we have more projects using this setup add them in the list +logging.basicConfig() +logger = logging.getLogger(__name__) +logger.setLevel(logging.INFO) + +# GENERIC Markdown file parser + +# OWASP markdown may reference retired CRE ids; map to current OpenCRE ids. +LEGACY_CRE_ID_REMAP = { + # tab_bestpractices.md still links 403-005; corpus uses 743-110 for this topic. + "403-005": "743-110", +} + + +class SecureHeadersLinkError(Exception): + """Raised when a Secure Headers markdown CRE reference cannot be resolved.""" class SecureHeaders(ParserInterface): @@ -35,6 +50,32 @@ def entry(self, section: str, hyperlink: str, tags: List[str]) -> defs.Standard: hyperlink=hyperlink, ) + def resolve_cre_external_id( + self, cache: db.Node_collection, external_id: str + ) -> tuple[list[defs.CRE], str]: + candidates = [external_id] + remapped = LEGACY_CRE_ID_REMAP.get(external_id) + if remapped and remapped not in candidates: + candidates.append(remapped) + for candidate in candidates: + cres = cache.get_CREs(external_id=candidate) + if cres: + if candidate != external_id: + logger.info( + "Secure Headers remapped stale CRE id %s -> %s", + external_id, + candidate, + ) + return cres, candidate + raise SecureHeadersLinkError( + f"Secure Headers markdown references unknown CRE id {external_id!r}" + + ( + f" (also tried remap {remapped!r})" + if remapped + else "" + ) + ) + def parse(self, cache: db.Node_collection, ph: prompt_client.PromptHandler): sh_repo = "https://github.com/owasp/www-project-secure-headers.git" file_path = "./" @@ -56,36 +97,42 @@ def register_headers(self, cache: db.Node_collection, repo, file_path, repo_path entries = [] for path, _, files in os.walk(repo.working_dir): for mdfile in files: + if not mdfile.endswith(".md"): + continue pth = os.path.join(path, mdfile) if not os.path.isfile(pth): continue - with open(pth) as mdf: - mdtext = mdf.read() + try: + with open(pth, encoding="utf-8") as mdf: + mdtext = mdf.read() + except UnicodeDecodeError: + logger.warning("Skipping non-UTF-8 markdown file: %s", pth) + continue - if "opencre.org" not in mdtext: - continue - links = re.finditer(cre_link, mdtext, re.MULTILINE) - for cre in links: - if cre: - parsed = urlparse(cre.group("url")) - creID = cre.group("creID") - queries = parse_qs(parsed.query) - name = queries.get("name") - section = queries.get("section") - link = queries.get("link") - cres = cache.get_CREs(external_id=creID) - cs = self.entry( - section=section[0] if section else "", - hyperlink=link[0] if link else "", - tags=[], + if "opencre.org" not in mdtext: + continue + links = re.finditer(cre_link, mdtext, re.MULTILINE) + for cre in links: + parsed = urlparse(cre.group("url")) + creID = cre.group("creID") + queries = parse_qs(parsed.query) + section = queries.get("section") + link = queries.get("link") + cres, _resolved_id = self.resolve_cre_external_id( + cache, creID + ) + cs = self.entry( + section=section[0] if section else "", + hyperlink=link[0] if link else "", + tags=[], + ) + for dbcre in cres: + cs.add_link( + defs.Link( + document=dbcre, + ltype=defs.LinkTypes.AutomaticallyLinkedTo, ) - for dbcre in cres: - cs.add_link( - defs.Link( - document=dbcre, - ltype=defs.LinkTypes.AutomaticallyLinkedTo, - ) - ) + ) entries.append(cs) return entries diff --git a/application/utils/gap_analysis.py b/application/utils/gap_analysis.py index 01137013e..feb590e8b 100644 --- a/application/utils/gap_analysis.py +++ b/application/utils/gap_analysis.py @@ -22,6 +22,11 @@ } GAP_ANALYSIS_TIMEOUT = "129600s" # 36 hours +OPENCRE_STANDARD_NAME = "OpenCRE" +OPENCRE_OVERLAP_LINK_TYPES = ( + defs.LinkTypes.LinkedTo, + defs.LinkTypes.AutomaticallyLinkedTo, +) def make_resources_key(array: List[str]): @@ -111,6 +116,168 @@ def get_next_id(step, previous_id): return step["start"].id +def _link_type_to_path_relationship(ltype: defs.LinkTypes) -> str: + if ltype == defs.LinkTypes.AutomaticallyLinkedTo: + return "AUTOMATICALLY_LINKED_TO" + return "LINKED_TO" + + +def _opencre_overlap_link_sort_key(link: defs.Link) -> int: + if link.ltype == defs.LinkTypes.LinkedTo: + return 0 + if link.ltype == defs.LinkTypes.AutomaticallyLinkedTo: + return 1 + return 2 + + +def _build_direct_link_path( + start_document: defs.Document, + end_document: defs.Document, + *, + ltype: defs.LinkTypes = defs.LinkTypes.LinkedTo, +) -> Dict[str, Any]: + segment_start = start_document.shallow_copy() + if segment_start.doctype != defs.Credoctypes.CRE.value: + segment_start.id = "" + return { + "end": end_document.shallow_copy(), + "path": [ + { + "start": segment_start, + "end": end_document.shallow_copy(), + "relationship": _link_type_to_path_relationship(ltype), + "score": 0, + } + ], + "score": 0, + } + + +def _add_direct_link_result( + grouped_paths: Dict[str, Dict[str, Any]], + start_document: defs.Document, + end_document: defs.Document, + *, + ltype: defs.LinkTypes = defs.LinkTypes.LinkedTo, +) -> None: + shared_paths = grouped_paths.setdefault( + start_document.id, + { + "start": start_document.shallow_copy(), + "paths": {}, + "extra": 0, + }, + )["paths"] + path_key = end_document.id + if path_key in shared_paths: + return + shared_paths[path_key] = _build_direct_link_path( + start_document, end_document, ltype=ltype + ) + + +def build_direct_cre_overlap_map_analysis( + standards: List[str], + standards_hash: str, + collection: Any, +) -> Optional[Dict[str, Any]]: + """Compute one-step OpenCRE links (manual and automatic) for a standard pair.""" + if len(standards) < 2: + return None + + base_standard = standards[0] + compare_standard = standards[1] + base_is_opencre = base_standard == OPENCRE_STANDARD_NAME + compare_is_opencre = compare_standard == OPENCRE_STANDARD_NAME + if not base_is_opencre and not compare_is_opencre: + return None + + standard_name = compare_standard if base_is_opencre else base_standard + standard_nodes = collection.get_nodes(name=standard_name) + if not standard_nodes: + return None + + grouped_paths: Dict[str, Dict[str, Any]] = {} + for standard_node in standard_nodes: + cre_links = [ + link + for link in (standard_node.links or []) + if link.ltype in OPENCRE_OVERLAP_LINK_TYPES + and link.document.doctype == defs.Credoctypes.CRE.value + ] + for link in sorted(cre_links, key=_opencre_overlap_link_sort_key): + linked_document = link.document + if base_is_opencre: + _add_direct_link_result( + grouped_paths, + linked_document, + standard_node, + ltype=link.ltype, + ) + else: + _add_direct_link_result( + grouped_paths, + standard_node, + linked_document, + ltype=link.ltype, + ) + + if not grouped_paths: + return None + + result = {"result": grouped_paths} + collection.add_gap_analysis_result( + cache_key=standards_hash, ga_object=flask_json.dumps(result) + ) + return result + + +def opencre_direct_pairs(standard_names: List[str]) -> List[List[str]]: + """Directed OpenCRE pairs for every real standard name.""" + pairs: List[List[str]] = [] + for name in sorted({str(s).strip() for s in standard_names if str(s).strip()}): + if name == OPENCRE_STANDARD_NAME: + continue + pairs.append([OPENCRE_STANDARD_NAME, name]) + pairs.append([name, OPENCRE_STANDARD_NAME]) + return pairs + + +def missing_opencre_direct_pairs(collection: Any) -> List[List[str]]: + missing: List[List[str]] = [] + for pair in opencre_direct_pairs(collection.standards()): + cache_key = make_resources_key(pair) + if not collection.gap_analysis_exists(cache_key): + missing.append(pair) + return missing + + +def backfill_opencre_direct_pairs(collection: Any, *, refresh: bool = False) -> int: + """Populate SQL cache rows for OpenCRE map analysis pairs (manual + automatic links).""" + pairs = opencre_direct_pairs(collection.standards()) + if refresh: + todo = pairs + logger.info("OpenCRE direct GA backfill: refreshing all pairs=%s", len(todo)) + else: + todo = missing_opencre_direct_pairs(collection) + if not todo: + logger.info("OpenCRE direct GA backfill: no missing pairs") + return 0 + logger.info("OpenCRE direct GA backfill: missing_pairs=%s", len(todo)) + + written = 0 + for pair in todo: + cache_key = make_resources_key(pair) + if build_direct_cre_overlap_map_analysis(pair, cache_key, collection): + written += 1 + logger.info( + "OpenCRE direct GA backfill: wrote=%s remaining=%s", + written, + len(missing_opencre_direct_pairs(collection)), + ) + return written + + def perform(standards: List[str], database): return run_gap_pair(standards[0], standards[1], database) diff --git a/application/web/web_main.py b/application/web/web_main.py index 530a917be..5baeb8c0a 100644 --- a/application/web/web_main.py +++ b/application/web/web_main.py @@ -48,7 +48,7 @@ ITEMS_PER_PAGE = 20 -OPENCRE_STANDARD_NAME = "OpenCRE" +OPENCRE_STANDARD_NAME = gap_analysis.OPENCRE_STANDARD_NAME app = Blueprint( "web", @@ -303,116 +303,6 @@ def find_document_by_tag() -> Any: abort(404, "Tag does not exist") -def _get_opencre_documents(collection: db.Node_collection) -> list[defs.CRE]: - return [ - collection.get_CREs(internal_id=cre.id)[0] - for cre in collection.session.query(db.CRE).all() - ] - - -def _get_map_analysis_documents( - standard: str, collection: db.Node_collection -) -> list[defs.Document]: - if standard == OPENCRE_STANDARD_NAME: - return _get_opencre_documents(collection) - return collection.get_nodes(name=standard) - - -def _build_direct_link_path( - start_document: defs.Document, end_document: defs.Document -) -> dict[str, Any]: - segment_start = start_document.shallow_copy() - # The current gap-analysis popup mutates non-CRE row ids during display - # before it resolves the one-step direct path. Keep this direct-link fast - # path compatible by mirroring that display-only shape in the segment start. - if segment_start.doctype != defs.Credoctypes.CRE.value: - segment_start.id = "" - return { - "end": end_document.shallow_copy(), - "path": [ - { - "start": segment_start, - "end": end_document.shallow_copy(), - "relationship": "LINKED_TO", - "score": 0, - } - ], - "score": 0, - } - - -def _make_direct_link_path_key(end_document: defs.Document) -> str: - return end_document.id - - -def _add_direct_link_result( - grouped_paths: dict[str, dict[str, Any]], - start_document: defs.Document, - end_document: defs.Document, -) -> None: - shared_paths = grouped_paths.setdefault( - start_document.id, - { - "start": start_document.shallow_copy(), - "paths": {}, - "extra": 0, - }, - )["paths"] - shared_paths.setdefault( - _make_direct_link_path_key(end_document), - _build_direct_link_path(start_document, end_document), - ) - - -def _build_direct_cre_overlap_map_analysis( - standards: list[str], - standards_hash: str, - collection: db.Node_collection, -) -> dict[str, Any] | None: - if len(standards) < 2: - return None - - base_standard = standards[0] - compare_standard = standards[1] - base_nodes = _get_map_analysis_documents(base_standard, collection) - compare_nodes = _get_map_analysis_documents(compare_standard, collection) - if not base_nodes or not compare_nodes: - return None - - base_is_opencre = base_standard == OPENCRE_STANDARD_NAME - opencre_nodes = base_nodes if base_is_opencre else compare_nodes - standard_nodes = compare_nodes if base_is_opencre else base_nodes - - standard_nodes_by_id = { - standard_node.id: standard_node for standard_node in standard_nodes - } - direct_pairs: list[tuple[defs.CRE, defs.Document]] = [] - for opencre_node in opencre_nodes: - for link in opencre_node.links: - if link.ltype != defs.LinkTypes.LinkedTo: - continue - standard_node = standard_nodes_by_id.get(link.document.id) - if not standard_node: - continue - direct_pairs.append((opencre_node, standard_node)) - - grouped_paths: dict[str, dict[str, Any]] = {} - for opencre_node, standard_node in direct_pairs: - if base_is_opencre: - _add_direct_link_result(grouped_paths, opencre_node, standard_node) - else: - _add_direct_link_result(grouped_paths, standard_node, opencre_node) - - if not grouped_paths: - return None - - result = {"result": grouped_paths} - collection.add_gap_analysis_result( - cache_key=standards_hash, ga_object=flask_json.dumps(result) - ) - return result - - @app.route("/rest/v1/map_analysis", methods=["GET"]) def map_analysis() -> Any: standards = request.args.getlist("standard") @@ -435,7 +325,7 @@ def map_analysis() -> Any: return jsonify({"result": parsed.get("result")}) if _is_heroku_deploy(): abort(404, "No such Cache") - direct_gap_analysis = _build_direct_cre_overlap_map_analysis( + direct_gap_analysis = gap_analysis.build_direct_cre_overlap_map_analysis( standards, standards_hash, database ) if direct_gap_analysis: diff --git a/cre.py b/cre.py index 80dd48617..559e595e4 100644 --- a/cre.py +++ b/cre.py @@ -224,6 +224,11 @@ def main() -> None: default="", help="preload map analysis for all possible 2 standards combinations, use target url as an OpenCRE base", ) + parser.add_argument( + "--ga_backfill_opencre_direct", + action="store_true", + help="refresh OpenCRE map-analysis cache rows (manual + automatic CRE links)", + ) parser.add_argument( "--ga_backfill_missing", action="store_true", diff --git a/scripts/compute_pci_dss_cre_mappings.py b/scripts/compute_pci_dss_cre_mappings.py new file mode 100644 index 000000000..e29f34c69 --- /dev/null +++ b/scripts/compute_pci_dss_cre_mappings.py @@ -0,0 +1,208 @@ +#!/usr/bin/env python3 +""" +Compute PCI DSS v4 control → CRE mappings using Gemini embeddings + staged similarity. + +Reads the public PCI DSS spreadsheet CSV, embeds each control, and resolves CRE links +using the same logic as application/utils/external_project_parsers/parsers/pci_dss.py. + +Usage: + python scripts/compute_pci_dss_cre_mappings.py \\ + --cache-file standards_cache.sqlite \\ + --output data/pci_dss_cre_mappings.json +""" + +from __future__ import annotations + +import argparse +import csv +import io +import json +import logging +import os +import sys +import time +import urllib.request +from typing import Any, Dict, List, Optional + +try: + from dotenv import load_dotenv + + load_dotenv() +except ImportError: + pass + +# Repo root on sys.path when invoked as a script. +_REPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +if _REPO_ROOT not in sys.path: + sys.path.insert(0, _REPO_ROOT) + +from application.cmd.cre_main import db_connect # noqa: E402 +from application.defs import cre_defs as defs # noqa: E402 +from application.prompt_client import prompt_client # noqa: E402 +from application.utils.external_project_parsers.parsers.pci_dss import ( # noqa: E402 + PCI_BRIDGE_STANDARDS, + PCI_DSS_CRE_SIMILARITY_THRESHOLDS, + best_cre_via_bridge_standard, + pci_control_embedding_text, +) + +PCI_SHEET_CSV_URL = ( + "https://docs.google.com/spreadsheets/d/" + "18weo-qbik_C7SdYq7FSP2OMgUmsWdWWI1eaXcAfMz8I/export?format=csv" +) + +logger = logging.getLogger(__name__) + + +def _configure_llm_env() -> None: + embed_model = os.environ.get("CRE_EMBED_MODEL") + if not embed_model: + vertex_embed = os.environ.get("VERTEX_EMBED_CONTENT_MODEL", "gemini-embedding-001") + os.environ["CRE_EMBED_MODEL"] = f"gemini/{vertex_embed}" + os.environ.setdefault("CRE_EMBED_EXPECTED_DIM", "3072") + os.environ.setdefault("CRE_VALIDATE_EMBED_DIM_ON_INIT", "0") + + +def fetch_pci_rows(url: str = PCI_SHEET_CSV_URL) -> List[Dict[str, str]]: + with urllib.request.urlopen(url, timeout=120) as resp: + raw = resp.read().decode("utf-8-sig") + reader = csv.DictReader(io.StringIO(raw)) + rows = [row for row in reader if (row.get("PCI DSS ID") or "").strip()] + if not rows: + raise RuntimeError(f"no PCI rows found at {url}") + return rows + + +def resolve_with_method( + prompt: prompt_client.PromptHandler, + cache, + control_embedding: List[float], +) -> tuple[Optional[defs.CRE], str, Optional[float]]: + for threshold in PCI_DSS_CRE_SIMILARITY_THRESHOLDS: + match = prompt.get_id_of_most_similar_cre_paginated( + control_embedding, similarity_threshold=threshold + ) + if match and match[0]: + cre = cache.get_cre_by_db_id(match[0]) + if cre: + return cre, f"cre_similarity>={threshold}", float(match[1]) + + for standard_name in PCI_BRIDGE_STANDARDS: + cre = best_cre_via_bridge_standard(cache, control_embedding, standard_name) + if cre: + return cre, f"bridge:{standard_name}", None + + standard_id = prompt.get_id_of_most_similar_node(control_embedding) + if standard_id: + nodes = cache.get_nodes(db_id=standard_id) + if nodes: + linked_cres = cache.find_cres_of_node(nodes[0]) + if linked_cres: + cre = cache.get_cre_by_db_id(linked_cres[0].id) + if cre: + return cre, f"global_standard:{nodes[0].name}", None + return None, "unlinked", None + + +def compute_mappings( + cache, + rows: List[Dict[str, str]], + *, + limit: Optional[int] = None, +) -> List[Dict[str, Any]]: + prompt = prompt_client.PromptHandler(cache) + mappings: List[Dict[str, Any]] = [] + total = len(rows) if limit is None else min(limit, len(rows)) + + for index, row in enumerate(rows[:total], start=1): + section_id = str(row.get("PCI DSS ID", "")).strip() + section = str(row.get("Defined Approach Requirements", "")).strip() + description = str(row.get("Requirement Description", "") or row.get("Guidance", "")).strip() + control = defs.Standard( + name="PCI DSS", + sectionID=section_id, + section=section, + description=description, + version="4", + ) + if control.section.startswith(control.sectionID): + control.section = control.section[len(control.sectionID) :].strip() + + embedding_text = pci_control_embedding_text(control) + t0 = time.time() + embedding = prompt.get_text_embeddings(embedding_text) + cre, method, similarity = resolve_with_method(prompt, cache, embedding) + elapsed = time.time() - t0 + + entry: Dict[str, Any] = { + "pci_dss_id": section_id, + "section": control.section, + "cre_id": cre.id if cre else None, + "cre_name": cre.name if cre else None, + "method": method, + "similarity": similarity, + "elapsed_seconds": round(elapsed, 2), + } + mappings.append(entry) + status = cre.id if cre else "UNLINKED" + logger.info("[%s/%s] %s -> %s (%s)", index, total, section_id, status, method) + + return mappings + + +def main() -> int: + parser = argparse.ArgumentParser(description="Compute PCI DSS → CRE mappings") + parser.add_argument( + "--cache-file", + default=os.environ.get("CRE_CACHE_FILE", os.path.join(_REPO_ROOT, "standards_cache.sqlite")), + ) + parser.add_argument( + "--output", + default=os.path.join(_REPO_ROOT, "data", "pci_dss_cre_mappings.json"), + ) + parser.add_argument("--sheet-url", default=PCI_SHEET_CSV_URL) + parser.add_argument("--limit", type=int, default=None, help="process only first N controls") + args = parser.parse_args() + + logging.basicConfig(level=logging.INFO, format="%(levelname)s:%(name)s:%(message)s") + _configure_llm_env() + + rows = fetch_pci_rows(args.sheet_url) + logger.info("loaded %s PCI DSS controls from spreadsheet", len(rows)) + + cache = db_connect(path=args.cache_file) + mappings = compute_mappings(cache, rows, limit=args.limit) + + linked = [m for m in mappings if m["cre_id"]] + unlinked = [m for m in mappings if not m["cre_id"]] + summary = { + "total": len(mappings), + "linked": len(linked), + "unlinked": len(unlinked), + "unlinked_ids": [m["pci_dss_id"] for m in unlinked], + "thresholds": list(PCI_DSS_CRE_SIMILARITY_THRESHOLDS), + "bridge_standards": list(PCI_BRIDGE_STANDARDS), + "embed_model": os.environ.get("CRE_EMBED_MODEL"), + } + payload = {"summary": summary, "mappings": mappings} + + os.makedirs(os.path.dirname(args.output) or ".", exist_ok=True) + with open(args.output, "w", encoding="utf-8") as handle: + json.dump(payload, handle, indent=2) + handle.write("\n") + + logger.info( + "wrote %s mappings to %s (%s linked, %s unlinked)", + len(mappings), + args.output, + len(linked), + len(unlinked), + ) + if unlinked: + logger.error("unlinked controls: %s", ", ".join(summary["unlinked_ids"][:10])) + return 1 + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) From 44337b9f8b0cff6588921fffc67a5fe5f279d28d Mon Sep 17 00:00:00 2001 From: Spyros Date: Sat, 6 Jun 2026 02:14:52 +0300 Subject: [PATCH 11/37] Address CodeRabbit review and fix black formatting Harden PCI env parsing, tighten sync script safety checks, make bridge fallback tests deterministic, and format files flagged by CI black. Co-authored-by: Cursor --- .../tests/opencre_gap_analysis_test.py | 12 ++-- application/tests/pci_dss_parser_test.py | 2 +- .../tests/secure_headers_parser_test.py | 18 +++--- .../parsers/pci_dss.py | 61 +++++++++++++------ .../parsers/secure_headers.py | 10 +-- scripts/compute_pci_dss_cre_mappings.py | 16 +++-- 6 files changed, 72 insertions(+), 47 deletions(-) diff --git a/application/tests/opencre_gap_analysis_test.py b/application/tests/opencre_gap_analysis_test.py index c87902b8a..7ee71575b 100644 --- a/application/tests/opencre_gap_analysis_test.py +++ b/application/tests/opencre_gap_analysis_test.py @@ -25,7 +25,9 @@ def setUp(self) -> None: sqla.create_all() self.collection = db.Node_collection() - def test_backfill_populates_secure_headers_pair_from_auto_linked_nodes(self) -> None: + def test_backfill_populates_secure_headers_pair_from_auto_linked_nodes( + self, + ) -> None: cre = self.collection.add_cre( defs.CRE( id="636-347", @@ -54,17 +56,13 @@ def test_backfill_populates_secure_headers_pair_from_auto_linked_nodes(self) -> payload = json.loads(self.collection.get_gap_analysis_result(cache_key)) self.assertIn("636-347", payload["result"]) path = next(iter(payload["result"]["636-347"]["paths"].values())) - self.assertEqual( - "AUTOMATICALLY_LINKED_TO", path["path"][0]["relationship"] - ) + self.assertEqual("AUTOMATICALLY_LINKED_TO", path["path"][0]["relationship"]) @patch( "application.utils.gap_analysis.build_direct_cre_overlap_map_analysis", return_value={"result": {"x": {}}}, ) - def test_backfill_refresh_recomputes_cached_pairs( - self, build_mock: Mock - ) -> None: + def test_backfill_refresh_recomputes_cached_pairs(self, build_mock: Mock) -> None: collection = Mock() collection.standards.return_value = ["ASVS"] diff --git a/application/tests/pci_dss_parser_test.py b/application/tests/pci_dss_parser_test.py index 69691d70e..01815e5b9 100644 --- a/application/tests/pci_dss_parser_test.py +++ b/application/tests/pci_dss_parser_test.py @@ -45,7 +45,7 @@ def test_resolve_cre_falls_back_to_bridge_standard(self) -> None: prompt.get_id_of_most_similar_cre_paginated.return_value = (None, None) bridge_cre = defs.CRE(id="999-001", name="Bridge CRE", description="") - with patch.object( + with patch.object(pci_mod, "PCI_BRIDGE_STANDARDS", ("S1", "S2")), patch.object( pci_mod, "best_cre_via_bridge_standard", side_effect=[None, bridge_cre] ) as bridge_mock: cre = resolve_cre_for_pci_control(prompt, cache, [0.1, 0.2]) diff --git a/application/tests/secure_headers_parser_test.py b/application/tests/secure_headers_parser_test.py index a262e2a7a..1acb82219 100644 --- a/application/tests/secure_headers_parser_test.py +++ b/application/tests/secure_headers_parser_test.py @@ -48,11 +48,7 @@ class Repo: name="Secure Headers", hyperlink="https://example.com/foo/bar", section="headerAsection", - links=[ - defs.Link( - document=cre, ltype=defs.LinkTypes.AutomaticallyLinkedTo - ) - ], + links=[defs.Link(document=cre, ltype=defs.LinkTypes.AutomaticallyLinkedTo)], tags=[ "family:guidance", "subtype:cheatsheet", @@ -69,7 +65,9 @@ class Repo: self.assertCountEqual(expected.todict(), nodes[0].todict()) @patch.object(git, "clone") - def test_register_headers_creates_one_entry_per_opencre_link(self, mock_clone) -> None: + def test_register_headers_creates_one_entry_per_opencre_link( + self, mock_clone + ) -> None: class Repo: working_dir = "" @@ -96,10 +94,12 @@ class Repo: ) nodes = entries.results[secure_headers.SecureHeaders().name] self.assertEqual(2, len(nodes)) - self.assertEqual({"First", "Second"}, {node.section for node in nodes}) self.assertEqual( - {"636-347", "743-110"}, - {node.links[0].document.id for node in nodes}, + { + "First": "636-347", + "Second": "743-110", + }, + {node.section: node.links[0].document.id for node in nodes}, ) @patch.object(git, "clone") diff --git a/application/utils/external_project_parsers/parsers/pci_dss.py b/application/utils/external_project_parsers/parsers/pci_dss.py index de0904578..33884436e 100644 --- a/application/utils/external_project_parsers/parsers/pci_dss.py +++ b/application/utils/external_project_parsers/parsers/pci_dss.py @@ -17,23 +17,50 @@ logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) -PCI_DSS_CRE_SIMILARITY_THRESHOLDS: tuple[float, ...] = tuple( - float(part.strip()) - for part in os.environ.get( - "PCI_DSS_CRE_SIMILARITY_THRESHOLDS", "0.55,0.45,0.35" - ).split(",") - if part.strip() +_DEFAULT_PCI_DSS_CRE_SIMILARITY_THRESHOLDS = (0.55, 0.45, 0.35) +_DEFAULT_PCI_BRIDGE_STANDARDS = ("NIST 800-53 v5", "ISO 27001", "ASVS", "CWE") +_DEFAULT_PCI_BRIDGE_MIN_SIMILARITY = 0.4 + + +def _parse_float_env(name: str, default: float) -> float: + raw = os.environ.get(name, "").strip() + if not raw: + return default + try: + return float(raw) + except ValueError: + logger.warning("Invalid %s=%r; using default %s", name, raw, default) + return default + + +def _parse_float_tuple_env(name: str, default: tuple[float, ...]) -> tuple[float, ...]: + raw = os.environ.get(name, "").strip() + if not raw: + return default + try: + values = tuple(float(part.strip()) for part in raw.split(",") if part.strip()) + except ValueError: + logger.warning("Invalid %s=%r; using defaults %s", name, raw, default) + return default + return values or default + + +def _parse_str_tuple_env(name: str, default: tuple[str, ...]) -> tuple[str, ...]: + raw = os.environ.get(name, "").strip() + if not raw: + return default + values = tuple(part.strip() for part in raw.split(",") if part.strip()) + return values or default + + +PCI_DSS_CRE_SIMILARITY_THRESHOLDS = _parse_float_tuple_env( + "PCI_DSS_CRE_SIMILARITY_THRESHOLDS", _DEFAULT_PCI_DSS_CRE_SIMILARITY_THRESHOLDS ) -PCI_BRIDGE_STANDARDS: tuple[str, ...] = tuple( - part.strip() - for part in os.environ.get( - "PCI_DSS_BRIDGE_STANDARDS", - "NIST 800-53 v5,ISO 27001,ASVS,CWE", - ).split(",") - if part.strip() +PCI_BRIDGE_STANDARDS = _parse_str_tuple_env( + "PCI_DSS_BRIDGE_STANDARDS", _DEFAULT_PCI_BRIDGE_STANDARDS ) -PCI_BRIDGE_MIN_SIMILARITY = float( - os.environ.get("PCI_DSS_BRIDGE_MIN_SIMILARITY", "0.4") +PCI_BRIDGE_MIN_SIMILARITY = _parse_float_env( + "PCI_DSS_BRIDGE_MIN_SIMILARITY", _DEFAULT_PCI_BRIDGE_MIN_SIMILARITY ) @@ -119,9 +146,7 @@ def resolve_cre_for_pci_control( return cre for standard_name in PCI_BRIDGE_STANDARDS: - cre = best_cre_via_bridge_standard( - cache, control_embedding, standard_name - ) + cre = best_cre_via_bridge_standard(cache, control_embedding, standard_name) if cre: return cre diff --git a/application/utils/external_project_parsers/parsers/secure_headers.py b/application/utils/external_project_parsers/parsers/secure_headers.py index 78a7f1c59..4148f3943 100644 --- a/application/utils/external_project_parsers/parsers/secure_headers.py +++ b/application/utils/external_project_parsers/parsers/secure_headers.py @@ -69,11 +69,7 @@ def resolve_cre_external_id( return cres, candidate raise SecureHeadersLinkError( f"Secure Headers markdown references unknown CRE id {external_id!r}" - + ( - f" (also tried remap {remapped!r})" - if remapped - else "" - ) + + (f" (also tried remap {remapped!r})" if remapped else "") ) def parse(self, cache: db.Node_collection, ph: prompt_client.PromptHandler): @@ -119,9 +115,7 @@ def register_headers(self, cache: db.Node_collection, repo, file_path, repo_path queries = parse_qs(parsed.query) section = queries.get("section") link = queries.get("link") - cres, _resolved_id = self.resolve_cre_external_id( - cache, creID - ) + cres, _resolved_id = self.resolve_cre_external_id(cache, creID) cs = self.entry( section=section[0] if section else "", hyperlink=link[0] if link else "", diff --git a/scripts/compute_pci_dss_cre_mappings.py b/scripts/compute_pci_dss_cre_mappings.py index e29f34c69..eb8f5e7a8 100644 --- a/scripts/compute_pci_dss_cre_mappings.py +++ b/scripts/compute_pci_dss_cre_mappings.py @@ -57,7 +57,9 @@ def _configure_llm_env() -> None: embed_model = os.environ.get("CRE_EMBED_MODEL") if not embed_model: - vertex_embed = os.environ.get("VERTEX_EMBED_CONTENT_MODEL", "gemini-embedding-001") + vertex_embed = os.environ.get( + "VERTEX_EMBED_CONTENT_MODEL", "gemini-embedding-001" + ) os.environ["CRE_EMBED_MODEL"] = f"gemini/{vertex_embed}" os.environ.setdefault("CRE_EMBED_EXPECTED_DIM", "3072") os.environ.setdefault("CRE_VALIDATE_EMBED_DIM_ON_INIT", "0") @@ -117,7 +119,9 @@ def compute_mappings( for index, row in enumerate(rows[:total], start=1): section_id = str(row.get("PCI DSS ID", "")).strip() section = str(row.get("Defined Approach Requirements", "")).strip() - description = str(row.get("Requirement Description", "") or row.get("Guidance", "")).strip() + description = str( + row.get("Requirement Description", "") or row.get("Guidance", "") + ).strip() control = defs.Standard( name="PCI DSS", sectionID=section_id, @@ -154,14 +158,18 @@ def main() -> int: parser = argparse.ArgumentParser(description="Compute PCI DSS → CRE mappings") parser.add_argument( "--cache-file", - default=os.environ.get("CRE_CACHE_FILE", os.path.join(_REPO_ROOT, "standards_cache.sqlite")), + default=os.environ.get( + "CRE_CACHE_FILE", os.path.join(_REPO_ROOT, "standards_cache.sqlite") + ), ) parser.add_argument( "--output", default=os.path.join(_REPO_ROOT, "data", "pci_dss_cre_mappings.json"), ) parser.add_argument("--sheet-url", default=PCI_SHEET_CSV_URL) - parser.add_argument("--limit", type=int, default=None, help="process only first N controls") + parser.add_argument( + "--limit", type=int, default=None, help="process only first N controls" + ) args = parser.parse_args() logging.basicConfig(level=logging.INFO, format="%(levelname)s:%(name)s:%(message)s") From 2e428cd54183ee9c1299545fe6f3a6f576ffc2b2 Mon Sep 17 00:00:00 2001 From: Spyros Date: Thu, 11 Jun 2026 13:30:40 +0300 Subject: [PATCH 12/37] Add docstrings to satisfy CodeRabbit coverage on PR #918. Co-authored-by: Cursor --- .../utils/external_project_parsers/parsers/pci_dss.py | 3 +++ .../utils/external_project_parsers/parsers/secure_headers.py | 1 + application/utils/gap_analysis.py | 5 +++++ scripts/compute_pci_dss_cre_mappings.py | 5 +++++ 4 files changed, 14 insertions(+) diff --git a/application/utils/external_project_parsers/parsers/pci_dss.py b/application/utils/external_project_parsers/parsers/pci_dss.py index 33884436e..555404b3a 100644 --- a/application/utils/external_project_parsers/parsers/pci_dss.py +++ b/application/utils/external_project_parsers/parsers/pci_dss.py @@ -23,6 +23,7 @@ def _parse_float_env(name: str, default: float) -> float: + """Read a float from an environment variable, falling back on invalid values.""" raw = os.environ.get(name, "").strip() if not raw: return default @@ -34,6 +35,7 @@ def _parse_float_env(name: str, default: float) -> float: def _parse_float_tuple_env(name: str, default: tuple[float, ...]) -> tuple[float, ...]: + """Read a comma-separated float tuple from env, falling back on invalid values.""" raw = os.environ.get(name, "").strip() if not raw: return default @@ -46,6 +48,7 @@ def _parse_float_tuple_env(name: str, default: tuple[float, ...]) -> tuple[float def _parse_str_tuple_env(name: str, default: tuple[str, ...]) -> tuple[str, ...]: + """Read a comma-separated string tuple from env, falling back when empty.""" raw = os.environ.get(name, "").strip() if not raw: return default diff --git a/application/utils/external_project_parsers/parsers/secure_headers.py b/application/utils/external_project_parsers/parsers/secure_headers.py index 4148f3943..d21f42112 100644 --- a/application/utils/external_project_parsers/parsers/secure_headers.py +++ b/application/utils/external_project_parsers/parsers/secure_headers.py @@ -53,6 +53,7 @@ def entry(self, section: str, hyperlink: str, tags: List[str]) -> defs.Standard: def resolve_cre_external_id( self, cache: db.Node_collection, external_id: str ) -> tuple[list[defs.CRE], str]: + """Resolve a markdown CRE id, applying legacy remaps when needed.""" candidates = [external_id] remapped = LEGACY_CRE_ID_REMAP.get(external_id) if remapped and remapped not in candidates: diff --git a/application/utils/gap_analysis.py b/application/utils/gap_analysis.py index feb590e8b..2c9099c9a 100644 --- a/application/utils/gap_analysis.py +++ b/application/utils/gap_analysis.py @@ -117,12 +117,14 @@ def get_next_id(step, previous_id): def _link_type_to_path_relationship(ltype: defs.LinkTypes) -> str: + """Map a link type to the path relationship label stored in GA cache rows.""" if ltype == defs.LinkTypes.AutomaticallyLinkedTo: return "AUTOMATICALLY_LINKED_TO" return "LINKED_TO" def _opencre_overlap_link_sort_key(link: defs.Link) -> int: + """Prefer manual CRE links over automatic links when ordering overlap paths.""" if link.ltype == defs.LinkTypes.LinkedTo: return 0 if link.ltype == defs.LinkTypes.AutomaticallyLinkedTo: @@ -136,6 +138,7 @@ def _build_direct_link_path( *, ltype: defs.LinkTypes = defs.LinkTypes.LinkedTo, ) -> Dict[str, Any]: + """Build a single-hop GA path between two documents with the given link type.""" segment_start = start_document.shallow_copy() if segment_start.doctype != defs.Credoctypes.CRE.value: segment_start.id = "" @@ -160,6 +163,7 @@ def _add_direct_link_result( *, ltype: defs.LinkTypes = defs.LinkTypes.LinkedTo, ) -> None: + """Insert one direct link path into grouped GA results, skipping duplicates.""" shared_paths = grouped_paths.setdefault( start_document.id, { @@ -244,6 +248,7 @@ def opencre_direct_pairs(standard_names: List[str]) -> List[List[str]]: def missing_opencre_direct_pairs(collection: Any) -> List[List[str]]: + """Return OpenCRE-directed standard pairs that are not yet cached.""" missing: List[List[str]] = [] for pair in opencre_direct_pairs(collection.standards()): cache_key = make_resources_key(pair) diff --git a/scripts/compute_pci_dss_cre_mappings.py b/scripts/compute_pci_dss_cre_mappings.py index eb8f5e7a8..49669f9ed 100644 --- a/scripts/compute_pci_dss_cre_mappings.py +++ b/scripts/compute_pci_dss_cre_mappings.py @@ -55,6 +55,7 @@ def _configure_llm_env() -> None: + """Set default embedding model env vars for offline PCI mapping runs.""" embed_model = os.environ.get("CRE_EMBED_MODEL") if not embed_model: vertex_embed = os.environ.get( @@ -66,6 +67,7 @@ def _configure_llm_env() -> None: def fetch_pci_rows(url: str = PCI_SHEET_CSV_URL) -> List[Dict[str, str]]: + """Download PCI DSS spreadsheet rows that include a control id.""" with urllib.request.urlopen(url, timeout=120) as resp: raw = resp.read().decode("utf-8-sig") reader = csv.DictReader(io.StringIO(raw)) @@ -80,6 +82,7 @@ def resolve_with_method( cache, control_embedding: List[float], ) -> tuple[Optional[defs.CRE], str, Optional[float]]: + """Resolve one PCI control embedding using the staged PCI DSS linker.""" for threshold in PCI_DSS_CRE_SIMILARITY_THRESHOLDS: match = prompt.get_id_of_most_similar_cre_paginated( control_embedding, similarity_threshold=threshold @@ -112,6 +115,7 @@ def compute_mappings( *, limit: Optional[int] = None, ) -> List[Dict[str, Any]]: + """Embed PCI rows and resolve CRE links, returning per-control mapping records.""" prompt = prompt_client.PromptHandler(cache) mappings: List[Dict[str, Any]] = [] total = len(rows) if limit is None else min(limit, len(rows)) @@ -155,6 +159,7 @@ def compute_mappings( def main() -> int: + """CLI entrypoint for computing PCI DSS to CRE mapping JSON.""" parser = argparse.ArgumentParser(description="Compute PCI DSS → CRE mappings") parser.add_argument( "--cache-file", From 2ad736b510e0a70a5cd2bdfa8e5cb465b39a7ce0 Mon Sep 17 00:00:00 2001 From: Spyros Date: Sat, 6 Jun 2026 01:24:16 +0300 Subject: [PATCH 13/37] Add shared Cursor agent instructions for OpenCRE. Track AGENTS.md and .cursor/rules so the team shares human-plan-then-agent-execute workflows, CI/PR policies, and domain safety guardrails. Co-authored-by: Cursor --- .cursor/rules/alembic-deploy-guardrail.mdc | 14 +++++ .cursor/rules/autonomous-workflow.mdc | 20 +++++++ .cursor/rules/multi-agent-workflow.mdc | 65 ++++++++++++++++++++++ .cursor/rules/plan-first-workflow.mdc | 29 ++++++++++ .cursor/rules/production-db-ops-safety.mdc | 14 +++++ .gitignore | 6 +- 6 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 .cursor/rules/alembic-deploy-guardrail.mdc create mode 100644 .cursor/rules/autonomous-workflow.mdc create mode 100644 .cursor/rules/multi-agent-workflow.mdc create mode 100644 .cursor/rules/plan-first-workflow.mdc create mode 100644 .cursor/rules/production-db-ops-safety.mdc diff --git a/.cursor/rules/alembic-deploy-guardrail.mdc b/.cursor/rules/alembic-deploy-guardrail.mdc new file mode 100644 index 000000000..1374dc14b --- /dev/null +++ b/.cursor/rules/alembic-deploy-guardrail.mdc @@ -0,0 +1,14 @@ +--- +description: Enforce Alembic DB-revision guardrail before deploy/migration operations +alwaysApply: true +--- + +# Alembic Deploy Guardrail + +- Before any production/staging deploy or migration operation, run the Alembic guardrail check: + - `python scripts/check_alembic_revision_guardrail.py` + - or `make alembic-guardrail` +- If the guardrail reports unknown DB revision(s), stop immediately and do not run migrations until lineage is reconciled. +- For Heroku deploys, keep `Procfile` `release:` wired to the guardrail so incompatible slugs fail before web/worker rollout. +- After backup restore operations, re-run the guardrail before any `flask db upgrade`. + diff --git a/.cursor/rules/autonomous-workflow.mdc b/.cursor/rules/autonomous-workflow.mdc new file mode 100644 index 000000000..8e280b203 --- /dev/null +++ b/.cursor/rules/autonomous-workflow.mdc @@ -0,0 +1,20 @@ +--- +description: Autonomous execution defaults for OpenCRE +alwaysApply: true +--- + +# OpenCRE Autonomous Workflow + +Policy (CI/PR, git, validation order, critical paths): see `AGENTS.md`. + +- For big changes, wait for human plan approval (`multi-agent-workflow.mdc` Phase 1) before editing. +- After plan approval, execute tasks end-to-end unless blocked by auth/secrets, destructive actions, or material plan deviations. +- Prefer small, safe changes and avoid unrelated refactors. +- Use `Makefile` targets when possible. +- For substantive code changes, run `make lint`, `make mypy`, and `make test` before handoff (skip only when clearly irrelevant and explain why). +- If any check reports failures introduced by your changes, fix them before handoff. +- If commit verification depends on shell initialization, run verification commands in a zsh-compatible shell context so environment-dependent checks are not skipped. +- Run long commands in the background and monitor until completion. +- Do NOT commit or push unless explicitly asked (except when the user explicitly requests CI auto-fix / PR creation; see `AGENTS.md`). +- In commits do not add "made with cursor" lines. +- At handoff, report: changed files, checks run, and any residual risks. diff --git a/.cursor/rules/multi-agent-workflow.mdc b/.cursor/rules/multi-agent-workflow.mdc new file mode 100644 index 000000000..135ca9518 --- /dev/null +++ b/.cursor/rules/multi-agent-workflow.mdc @@ -0,0 +1,65 @@ +--- +description: Human plans big changes first; agent executes after explicit approval +alwaysApply: true +--- + +# Multi-Agent Workflow (Human Plan → Agent Execute) + +For **big changes**, split work into two phases. Do not skip Phase 1. + +## What Counts as a Big Change + +Treat the change as **big** when any of these apply: + +- New feature, new standard importer, or new user-facing capability +- Expected to touch **3+ files** or **>500 lines** of diff +- Refactor or migration with behavioral risk +- Touches critical paths (auth, secrets, production data, payments) +- Requirements are incomplete or have meaningful product/design choices + +Small fixes (single-file bugfix, typo, test-only tweak, clear one-liner scope) skip this rule; use `plan-first-workflow.mdc` only. + +## Phase 1 — Human-Led Planning (Agent Facilitates, No Code) + +**Stop before editing.** Your job is to help the human produce and approve a plan. + +1. **Acknowledge** this is a big change and that planning comes first. +2. **Ask the human** the minimum questions needed to plan well. Prefer a short numbered list over a long questionnaire. Typical prompts: + - What is the goal and definition of done? + - What source format / data / URLs does FOOBAR (or the feature) use? + - Which existing pattern should we mirror (e.g. a similar importer or route)? + - Acceptance criteria and manual checks? + - Out of scope / constraints? +3. **Draft a plan** for the human to edit, including: + - Goal and acceptance criteria + - Steps in execution order + - Files likely touched (with `@`-style paths where helpful) + - Similar code to follow + - Test and validation plan (`make lint`, `make mypy`, `make test`, import smoke if relevant) + - Risks and open questions +4. **Wait for explicit approval** before Phase 2. Approval looks like: "looks good", "proceed", "approved", or an edited plan the human confirms. +5. **Do not** create commits, push, or write implementation code during Phase 1. Research and read-only exploration are fine. + +If the human already supplied a complete plan, reflect it back briefly and ask them to confirm before executing. + +## Phase 2 — Agent Execution (Autonomous) + +After the human approves the plan: + +1. **Execute end-to-end** per `autonomous-workflow.mdc` and `AGENTS.md`. +2. **Follow the approved plan**; if you discover a material deviation, pause and ask before continuing. +3. **Implement in small increments** when possible; run validation as you go. +4. **Evaluate** against acceptance criteria: run tests, note manual spot-checks for the human. +5. **Hand off** with the standard checklist (changes, checks, CI status, risks). + +## Optional Cursor Agent Window Roles + +When using parallel agents, map roles to phases: + +| Role | Phase | Responsibility | +|------|-------|----------------| +| Planner | 1 | Expand prompt into spec + acceptance criteria; human approves | +| Builder | 2 | Implement approved plan | +| Evaluator | 2 | Run tests/checks; compare results to acceptance criteria | + +One agent can cover Builder + Evaluator; Phase 1 still requires human approval before Builder starts. diff --git a/.cursor/rules/plan-first-workflow.mdc b/.cursor/rules/plan-first-workflow.mdc new file mode 100644 index 000000000..80f8cf10f --- /dev/null +++ b/.cursor/rules/plan-first-workflow.mdc @@ -0,0 +1,29 @@ +--- +description: Plan with reasoning before substantive code changes +alwaysApply: true +--- + +# Plan-First Workflow + +Apply before making non-trivial edits that are **not** big enough to trigger `multi-agent-workflow.mdc`. + +If the change is big (new feature/importer, 3+ files, >500 lines, critical paths), use the human-plan → agent-execute flow there instead of planning and coding in one step. + +## Before Editing + +- Provide a brief plan with reasoning: goal, steps, files likely touched, and validation approach. +- Break the problem into smaller steps and think through each separately. +- If intent is ambiguous, ask before implementing. +- Check `docs/runbooks/` when the change touches deploy, DB, imports, or ops workflows. + +## While Editing + +- Only modify code directly relevant to the request. +- Never replace code with placeholders (e.g. `// ... rest of the processing ...`). Include complete, working code. +- Prefer referencing existing patterns with file paths (e.g. "similar to `application/web/web_main.py` route handlers") over inventing new conventions. +- When debugging, state observations first, then reasoning, then the proposed fix. + +## After Editing + +- Before handoff, briefly explain key design choices so a reviewer can ask "why this way?" without re-reading the whole diff. +- Prefer small, reviewable diffs; validate incrementally when possible. diff --git a/.cursor/rules/production-db-ops-safety.mdc b/.cursor/rules/production-db-ops-safety.mdc new file mode 100644 index 000000000..c37168766 --- /dev/null +++ b/.cursor/rules/production-db-ops-safety.mdc @@ -0,0 +1,14 @@ +--- +description: Require all-caps confirmation for destructive production DB operations and prefer pre-op backups +alwaysApply: true +--- + +# Production DB Operations Safety + +- For production database operations, treat destructive actions (`DELETE`, `DROP`, `TRUNCATE`, irreversible `ALTER`) as high risk. +- Prefer using `scripts/db/` operations instead of ad-hoc production DB commands whenever those scripts cover the use case. +- Before proposing or executing destructive production DB actions, require explicit all-caps confirmation from the user. +- Confirmation should be exact and unambiguous (for OpenCRE scripts: `I_UNDERSTAND_OPENCREORG_PROD_DB_DESTRUCTIVE_ACTION`). +- Prefer capturing a fresh backup before destructive production DB actions; if a backup is skipped, clearly explain risk and ask for confirmation again. +- If app/environment target is ambiguous, stop and ask to confirm target app first. + diff --git a/.gitignore b/.gitignore index f660f1339..ecc6b7d04 100644 --- a/.gitignore +++ b/.gitignore @@ -46,7 +46,9 @@ v/ .venv/ ### Local AI/editor workspaces ### -.cursor/ +.cursor/* +!.cursor/rules/ +!.cursor/rules/** .claude/ ### Frontend @@ -79,3 +81,5 @@ tmp/ ### CREs dir cres/* +### Local project management tooling +project management scripts/ From bc3a8a360b38de7dde1aee0f8968580afc57f9cc Mon Sep 17 00:00:00 2001 From: Spyros Date: Sat, 6 Jun 2026 02:00:52 +0300 Subject: [PATCH 14/37] Expand Cursor agent rules and resolve workflow contradictions. Add modular .cursor/rules for requirements gates, tickets, TDD, and verification; tighten plan-first and multi-agent flows; slim AGENTS.md to an index aligned with make lint/mypy/test checks. Co-authored-by: Cursor --- .cursor/rules/autonomous-workflow.mdc | 19 +++--- .cursor/rules/complete-ticket.mdc | 26 ++++++++ .cursor/rules/context-management.mdc | 29 +++++++++ .cursor/rules/multi-agent-workflow.mdc | 87 ++++++++++++++------------ .cursor/rules/never-assume.mdc | 30 +++++++++ .cursor/rules/plan-first-workflow.mdc | 57 ++++++++++++----- .cursor/rules/requirements-gate.mdc | 53 ++++++++++++++++ .cursor/rules/tdd-workflow.mdc | 30 +++++++++ .cursor/rules/verifiable-goals.mdc | 49 +++++++++++++++ 9 files changed, 314 insertions(+), 66 deletions(-) create mode 100644 .cursor/rules/complete-ticket.mdc create mode 100644 .cursor/rules/context-management.mdc create mode 100644 .cursor/rules/never-assume.mdc create mode 100644 .cursor/rules/requirements-gate.mdc create mode 100644 .cursor/rules/tdd-workflow.mdc create mode 100644 .cursor/rules/verifiable-goals.mdc diff --git a/.cursor/rules/autonomous-workflow.mdc b/.cursor/rules/autonomous-workflow.mdc index 8e280b203..3376479af 100644 --- a/.cursor/rules/autonomous-workflow.mdc +++ b/.cursor/rules/autonomous-workflow.mdc @@ -1,20 +1,19 @@ --- -description: Autonomous execution defaults for OpenCRE +description: End-to-end execution policy after plan approval alwaysApply: true --- # OpenCRE Autonomous Workflow -Policy (CI/PR, git, validation order, critical paths): see `AGENTS.md`. +Policy: see `AGENTS.md`. Verification: see `verifiable-goals.mdc`. - For big changes, wait for human plan approval (`multi-agent-workflow.mdc` Phase 1) before editing. -- After plan approval, execute tasks end-to-end unless blocked by auth/secrets, destructive actions, or material plan deviations. -- Prefer small, safe changes and avoid unrelated refactors. +- After approval, execute end-to-end unless blocked by auth/secrets, destructive actions, or material plan deviations. +- Prefer small, safe changes; avoid unrelated refactors. - Use `Makefile` targets when possible. -- For substantive code changes, run `make lint`, `make mypy`, and `make test` before handoff (skip only when clearly irrelevant and explain why). -- If any check reports failures introduced by your changes, fix them before handoff. -- If commit verification depends on shell initialization, run verification commands in a zsh-compatible shell context so environment-dependent checks are not skipped. -- Run long commands in the background and monitor until completion. -- Do NOT commit or push unless explicitly asked (except when the user explicitly requests CI auto-fix / PR creation; see `AGENTS.md`). +- **Always run lint, mypy, and tests after substantive changes; iterate until green.** Show evidence in handoff. +- If commit verification depends on shell initialization, use a zsh-compatible shell context. +- Run long commands in background; monitor until completion. +- Do NOT commit or push unless explicitly asked. - In commits do not add "made with cursor" lines. -- At handoff, report: changed files, checks run, and any residual risks. +- On substantive changes, recommend or run judge/subagent review before handoff. diff --git a/.cursor/rules/complete-ticket.mdc b/.cursor/rules/complete-ticket.mdc new file mode 100644 index 000000000..80fb63d79 --- /dev/null +++ b/.cursor/rules/complete-ticket.mdc @@ -0,0 +1,26 @@ +--- +description: Requires complete tickets before coding - asks clarifying questions if requirements are missing +globs: "**/*.{md,txt}" +alwaysApply: false +--- + +# Complete Ticket Requirement + +When the user submits a ticket or task via a `.md` or `.txt` file (including `AGENTS.md`): + +1. **Check** for: goal, success criteria, context, constraints — same rules as `requirements-gate.mdc` +2. **If missing** → ask clarifying questions; offer the **Requirements template** in `requirements-gate.mdc`; do NOT code +3. **If complete** → follow the decision tree in `multi-agent-workflow.mdc`: + - Trivial (typo, rename, one-liner) → implement directly + - Non-trivial → Plan Mode per `plan-first-workflow.mdc` or Phase 1 per `multi-agent-workflow.mdc` when both apply + - Wait for approval before implementation when planning is required +4. **Never assume** missing details — see `never-assume.mdc` + +Verification after implementation: `verifiable-goals.mdc`. Tests for new behavior: `tdd-workflow.mdc`. + +## Coding standards (not covered elsewhere) + +- **Stack:** Python for backend/application code; TypeScript for new frontend code (`application/frontend/`). +- **Error handling:** Handle expected failure paths explicitly; avoid silent failures; return or raise meaningful errors. +- **Async (frontend):** Prefer `async`/`await` over raw Promise chains or callbacks in new TypeScript. +- **Clean code:** Small functions, clear names, match surrounding module conventions; no drive-by refactors. diff --git a/.cursor/rules/context-management.mdc b/.cursor/rules/context-management.mdc new file mode 100644 index 000000000..6fec0191b --- /dev/null +++ b/.cursor/rules/context-management.mdc @@ -0,0 +1,29 @@ +--- +description: Keep agent context focused across tasks and stale threads +alwaysApply: true +--- + +# Context Management + +## Do + +- Use `/clear` between unrelated tasks or features. +- Reference files with `@path` instead of pasting entire file contents. +- Use `@Past Chats` to pull in prior work instead of copy-pasting old conversations. +- Start fresh after **2 failed corrections** on the same issue: `/clear`, then write a better prompt that incorporates what you learned. + +## Don't + +- Let context accumulate across unrelated features in one long thread. +- Describe files vaguely when an `@` reference exists. +- Keep correcting the same mistake in a degrading context — reset instead. + +## When context is stale + +Signs you should `/clear` and re-prompt: + +- Repeated fixes on the same bug without progress +- Agent confuses requirements from an earlier, unrelated task +- Plan has drifted significantly from what was approved + +After clearing, restate: goal, approved plan (or link to `.cursor/plans/*.md`), relevant `@` files, and acceptance criteria. diff --git a/.cursor/rules/multi-agent-workflow.mdc b/.cursor/rules/multi-agent-workflow.mdc index 135ca9518..1dad91ea6 100644 --- a/.cursor/rules/multi-agent-workflow.mdc +++ b/.cursor/rules/multi-agent-workflow.mdc @@ -1,5 +1,5 @@ --- -description: Human plans big changes first; agent executes after explicit approval +description: Two-phase planning for big changes; builder must not be sole judge alwaysApply: true --- @@ -7,59 +7,66 @@ alwaysApply: true For **big changes**, split work into two phases. Do not skip Phase 1. -## What Counts as a Big Change - -Treat the change as **big** when any of these apply: +## What counts as a big change - New feature, new standard importer, or new user-facing capability - Expected to touch **3+ files** or **>500 lines** of diff - Refactor or migration with behavioral risk - Touches critical paths (auth, secrets, production data, payments) -- Requirements are incomplete or have meaningful product/design choices +- Incomplete requirements or meaningful product/design choices + +Small fixes: single-file bugfix, typo, test-only tweak, clear one-liner → `plan-first-workflow.mdc` only. + +## Phase 1 — Human-led planning (no code) + +**Stop before editing.** -Small fixes (single-file bugfix, typo, test-only tweak, clear one-liner scope) skip this rule; use `plan-first-workflow.mdc` only. +1. Acknowledge this is a big change; planning comes first. +2. Ask minimum questions: goal, data sources, pattern to mirror, acceptance criteria, out of scope. +3. Draft a plan: steps, `@` file paths, similar code, test/validation plan, risks. +4. Wait for explicit approval ("proceed", "approved", or confirmed edited plan). +5. No commits, push, or implementation code in Phase 1. Read-only research is fine. + Tests and production code begin in Phase 2 after approval (see `tdd-workflow.mdc`). -## Phase 1 — Human-Led Planning (Agent Facilitates, No Code) +## Phase 2 — Agent execution -**Stop before editing.** Your job is to help the human produce and approve a plan. +After approval: -1. **Acknowledge** this is a big change and that planning comes first. -2. **Ask the human** the minimum questions needed to plan well. Prefer a short numbered list over a long questionnaire. Typical prompts: - - What is the goal and definition of done? - - What source format / data / URLs does FOOBAR (or the feature) use? - - Which existing pattern should we mirror (e.g. a similar importer or route)? - - Acceptance criteria and manual checks? - - Out of scope / constraints? -3. **Draft a plan** for the human to edit, including: - - Goal and acceptance criteria - - Steps in execution order - - Files likely touched (with `@`-style paths where helpful) - - Similar code to follow - - Test and validation plan (`make lint`, `make mypy`, `make test`, import smoke if relevant) - - Risks and open questions -4. **Wait for explicit approval** before Phase 2. Approval looks like: "looks good", "proceed", "approved", or an edited plan the human confirms. -5. **Do not** create commits, push, or write implementation code during Phase 1. Research and read-only exploration are fine. +1. Execute per `autonomous-workflow.mdc`. +2. Follow the approved plan; pause if material deviation is needed. +3. Implement incrementally; verify as you go (`verifiable-goals.mdc`). +4. Hand off with checklist including test evidence. -If the human already supplied a complete plan, reflect it back briefly and ask them to confirm before executing. +## Builder ≠ Judge (required on substantive work) -## Phase 2 — Agent Execution (Autonomous) +| Role | Responsibility | +|------|----------------| +| **Builder** | Implements approved plan | +| **Judge** | Independent review — edge cases, security, test gaps | -After the human approves the plan: +Invoke judge via subagent, parallel agent, or fresh context: -1. **Execute end-to-end** per `autonomous-workflow.mdc` and `AGENTS.md`. -2. **Follow the approved plan**; if you discover a material deviation, pause and ask before continuing. -3. **Implement in small increments** when possible; run validation as you go. -4. **Evaluate** against acceptance criteria: run tests, note manual spot-checks for the human. -5. **Hand off** with the standard checklist (changes, checks, CI status, risks). +- "Use a subagent to review this change for edge cases and security issues." -## Optional Cursor Agent Window Roles +Do not mark substantive work complete without independent review or documented reason to skip. -When using parallel agents, map roles to phases: +**Re-review:** Required only when judge findings change behavior, tests, or security posture materially. Style-only nits fixed in-place do not require a second judge pass. -| Role | Phase | Responsibility | -|------|-------|----------------| -| Planner | 1 | Expand prompt into spec + acceptance criteria; human approves | -| Builder | 2 | Implement approved plan | -| Evaluator | 2 | Run tests/checks; compare results to acceptance criteria | +## Decision tree -One agent can cover Builder + Evaluator; Phase 1 still requires human approval before Builder starts. +``` +User request received + │ + ├─ Missing goal / criteria / context / constraints? + │ └─ STOP → ask questions OR offer Requirements template (requirements-gate.mdc) + │ + ├─ Typo / rename / one-sentence fix? + │ └─ Implement → quality checks → show evidence + │ + ├─ Multi-file / new feature / refactor / critical path? + │ └─ Plan Mode → detailed plan → WAIT for approval → implement + │ → quality checks → subagent review → handoff with evidence + │ + └─ Otherwise + └─ Brief plan → implement → quality checks → handoff with evidence +``` diff --git a/.cursor/rules/never-assume.mdc b/.cursor/rules/never-assume.mdc new file mode 100644 index 000000000..22450b00a --- /dev/null +++ b/.cursor/rules/never-assume.mdc @@ -0,0 +1,30 @@ +--- +description: Verify or ask — no guessing packages, APIs, patterns, or incomplete code +alwaysApply: true +--- + +# Never Assume + +| Do NOT | Instead | +|--------|---------| +| Assume package names, API endpoints, DB schema, or file locations | Read the codebase; grep; ask | +| Add new dependencies without explanation | State why, alternatives considered, and get approval | +| Use mocks unless explicitly requested | Prefer integration-style tests matching `@application/tests/` patterns | +| Replace code with placeholders, TODOs, or stubs | Ship complete, working code | +| Write incomplete implementations | Finish the feature or stop and explain what's blocked | +| Guess production/staging targets for DB ops | Confirm target app; follow `production-db-ops-safety.mdc` | +| Commit or push unless asked | Wait for explicit user request | + +## Scope and diff discipline + +- Minimize scope — smallest correct diff; no drive-by refactors. +- Match surrounding naming, types, imports, and documentation level. +- Comments only for non-obvious business logic. +- Do not add markdown/docs files the user did not ask for. +- Do not use "made with cursor" or similar in commits. + +## OpenCRE conventions + +- Mirror patterns in existing code (importers, tests, web routes). +- Use Makefile targets over ad-hoc commands when available. +- Prefer `scripts/db/` for production DB operations over raw SQL. diff --git a/.cursor/rules/plan-first-workflow.mdc b/.cursor/rules/plan-first-workflow.mdc index 80f8cf10f..05510f1ad 100644 --- a/.cursor/rules/plan-first-workflow.mdc +++ b/.cursor/rules/plan-first-workflow.mdc @@ -1,29 +1,54 @@ --- -description: Plan with reasoning before substantive code changes +description: Require Plan Mode and user approval before non-trivial implementation alwaysApply: true --- # Plan-First Workflow -Apply before making non-trivial edits that are **not** big enough to trigger `multi-agent-workflow.mdc`. +Apply before non-trivial edits. When criteria overlap with `multi-agent-workflow.mdc` (e.g. new feature, 3+ files), follow **multi-agent** Phase 1 — it is the stricter superset. -If the change is big (new feature/importer, 3+ files, >500 lines, critical paths), use the human-plan → agent-execute flow there instead of planning and coding in one step. +## Skip planning only for -## Before Editing +- Typos, renames, obvious single-line fixes +- Tasks fully specified with no design choices -- Provide a brief plan with reasoning: goal, steps, files likely touched, and validation approach. -- Break the problem into smaller steps and think through each separately. -- If intent is ambiguous, ask before implementing. -- Check `docs/runbooks/` when the change touches deploy, DB, imports, or ops workflows. +## MUST plan before implementing when ANY apply -## While Editing +- New feature or new importer +- Multi-file change (3+ files) or >500 lines expected +- Refactor or migration with behavioral risk +- Touches critical paths (auth, secrets, production data, payments, deploy) +- Requirements have meaningful design choices -- Only modify code directly relevant to the request. -- Never replace code with placeholders (e.g. `// ... rest of the processing ...`). Include complete, working code. -- Prefer referencing existing patterns with file paths (e.g. "similar to `application/web/web_main.py` route handlers") over inventing new conventions. -- When debugging, state observations first, then reasoning, then the proposed fix. +## Plan output MUST include -## After Editing +1. **Goal** — restated in one sentence +2. **Files** — exact paths to create/modify/delete +3. **Dependencies** — imports, DB migrations, external APIs, new packages +4. **Steps** — ordered implementation sequence +5. **Tests** — new/updated test files and what they assert +6. **Edge cases** — failure modes, empty input, backwards compatibility +7. **Verification** — exact commands (`make lint`, `make mypy`, `make test`, etc.) +8. **Risks** — what could break and how to detect it -- Before handoff, briefly explain key design choices so a reviewer can ask "why this way?" without re-reading the whole diff. -- Prefer small, reviewable diffs; validate incrementally when possible. +## Approval gate + +After presenting the plan, **wait for explicit user approval** ("proceed", "approved", +or an edited plan confirmed by the user) before writing implementation code. + +After approval, **tests may be written first** per `tdd-workflow.mdc` — failing tests are not "implementation code" for Phase 1 purposes. + +Read-only research (grep, read files, explore codebase) is allowed during planning. + +Save approved plans to `.cursor/plans/.md` when scope is substantial. + +## Before editing (Agent Mode) + +- Brief plan with reasoning: goal, steps, files touched, validation approach. +- Break into smaller steps; check `scripts/db/` and `scripts/` for deploy/DB/import ops. + +## While editing + +- Only modify code relevant to the request. +- Never use placeholders — include complete, working code. +- **Reference patterns specifically:** e.g. mirror `@application/utils/external_project_parsers/parsers/pci_dss.py`, tests like `@application/tests/pci_dss_parser_test.py`. diff --git a/.cursor/rules/requirements-gate.mdc b/.cursor/rules/requirements-gate.mdc new file mode 100644 index 000000000..bfdf070dc --- /dev/null +++ b/.cursor/rules/requirements-gate.mdc @@ -0,0 +1,53 @@ +--- +description: Stop and ask clarifying questions before coding when requirements are incomplete +alwaysApply: true +--- + +# Requirements Gate + +If ANY of the following is missing or ambiguous, **STOP and ask clarifying questions**. +Do NOT write, edit, or delete code until the gaps are filled. + +| Required | What to ask | +|----------|-------------| +| **Clear goal** | What outcome does the user want? What problem are we solving? | +| **Verifiable success criteria** | Which checks must pass? (tests, typecheck, linter, CI, manual steps) | +| **Context references** | Which files, modules, or prior chats apply? Prefer `@path/to/file` refs when ambiguous. | +| **Constraints** | Out of scope, performance, compatibility, no new deps, prod DB safety, etc. | + +## Context references — when `@` refs are required + +- **Satisfied without `@`** when the message names specific paths, modules, or patterns clearly (e.g. "add tests for `application/utils/gap_analysis.py`"). +- **Ask for `@` refs** when multiple files could apply, the pattern to mirror is unclear, or prior chat/issue context is needed. + +## Skip the gate only when + +The request is fully specified in one sentence with obvious success criteria and unambiguous context, e.g. +"Fix typo in README line 42" or "Rename `foo` to `bar` in `application/utils/gap_analysis.py`." + +## Requirements template (offer when info is missing) + +``` +## Task + + +## Success criteria (all must pass) +- [ ] `make lint` +- [ ] `make mypy` +- [ ] `make test` (or targeted: `python -m unittest application/tests/_test.py`) +- [ ] `make frontend` / `yarn build` (if frontend touched) +- [ ] CI green (`gh pr checks` or Actions UI) +- [ ] Other: ___ + +## Context +- Files: @path/to/relevant/file.py +- Pattern to mirror: @path/to/similar/implementation.py +- Prior work: @Past Chats / issue # / PR # + +## Constraints +- In scope: ___ +- Out of scope: ___ +- Dependencies: none / explain before adding +- Mocks: allowed / not allowed +- Production DB: N/A / read-only / destructive (requires explicit confirmation) +``` diff --git a/.cursor/rules/tdd-workflow.mdc b/.cursor/rules/tdd-workflow.mdc new file mode 100644 index 000000000..673ec7b79 --- /dev/null +++ b/.cursor/rules/tdd-workflow.mdc @@ -0,0 +1,30 @@ +--- +description: Test-first workflow for new behavior, importers, and API changes +alwaysApply: true +--- + +# TDD Workflow + +Use for new behavior, bug fixes with clear reproduction, and importers/API changes where expected I/O is known. + +Skip for: typos, pure refactors with existing test coverage, config-only changes. + +## Timing relative to planning + +- **After plan approval** (or immediately for trivial fixes that skip planning): write failing tests, then implementation. +- Do not write production code before plan approval when planning is required. + +## Loop + +1. **Write tests first** from expected input/output or acceptance criteria. +2. **Run tests and confirm they fail** for the right reason. Do not write implementation yet. +3. **Commit tests** only when the user explicitly asks to commit mid-flow. +4. **Implement** the minimum code to pass tests. Do not modify tests to make them pass unless requirements changed (say so explicitly). +5. **Iterate** until `make test` (and lint/mypy) pass. +6. **Commit implementation** when the user asks. + +## OpenCRE conventions + +- Follow patterns in `@application/tests/` (e.g. `@application/tests/pci_dss_parser_test.py` for importers). +- Use test DB setup from existing parser/web tests; avoid unnecessary mocks when integration-style tests match the codebase. +- Prefer one focused test class per behavior area. diff --git a/.cursor/rules/verifiable-goals.mdc b/.cursor/rules/verifiable-goals.mdc new file mode 100644 index 000000000..98e26dc71 --- /dev/null +++ b/.cursor/rules/verifiable-goals.mdc @@ -0,0 +1,49 @@ +--- +description: Non-negotiable lint, mypy, test, and CI checks with evidence in handoff +alwaysApply: true +--- + +# Verifiable Goals + +Agents need pass/fail checks to close the loop. Without verification, the human becomes the verification loop. + +## Required checks (code changes) + +Run in order unless clearly irrelevant (explain why if skipped): + +1. `make lint` +2. `make mypy` +3. `make test` — full suite, or a targeted module when scope is narrow +4. `make frontend` / `yarn build` — when frontend/TS/TSX touched +5. `make alembic-guardrail` — before deploy/migration ops + +## CI + +When preparing or fixing a PR: all workflow jobs must be green. +Use `gh pr checks` or the GitHub Actions UI. Fix failures iteratively. + +## Frontend TypeScript (when TS/TSX changed) + +- Webpack production build must succeed (`make frontend` / `yarn build`) +- TypeScript must compile with no errors +- Prettier must pass (`make lint` runs black for Python and prettier for frontend) + +## Iterate until green + +- If any check fails, fix the failure and rerun from the failed step. +- Do not hand off with failing checks unless blocked; document the blocker explicitly. +- Before commit (when user asks): all relevant checks must pass. + +## Handoff evidence (mandatory) + +Report what you ran and the outcome — not assertions: + +``` +make lint — passed +make mypy — passed +make test — passed (N tests, 0 failures) +make frontend — passed (if applicable) +gh pr checks — all green (if PR-related) +``` + +If a check failed, show the error, the fix, and the rerun result. From 721e8064f9220d84983cfc50ea373c73197087aa Mon Sep 17 00:00:00 2001 From: skypank Date: Mon, 1 Jun 2026 20:20:45 +0530 Subject: [PATCH 15/37] ci(codeql): upgrade CodeQL Action v1->v4 and checkout v2->v4 --- .github/workflows/codeql-analysis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 361525927..745a408bd 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,11 +39,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -54,7 +54,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v4 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -68,4 +68,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v4 From 47267c1d476d25e8f1c36f9c50be062da6f13a89 Mon Sep 17 00:00:00 2001 From: Shiwani Mishra Date: Wed, 8 Apr 2026 00:19:34 +0530 Subject: [PATCH 16/37] fix: correct expected tags value in test_dbNodeFromNode The test expected tags="1,2" but dbNodeFromCode joins the input list ["111-111", "222-222"] with commas, producing "111-111,222-222". The expected value in the test was wrong. --- application/tests/db_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/tests/db_test.py b/application/tests/db_test.py index d3e3a17f4..24ac8c645 100644 --- a/application/tests/db_test.py +++ b/application/tests/db_test.py @@ -1092,7 +1092,7 @@ def test_dbNodeFromNode(self) -> None: name="ccc", description="c2", link="https://example.com/code/hyperlink", - tags="1,2", + tags="111-111,222-222", ntype=defs.Credoctypes.Code.value, ), } From fc72d6912a6934e0524b4e7ef4ceb4bbe8f58f0f Mon Sep 17 00:00:00 2001 From: Arpit Jain Date: Fri, 15 May 2026 01:56:54 +0900 Subject: [PATCH 17/37] ci: declare contents:read on test workflow Signed-off-by: Arpit Jain --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 59c65dc47..f9134b2ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,8 @@ name: Test on: [push, pull_request] +permissions: + contents: read + jobs: build: name: Test From 37417e5f2e78898eff32bea8f78f4bbb582729df Mon Sep 17 00:00:00 2001 From: Shiwani Mishra Date: Sat, 4 Apr 2026 19:48:24 +0530 Subject: [PATCH 18/37] fix: return 400 when text param is missing in text_search Closes #862 request.args.get('text') returns None if the query param is absent. Passing None into db.text_search() causes re.search() to raise TypeError: expected string or bytes-like object. Return a 400 before reaching the database call. --- application/tests/web_main_test.py | 6 ++++++ application/web/web_main.py | 2 ++ 2 files changed, 8 insertions(+) diff --git a/application/tests/web_main_test.py b/application/tests/web_main_test.py index 776fdc50a..822b0b409 100644 --- a/application/tests/web_main_test.py +++ b/application/tests/web_main_test.py @@ -452,6 +452,12 @@ def test_test_search(self) -> None: collection.add_node(docs["sa"]) with self.app.test_client() as client: + response = client.get("/rest/v1/text_search") + self.assertEqual(400, response.status_code) + + response = client.get("/rest/v1/text_search?text=") + self.assertEqual(400, response.status_code) + response = client.get(f"/rest/v1/text_search?text='CRE:2'") self.assertEqual(404, response.status_code) diff --git a/application/web/web_main.py b/application/web/web_main.py index 5baeb8c0a..3b150fd1c 100644 --- a/application/web/web_main.py +++ b/application/web/web_main.py @@ -559,6 +559,8 @@ def text_search() -> Any: """ database = db.Node_collection() text = request.args.get("text") + if not text: + return jsonify({"error": "text parameter is required"}), 400 if posthog: posthog.capture(f"text_search", f"text:{text}") From 057186a72b150dd9c85a84c68a4ebb49f3bee891 Mon Sep 17 00:00:00 2001 From: VivekGhantiwala Date: Wed, 11 Mar 2026 16:00:27 +0530 Subject: [PATCH 19/37] Fix float parsing of ISO section codes like 5.10 Replace get_all_records() with get_all_values() to bypass gspread's numericise() which converts section codes like '5.10' to float 5.1. get_all_values() returns raw strings, preserving trailing zeros. Fixes #574 Fixes #546 --- application/utils/spreadsheet.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/application/utils/spreadsheet.py b/application/utils/spreadsheet.py index b18b493dd..855d0136e 100644 --- a/application/utils/spreadsheet.py +++ b/application/utils/spreadsheet.py @@ -58,21 +58,15 @@ def read_spreadsheet( "(remember, only numbered worksheets" " will be processed by convention)" % wsh.title ) - records = wsh.get_all_records( - head=1, - numericise_ignore=list( - range(1, wsh.col_count) - ), # Added numericise_ignore parameter - ) # workaround because of https://github.com/burnash/gspread/issues/1007 # this will break if the column names are in any other line + rows = wsh.get_all_values() + headers = rows[0] + records = [dict(zip(headers, row)) for row in rows[1:]] toyaml = yaml.safe_load(yaml.safe_dump(records)) result[wsh.title] = toyaml elif not parse_numbered_only: - records = wsh.get_all_records( - head=1, - numericise_ignore=list( - range(1, wsh.col_count) - ), # Added numericise_ignore parameter -- DO NOT make this 'all', gspread has a bug - ) # workaround because of https://github.com/burnash/gspread/issues/1007 # this will break if the column names are in any other line + rows = wsh.get_all_values() + headers = rows[0] + records = [dict(zip(headers, row)) for row in rows[1:]] toyaml = yaml.safe_load(yaml.safe_dump(records)) result[wsh.title] = toyaml except gspread.exceptions.APIError as ae: From cc18a597e8ad455cfec550b7a9c0e9154647ecf7 Mon Sep 17 00:00:00 2001 From: Spyros Date: Fri, 12 Jun 2026 12:54:23 +0300 Subject: [PATCH 20/37] test: mock get_all_values for read_spreadsheet ISO section IDs Align spreadsheet_test with get_all_values-based read path so section codes like 5.10 stay strings instead of being float-coerced. Co-authored-by: Cursor --- application/tests/spreadsheet_test.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/application/tests/spreadsheet_test.py b/application/tests/spreadsheet_test.py index 4544028df..c7e1152b8 100644 --- a/application/tests/spreadsheet_test.py +++ b/application/tests/spreadsheet_test.py @@ -133,11 +133,16 @@ def test_read_spreadsheet_iso_numbers( }, ] - # Fake worksheet that returns our expected data + # Fake worksheet that returns our expected data (raw rows, not numericised) fake_ws = mock.MagicMock() fake_ws.title = "ISO Numericise Test" fake_ws.col_count = 3 - fake_ws.get_all_records.return_value = expected + fake_ws.get_all_values.return_value = [ + list(expected[0].keys()), + [expected[0][k] for k in expected[0]], + [expected[1][k] for k in expected[1]], + [expected[2][k] for k in expected[2]], + ] # Fake spreadsheet client fake_sh = mock.MagicMock() From e62f92d52717eb70430c6a2b003fe98f8e192dcc Mon Sep 17 00:00:00 2001 From: Spyros Date: Fri, 12 Jun 2026 13:24:03 +0300 Subject: [PATCH 21/37] fix(spreadsheet): harden get_all_values row parsing edge cases Handle empty worksheets and pad short rows so section IDs are preserved as strings without IndexError or truncated dict keys. --- application/tests/spreadsheet_test.py | 55 +++++++++++++++++++++++++++ application/utils/spreadsheet.py | 20 +++++++--- 2 files changed, 69 insertions(+), 6 deletions(-) diff --git a/application/tests/spreadsheet_test.py b/application/tests/spreadsheet_test.py index c7e1152b8..01a41d5fe 100644 --- a/application/tests/spreadsheet_test.py +++ b/application/tests/spreadsheet_test.py @@ -161,3 +161,58 @@ def test_read_spreadsheet_iso_numbers( result = read_spreadsheet(url, alias, validate=False, parse_numbered_only=False) self.assertEqual(result["ISO Numericise Test"], expected) + + @mock.patch("application.utils.spreadsheet.gspread.service_account") + @mock.patch("application.utils.spreadsheet.gspread.oauth") + def test_read_spreadsheet_empty_worksheet( + self, mock_oauth, mock_service_account + ) -> None: + fake_ws = mock.MagicMock() + fake_ws.title = "Empty Sheet" + fake_ws.get_all_values.return_value = [] + + fake_sh = mock.MagicMock() + fake_sh.worksheets.return_value = [fake_ws] + + fake_client = mock.MagicMock() + fake_client.open_by_url.return_value = fake_sh + mock_oauth.return_value = fake_client + mock_service_account.return_value = fake_client + + result = read_spreadsheet( + "https://example.com/fake-spreadsheet-url", + "Test Spreadsheet", + validate=False, + parse_numbered_only=False, + ) + + self.assertEqual(result["Empty Sheet"], []) + + @mock.patch("application.utils.spreadsheet.gspread.service_account") + @mock.patch("application.utils.spreadsheet.gspread.oauth") + def test_read_spreadsheet_short_row_padded( + self, mock_oauth, mock_service_account + ) -> None: + fake_ws = mock.MagicMock() + fake_ws.title = "Short Row" + fake_ws.get_all_values.return_value = [ + ["Col A", "Col B"], + ["only-a"], + ] + + fake_sh = mock.MagicMock() + fake_sh.worksheets.return_value = [fake_ws] + + fake_client = mock.MagicMock() + fake_client.open_by_url.return_value = fake_sh + mock_oauth.return_value = fake_client + mock_service_account.return_value = fake_client + + result = read_spreadsheet( + "https://example.com/fake-spreadsheet-url", + "Test Spreadsheet", + validate=False, + parse_numbered_only=False, + ) + + self.assertEqual(result["Short Row"], [{"Col A": "only-a", "Col B": ""}]) diff --git a/application/utils/spreadsheet.py b/application/utils/spreadsheet.py index 855d0136e..cecd192fe 100644 --- a/application/utils/spreadsheet.py +++ b/application/utils/spreadsheet.py @@ -26,6 +26,18 @@ def findDups(x): return {val for val in x if (val in seen or seen.add(val))} +def _records_from_worksheet_values(rows: List[List[Any]]) -> List[Dict[str, Any]]: + """Build row dicts from raw gspread values without numeric coercion.""" + if not rows: + return [] + headers = rows[0] + records: List[Dict[str, Any]] = [] + for row in rows[1:]: + padded = list(row) + [""] * max(0, len(headers) - len(row)) + records.append(dict(zip(headers, padded[: len(headers)]))) + return records + + def load_csv(): pass @@ -58,15 +70,11 @@ def read_spreadsheet( "(remember, only numbered worksheets" " will be processed by convention)" % wsh.title ) - rows = wsh.get_all_values() - headers = rows[0] - records = [dict(zip(headers, row)) for row in rows[1:]] + records = _records_from_worksheet_values(wsh.get_all_values()) toyaml = yaml.safe_load(yaml.safe_dump(records)) result[wsh.title] = toyaml elif not parse_numbered_only: - rows = wsh.get_all_values() - headers = rows[0] - records = [dict(zip(headers, row)) for row in rows[1:]] + records = _records_from_worksheet_values(wsh.get_all_values()) toyaml = yaml.safe_load(yaml.safe_dump(records)) result[wsh.title] = toyaml except gspread.exceptions.APIError as ae: From 294b17e83d852d1cb137490625cd5a718257eb95 Mon Sep 17 00:00:00 2001 From: Spyros Date: Fri, 12 Jun 2026 13:45:44 +0300 Subject: [PATCH 22/37] fix(spreadsheet): reject duplicate headers in get_all_values path Fail fast with GSpreadException when worksheet header row contains duplicates, use zip(strict=True) after row padding, and add regression tests for the helper and read_spreadsheet integration. --- application/tests/spreadsheet_test.py | 40 +++++++++++++++++++++++++++ application/utils/spreadsheet.py | 14 ++++++++-- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/application/tests/spreadsheet_test.py b/application/tests/spreadsheet_test.py index 01a41d5fe..a7b67569f 100644 --- a/application/tests/spreadsheet_test.py +++ b/application/tests/spreadsheet_test.py @@ -4,10 +4,13 @@ from pprint import pprint from unittest import mock +import gspread + from application import create_app, sqla # type: ignore from application.database import db from application.defs import cre_defs as defs from application.utils.spreadsheet import * +from application.utils.spreadsheet import _records_from_worksheet_values from application.tests.utils.data_gen import export_format_data @@ -216,3 +219,40 @@ def test_read_spreadsheet_short_row_padded( ) self.assertEqual(result["Short Row"], [{"Col A": "only-a", "Col B": ""}]) + + def test_records_from_worksheet_values_duplicate_headers(self) -> None: + with self.assertRaises(gspread.exceptions.GSpreadException) as ctx: + _records_from_worksheet_values( + [["Col A", "Col B", "Col A"], ["x", "y", "z"]] + ) + self.assertIn("Duplicate worksheet headers", str(ctx.exception)) + self.assertIn("Col A", str(ctx.exception)) + + @mock.patch("application.utils.spreadsheet.gspread.service_account") + @mock.patch("application.utils.spreadsheet.gspread.oauth") + def test_read_spreadsheet_duplicate_headers( + self, mock_oauth, mock_service_account + ) -> None: + fake_ws = mock.MagicMock() + fake_ws.title = "Dup Headers" + fake_ws.get_all_values.return_value = [ + ["Name", "Name"], + ["row"], + ] + + fake_sh = mock.MagicMock() + fake_sh.worksheets.return_value = [fake_ws] + + fake_client = mock.MagicMock() + fake_client.open_by_url.return_value = fake_sh + mock_oauth.return_value = fake_client + mock_service_account.return_value = fake_client + + result = read_spreadsheet( + "https://example.com/fake-spreadsheet-url", + "Test Spreadsheet", + validate=False, + parse_numbered_only=False, + ) + + self.assertEqual(result, {}) diff --git a/application/utils/spreadsheet.py b/application/utils/spreadsheet.py index cecd192fe..c490bc660 100644 --- a/application/utils/spreadsheet.py +++ b/application/utils/spreadsheet.py @@ -27,14 +27,24 @@ def findDups(x): def _records_from_worksheet_values(rows: List[List[Any]]) -> List[Dict[str, Any]]: - """Build row dicts from raw gspread values without numeric coercion.""" + """Build row dicts from raw worksheet cell values without numeric coercion. + + Uses the first row as column headers. Short data rows are padded with empty + strings. Raises ``GSpreadException`` when duplicate header names are present + so callers fail fast instead of silently collapsing columns in ``dict(zip)``. + """ if not rows: return [] headers = rows[0] + duplicates = sorted(findDups(headers)) + if duplicates: + raise gspread.exceptions.GSpreadException( + f"Duplicate worksheet headers: {duplicates}" + ) records: List[Dict[str, Any]] = [] for row in rows[1:]: padded = list(row) + [""] * max(0, len(headers) - len(row)) - records.append(dict(zip(headers, padded[: len(headers)]))) + records.append(dict(zip(headers, padded[: len(headers)], strict=True))) return records From 694f61e573fe0d69fc0f4a7d0d76811f821b83f4 Mon Sep 17 00:00:00 2001 From: Spyros Date: Fri, 12 Jun 2026 14:03:25 +0300 Subject: [PATCH 23/37] fix: paginate Explorer CRE load and batch-hydrate all_cres Fix production H12 timeouts from GET /all_cres?per_page=1000 by batching N+1 link hydration in the DB layer, capping per_page at 100, scoping DataProvider to Explorer routes with incremental page loads, and using ensureFullExplorerData for graph views. Closes #930. Related: #847, #848. Co-authored-by: Cursor --- application/database/db.py | 137 ++++-- application/frontend/src/App.tsx | 11 +- application/frontend/src/const.ts | 1 + .../src/pages/Explorer/ExplorerLayout.tsx | 19 + .../frontend/src/pages/Explorer/explorer.tsx | 24 +- .../Explorer/visuals/circles/circles.tsx | 11 +- .../visuals/force-graph/forceGraph.tsx | 12 +- .../frontend/src/providers/DataProvider.tsx | 398 ++++++++++++------ application/frontend/src/routes.tsx | 7 +- application/frontend/www/bundle.js | 2 +- .../frontend/www/bundle.js.LICENSE.txt | 7 + application/frontend/www/index.html | 2 +- application/tests/db_test.py | 50 +++ application/tests/web_main_test.py | 49 +++ application/web/web_main.py | 2 + 15 files changed, 557 insertions(+), 175 deletions(-) create mode 100644 application/frontend/src/pages/Explorer/ExplorerLayout.tsx diff --git a/application/database/db.py b/application/database/db.py index 6a30d3c65..25ece0be7 100644 --- a/application/database/db.py +++ b/application/database/db.py @@ -10,7 +10,7 @@ from pprint import pprint -from collections import Counter +from collections import Counter, defaultdict from itertools import permutations from typing import Any, Dict, List, Optional, Tuple, cast from neomodel.exceptions import ( @@ -1449,7 +1449,6 @@ def get_CREs( include_only: Optional[List[str]] = None, internal_id: Optional[str] = None, ) -> List[cre_defs.CRE]: - cres: List[cre_defs.CRE] = [] query = CRE.query if not external_id and not name and not description and not internal_id: logger.error( @@ -1484,40 +1483,99 @@ def get_CREs( ) return [] - for matching_cre in dbcres: - cre = CREfromDB(matching_cre) - cre.links = self.__make_cre_links( - cre=matching_cre, include_only_nodes=include_only - ) - cre.links.extend(self.__make_cre_internal_links(cre=matching_cre)) - cres.append(cre) - return cres + return self._hydrate_cres_batch(dbcres, include_only_nodes=include_only) - def __make_cre_internal_links(self, cre: CRE) -> List[cre_defs.Link]: - links = [] - internal_links = ( + def _hydrate_cres_batch( + self, + dbcres: List[CRE], + include_only_nodes: Optional[List[str]] = None, + ) -> List[cre_defs.CRE]: + if not dbcres: + return [] + + cre_ids = [cre.id for cre in dbcres] + node_links_by_cre: Dict[str, List[Links]] = defaultdict(list) + node_ids: set = set() + for link in self.session.query(Links).filter(Links.cre.in_(cre_ids)).all(): + node_links_by_cre[link.cre].append(link) + node_ids.add(link.node) + + nodes_by_id: Dict[str, Node] = {} + if node_ids: + nodes_by_id = { + node.id: node + for node in self.session.query(Node).filter(Node.id.in_(node_ids)).all() + } + + internal_links_by_cre: Dict[str, List[InternalLinks]] = defaultdict(list) + linked_cre_ids: set = set() + for internal_link in ( self.session.query(InternalLinks) .filter( - sqla.or_(InternalLinks.cre == cre.id, InternalLinks.group == cre.id) + sqla.or_( + InternalLinks.cre.in_(cre_ids), + InternalLinks.group.in_(cre_ids), + ) ) .all() - ) + ): + linked_cre_ids.add(internal_link.cre) + linked_cre_ids.add(internal_link.group) + if internal_link.cre in cre_ids: + internal_links_by_cre[internal_link.cre].append(internal_link) + if internal_link.group in cre_ids: + internal_links_by_cre[internal_link.group].append(internal_link) + + cres_by_id: Dict[str, CRE] = {cre.id: cre for cre in dbcres} + extra_cre_ids = linked_cre_ids - set(cre_ids) + if extra_cre_ids: + for linked in ( + self.session.query(CRE).filter(CRE.id.in_(extra_cre_ids)).all() + ): + cres_by_id[linked.id] = linked - if len(internal_links) == 0: + result: List[cre_defs.CRE] = [] + for matching_cre in dbcres: + cre = CREfromDB(matching_cre) + cre.links = self._assemble_cre_node_links( + node_links_by_cre.get(matching_cre.id, []), + nodes_by_id, + include_only_nodes, + ) + seen_internal: set = set() + internal_rows = [] + for row in internal_links_by_cre.get(matching_cre.id, []): + key = (row.cre, row.group, row.type) + if key not in seen_internal: + seen_internal.add(key) + internal_rows.append(row) + cre.links.extend( + self._assemble_cre_internal_links( + matching_cre, internal_rows, cres_by_id + ) + ) + result.append(cre) + return result + + def _assemble_cre_internal_links( + self, + cre: CRE, + internal_links: List[InternalLinks], + cres_by_id: Dict[str, CRE], + ) -> List[cre_defs.Link]: + links: List[cre_defs.Link] = [] + if not internal_links: logger.debug( f"CRE {cre.name}:{cre.external_id}:{cre.id} has no internal links" ) for internal_link in internal_links: - - linked_cre_query = self.session.query(CRE) link_type = cre_defs.LinkTypes.from_str(internal_link.type) if internal_link.cre == cre.id: - # if we are the lower cre in this relationship, we need to flip the "Contains" linktypes - linked_cre = linked_cre_query.filter( - CRE.id == internal_link.group - ).first() # get the higher cre so we can add the link + linked_cre = cres_by_id.get(internal_link.group) + if not linked_cre: + continue if link_type == cre_defs.LinkTypes.Contains: links.append( cre_defs.Link( @@ -1525,24 +1583,28 @@ def __make_cre_internal_links(self, cre: CRE) -> List[cre_defs.Link]: document=CREfromDB(linked_cre), ) ) - elif ( - link_type == cre_defs.LinkTypes.Related - ): # if it's not a "Contains" link, it's a "Related" link + elif link_type == cre_defs.LinkTypes.Related: links.append( cre_defs.Link(ltype=link_type, document=CREfromDB(linked_cre)) ) continue - # if we are are the higher cre then we don't need to do anything, relationship types are always "higher"->"lower" - linked_cre = linked_cre_query.filter(CRE.id == internal_link.cre).first() - links.append(cre_defs.Link(ltype=link_type, document=CREfromDB(linked_cre))) + + linked_cre = cres_by_id.get(internal_link.cre) + if linked_cre: + links.append( + cre_defs.Link(ltype=link_type, document=CREfromDB(linked_cre)) + ) return links - def __make_cre_links( - self, cre: CRE, include_only_nodes: List[str] + def _assemble_cre_node_links( + self, + node_links: List[Links], + nodes_by_id: Dict[str, Node], + include_only_nodes: Optional[List[str]], ) -> List[cre_defs.Link]: - links = [] - for link in self.session.query(Links).filter(Links.cre == cre.id).all(): - node = self.session.query(Node).filter(Node.id == link.node).first() + links: List[cre_defs.Link] = [] + for link in node_links: + node = nodes_by_id.get(link.node) if node and (not include_only_nodes or node.name in include_only_nodes): links.append( cre_defs.Link( @@ -1647,13 +1709,11 @@ def export(self, dir: str = None, dry_run: bool = False) -> List[cre_defs.Docume def all_cres_with_pagination( self, page: int = 1, per_page: int = 10 ) -> List[cre_defs.CRE]: - result: List[cre_defs.CRE] = [] cres = self.session.query(CRE).paginate( page=int(page), per_page=per_page, error_out=False ) total_pages = cres.pages - for cre in cres.items: - result.extend(self.get_CREs(external_id=cre.external_id)) + result = self._hydrate_cres_batch(list(cres.items)) return result, page, total_pages def get_cre_path(self, fromID: str, toID: str) -> List[cre_defs.Document]: @@ -2202,10 +2262,7 @@ def get_root_cres(self): ) .all() ) - result = [] - for c in cres: - result.extend(self.get_CREs(external_id=c.external_id)) - return result + return self._hydrate_cres_batch(list(cres)) def get_embeddings_by_doc_type(self, doc_type: str) -> Dict[str, List[float]]: res = {} diff --git a/application/frontend/src/App.tsx b/application/frontend/src/App.tsx index 1913e46a9..e372d844f 100755 --- a/application/frontend/src/App.tsx +++ b/application/frontend/src/App.tsx @@ -6,7 +6,6 @@ import { QueryClient, QueryClientProvider } from 'react-query'; import { BrowserRouter } from 'react-router-dom'; import { GlobalFilterState, filterContext } from './hooks/applyFilters'; -import { DataProvider } from './providers/DataProvider'; import { MainContentArea } from './scaffolding'; const queryClient = new QueryClient(); @@ -15,12 +14,10 @@ const App = () => (
- - - - - - + + + +
diff --git a/application/frontend/src/const.ts b/application/frontend/src/const.ts index 3242939c4..bf6d5cf11 100644 --- a/application/frontend/src/const.ts +++ b/application/frontend/src/const.ts @@ -1,4 +1,5 @@ export const TWO_DAYS_MILLISECONDS = 1.728e8; +export const EXPLORER_CRE_PAGE_SIZE = 20; export const TYPE_IS_PART_OF = 'Is Part Of'; export const TYPE_LINKED_TO = 'Linked To'; diff --git a/application/frontend/src/pages/Explorer/ExplorerLayout.tsx b/application/frontend/src/pages/Explorer/ExplorerLayout.tsx new file mode 100644 index 000000000..ebd58f513 --- /dev/null +++ b/application/frontend/src/pages/Explorer/ExplorerLayout.tsx @@ -0,0 +1,19 @@ +import React from 'react'; + +import { DataProvider } from '../../providers/DataProvider'; + +type ExplorerLayoutProps = { + children: React.ReactNode; +}; + +export const ExplorerLayout = ({ children }: ExplorerLayoutProps) => {children}; + +export function withExplorerLayout

(Component: React.ComponentType

): React.FC

{ + const Wrapped = (props: P) => ( + + + + ); + Wrapped.displayName = `ExplorerLayout(${Component.displayName || Component.name || 'Component'})`; + return Wrapped; +} diff --git a/application/frontend/src/pages/Explorer/explorer.tsx b/application/frontend/src/pages/Explorer/explorer.tsx index 64bee6566..5d6a89dc5 100644 --- a/application/frontend/src/pages/Explorer/explorer.tsx +++ b/application/frontend/src/pages/Explorer/explorer.tsx @@ -13,11 +13,12 @@ import { GraphDebugPanel } from './GraphDebugPanel'; import { LinkedStandards } from './LinkedStandards'; export const Explorer = () => { - const { dataLoading, dataTree, dataStore } = useDataStore(); + const { dataLoading, dataTree, dataStore, hasMore, isLoadingMore, loadNextPage } = useDataStore(); const [loading, setLoading] = useState(false); const [filter, setFilter] = useState(''); const [filteredTree, setFilteredTree] = useState(); const [debugMode, setDebugMode] = useState(false); + const loadMoreRef = React.useRef(null); const applyHighlight = (text, term) => { if (!term) return text; @@ -84,6 +85,25 @@ export const Explorer = () => { setLoading(dataLoading); }, [dataLoading]); + useEffect(() => { + const sentinel = loadMoreRef.current; + if (!sentinel || !hasMore) { + return; + } + + const observer = new IntersectionObserver( + (entries) => { + if (entries.some((entry) => entry.isIntersecting)) { + loadNextPage(); + } + }, + { rootMargin: '200px' } + ); + + observer.observe(sentinel); + return () => observer.disconnect(); + }, [hasMore, loadNextPage, filteredTree]); + function processNode(item) { if (!item) { return <>; @@ -198,6 +218,8 @@ export const Explorer = () => { return processNode(item); })} +

+ {isLoadingMore && hasMore &&

Loading more requirements…

} ); diff --git a/application/frontend/src/pages/Explorer/visuals/circles/circles.tsx b/application/frontend/src/pages/Explorer/visuals/circles/circles.tsx index da3618d98..47615e8aa 100644 --- a/application/frontend/src/pages/Explorer/visuals/circles/circles.tsx +++ b/application/frontend/src/pages/Explorer/visuals/circles/circles.tsx @@ -10,7 +10,7 @@ import { Button, Icon } from 'semantic-ui-react'; export const ExplorerCircles = () => { const { height, width } = useWindowDimensions(); const [useFullScreen, setUseFullScreen] = useState(false); - const { dataLoading, dataTree } = useDataStore(); + const { dataLoading, dataTree, ensureFullExplorerData, fullLoadProgress } = useDataStore(); const [breadcrumb, setBreadcrumb] = useState([]); const svgRef = React.useRef(null); @@ -21,6 +21,10 @@ export const ExplorerCircles = () => { const zoomToRef = React.useRef(null); const margin = 20; + useEffect(() => { + ensureFullExplorerData(); + }, [ensureFullExplorerData]); + const defaultSize = width > height ? height - 100 : width; const size = useFullScreen ? width : defaultSize; @@ -447,7 +451,10 @@ export const ExplorerCircles = () => {
- + + {fullLoadProgress && ( +

Loading graph data ({fullLoadProgress})…

+ )} ); }; diff --git a/application/frontend/src/pages/Explorer/visuals/force-graph/forceGraph.tsx b/application/frontend/src/pages/Explorer/visuals/force-graph/forceGraph.tsx index cc9e47a52..46bafbca7 100644 --- a/application/frontend/src/pages/Explorer/visuals/force-graph/forceGraph.tsx +++ b/application/frontend/src/pages/Explorer/visuals/force-graph/forceGraph.tsx @@ -22,7 +22,8 @@ export const ExplorerForceGraph = () => { const [ignoreTypes, setIgnoreTypes] = useState(['same']); const [maxCount, setMaxCount] = useState(0); const [maxNodeSize, setMaxNodeSize] = useState(0); - const { dataLoading, dataTree, getStoreKey, dataStore } = useDataStore(); + const { dataLoading, dataTree, getStoreKey, dataStore, ensureFullExplorerData, fullLoadProgress } = + useDataStore(); const fgRef = useRef(); // ADDING STATE FOR FILTERING LOGIC const [filterTypeA, setFilterTypeA] = useState(''); @@ -32,6 +33,10 @@ export const ExplorerForceGraph = () => { const [creOptions, setCreOptions] = useState([]); const [combinedOptions, setCombinedOptions] = useState([]); + useEffect(() => { + ensureFullExplorerData(); + }, [ensureFullExplorerData]); + // Adding a show all checkbox const [showAll, setShowAll] = useState(true); @@ -431,7 +436,10 @@ export const ExplorerForceGraph = () => { }, [graphData]); return (
- + + {fullLoadProgress && ( +

Loading graph data ({fullLoadProgress})…

+ )} ; + loadedPages: number; + totalPages: number; + isFullStoreLoaded: boolean; +}; + +const isDataStoreCache = (value: unknown): value is DataStoreCache => { + if (!value || typeof value !== 'object') { + return false; + } + const record = value as Record; + return 'store' in record && 'loadedPages' in record && 'totalPages' in record; +}; type DataContextValues = { dataLoading: boolean; dataStore: Record; dataTree: TreeDocument[]; - getStoreKey; + getStoreKey: (doc: Document) => string; + hasMore: boolean; + isLoadingMore: boolean; + fullLoadProgress: string | null; + loadNextPage: () => Promise; + ensureFullExplorerData: () => Promise; }; export const DataContext = createContext(null); +const docToStoreEntry = (doc: Document): TreeDocument => + ({ + links: doc.links ?? [], + displayName: getTopicDisplayName(doc), + url: getInternalUrl(doc), + ...doc, + } as TreeDocument); + +const mergeDocsIntoStore = ( + docs: Document[], + store: Record, + getStoreKey: (doc: Document) => string +): Record => { + const nextStore = { ...store }; + docs.forEach((doc) => { + nextStore[getStoreKey(doc)] = docToStoreEntry(doc); + }); + return nextStore; +}; + export const DataProvider = ({ children }: { children: React.ReactNode }) => { const { apiUrl } = useEnvironment(); - // Default loading to 'true' and initialize data states as empty const [dataLoading, setDataLoading] = useState(true); const [dataStore, setDataStore] = useState>({}); const [dataTree, setDataTree] = useState([]); - - // Add new state to track if we have checked IndexedDB for cached data const [isHydrated, setIsHydrated] = useState(false); + const [loadedPages, setLoadedPages] = useState(0); + const [totalPages, setTotalPages] = useState(0); + const [isLoadingMore, setIsLoadingMore] = useState(false); + const [isFullStoreLoaded, setIsFullStoreLoaded] = useState(false); + const [fullLoadProgress, setFullLoadProgress] = useState(null); - const getStoreKey = (doc: Document): string => { + const dataStoreRef = useRef(dataStore); + const loadedPagesRef = useRef(loadedPages); + const totalPagesRef = useRef(totalPages); + const isFullStoreLoadedRef = useRef(isFullStoreLoaded); + const loadingPageRef = useRef(false); + const fullLoadRef = useRef | null>(null); + const bootstrapDoneRef = useRef(false); + + useEffect(() => { + dataStoreRef.current = dataStore; + }, [dataStore]); + useEffect(() => { + loadedPagesRef.current = loadedPages; + }, [loadedPages]); + useEffect(() => { + totalPagesRef.current = totalPages; + }, [totalPages]); + useEffect(() => { + isFullStoreLoadedRef.current = isFullStoreLoaded; + }, [isFullStoreLoaded]); + + const getStoreKey = useCallback((doc: Document): string => { if (doc.doctype === 'CRE') return doc.id; if (doc.doctype === 'Standard') return doc.name; return `${doc.name}-${doc.sectionID}-${doc.section}`; - }; - - const buildTree = (doc: Document, keyPath: string[] = []): TreeDocument => { - const selfKey = getStoreKey(doc); - keyPath.push(selfKey); - const storedDoc = structuredClone(dataStore[selfKey]); - const initialLinks = storedDoc.links; - let creLinks = initialLinks.filter( - (x) => - !!x.document && !keyPath.includes(getStoreKey(x.document)) && getStoreKey(x.document) in dataStore - ); - creLinks = creLinks.filter((x) => x.ltype === 'Contains'); - creLinks = creLinks.map((x) => ({ ltype: x.ltype, document: buildTree(x.document, keyPath) })); - storedDoc.links = [...creLinks]; - const standards = initialLinks.filter( - (link) => - link.document && link.document.doctype === 'Standard' && !keyPath.includes(getStoreKey(link.document)) - ); - storedDoc.links = [...creLinks, ...standards]; - return storedDoc; - }; - - // New effect to asynchronously load data from IndexedDB on component mount + }, []); + + const buildTree = useCallback( + (doc: Document, store: Record, keyPath: string[] = []): TreeDocument => { + const selfKey = getStoreKey(doc); + keyPath.push(selfKey); + const storedDoc = structuredClone(store[selfKey] ?? doc); + const initialLinks = storedDoc.links || []; + let creLinks = initialLinks.filter( + (x) => !!x.document && !keyPath.includes(getStoreKey(x.document)) && getStoreKey(x.document) in store + ); + creLinks = creLinks.filter((x) => x.ltype === 'Contains'); + creLinks = creLinks.map((x) => ({ + ltype: x.ltype, + document: buildTree(x.document, store, keyPath), + })); + storedDoc.links = [...creLinks]; + const standards = initialLinks.filter( + (link) => + link.document && + link.document.doctype === 'Standard' && + !keyPath.includes(getStoreKey(link.document)) + ); + storedDoc.links = [...creLinks, ...standards]; + return storedDoc; + }, + [getStoreKey] + ); + + const persistCache = useCallback( + async ( + store: Record, + pagesLoaded: number, + pagesTotal: number, + fullLoaded: boolean, + tree?: TreeDocument[] + ) => { + const payload: DataStoreCache = { + store, + loadedPages: pagesLoaded, + totalPages: pagesTotal, + isFullStoreLoaded: fullLoaded, + }; + await setDbObject(DATA_STORE_CACHE_KEY, payload, TWO_DAYS_MILLISECONDS); + if (tree) { + await setDbObject(DATA_TREE_KEY, tree, TWO_DAYS_MILLISECONDS); + } + }, + [] + ); + + const rebuildDataTree = useCallback( + async (store: Record) => { + if (!Object.keys(store).length) { + setDataTree([]); + return []; + } + const result = await axios.get(`${apiUrl}/root_cres`); + const treeData = result.data.data.map((x: Document) => buildTree(x, store)); + setDataTree(treeData); + return treeData; + }, + [apiUrl, buildTree] + ); + + const loadPage = useCallback( + async (page: number): Promise> => { + if (loadingPageRef.current) { + return dataStoreRef.current; + } + loadingPageRef.current = true; + setIsLoadingMore(true); + try { + const result = await axios.get(`${apiUrl}/all_cres`, { + params: { page, per_page: EXPLORER_CRE_PAGE_SIZE }, + }); + const docs: Document[] = result.data.data || []; + const pagesTotal = Number(result.data.total_pages) || 1; + const nextStore = mergeDocsIntoStore(docs, dataStoreRef.current, getStoreKey); + const pagesLoaded = page; + + dataStoreRef.current = nextStore; + setDataStore(nextStore); + setLoadedPages(pagesLoaded); + setTotalPages(pagesTotal); + loadedPagesRef.current = pagesLoaded; + totalPagesRef.current = pagesTotal; + + const fullLoaded = pagesLoaded >= pagesTotal; + if (fullLoaded) { + isFullStoreLoadedRef.current = true; + setIsFullStoreLoaded(true); + } + + const treeData = await rebuildDataTree(nextStore); + await persistCache(nextStore, pagesLoaded, pagesTotal, fullLoaded, treeData); + + return nextStore; + } finally { + loadingPageRef.current = false; + setIsLoadingMore(false); + } + }, + [apiUrl, getStoreKey, persistCache, rebuildDataTree] + ); + + const loadNextPage = useCallback(async () => { + if (isFullStoreLoadedRef.current) { + return; + } + const nextPage = loadedPagesRef.current + 1; + if (nextPage > totalPagesRef.current && totalPagesRef.current > 0) { + return; + } + await loadPage(nextPage); + }, [loadPage]); + + const ensureFullExplorerData = useCallback(async () => { + if (fullLoadRef.current) { + return fullLoadRef.current; + } + + fullLoadRef.current = (async () => { + setFullLoadProgress(null); + if (!loadedPagesRef.current) { + await loadPage(1); + } + while (loadedPagesRef.current < totalPagesRef.current) { + setFullLoadProgress(`${loadedPagesRef.current}/${totalPagesRef.current}`); + await loadPage(loadedPagesRef.current + 1); + } + isFullStoreLoadedRef.current = true; + setIsFullStoreLoaded(true); + setFullLoadProgress(null); + await rebuildDataTree(dataStoreRef.current); + })(); + + try { + await fullLoadRef.current; + } finally { + fullLoadRef.current = null; + } + }, [loadPage, rebuildDataTree]); + useEffect(() => { const hydrateStateFromDb = async () => { - console.log('Attempting to hydrate state from IndexedDB...'); - const cachedStore = await getDbObject(DATA_STORE_KEY); + const cached = await getDbObject(DATA_STORE_CACHE_KEY); const cachedTree = await getDbObject(DATA_TREE_KEY); - // If we found valid, unexpired data in the cache, load it into our state - if (cachedStore && Object.keys(cachedStore).length > 0) { - console.log('Cache hit. Hydrating state from IndexedDB.'); - setDataStore(cachedStore); - setDataTree(cachedTree || []); // Use cached tree, or empty array as fallback - } else { - console.log('Cache miss or expired. Will fetch fresh data from API.'); + if (isDataStoreCache(cached) && Object.keys(cached.store).length > 0) { + dataStoreRef.current = cached.store; + setDataStore(cached.store); + setLoadedPages(cached.loadedPages); + setTotalPages(cached.totalPages); + loadedPagesRef.current = cached.loadedPages; + totalPagesRef.current = cached.totalPages; + isFullStoreLoadedRef.current = cached.isFullStoreLoaded; + setIsFullStoreLoaded(cached.isFullStoreLoaded); + if (cachedTree?.length) { + setDataTree(cachedTree); + } + } else if (cached && typeof cached === 'object' && !isDataStoreCache(cached)) { + const legacyStore = cached as Record; + dataStoreRef.current = legacyStore; + setDataStore(legacyStore); + isFullStoreLoadedRef.current = true; + setIsFullStoreLoaded(true); + if (cachedTree?.length) { + setDataTree(cachedTree); + } } - // Mark hydration as complete. This will enable the API queries to run. setIsHydrated(true); }; hydrateStateFromDb(); }, []); - const getTreeQuery = useQuery( - 'root_cres', - async () => { - if (!dataTree.length && Object.keys(dataStore).length) { - try { - const result = await axios.get(`${apiUrl}/root_cres`); - const treeData = result.data.data.map((x) => buildTree(x)); - - // Save to IndexedDB (async) instead of localStorage - await setDbObject(DATA_TREE_KEY, treeData, TWO_DAYS_MILLISECONDS); - - setDataTree(treeData); - } catch (error) { - console.error(error); - } - } - }, - { - retry: false, - // The query is disabled until hydration is complete - enabled: isHydrated, + useEffect(() => { + if (!isHydrated || bootstrapDoneRef.current) { + return; } - ); + bootstrapDoneRef.current = true; - const getStoreQuery = useQuery( - 'all_cres', - async () => { - if (!Object.keys(dataStore).length) { - try { - const result = await axios.get(`${apiUrl}/all_cres?page=1&per_page=1000`); - let data = result.data.data; - let store = {}; - - if (data.length) { - data.forEach((x) => { - store[getStoreKey(x)] = { - links: x.links, - displayName: getTopicDisplayName(x), - url: getInternalUrl(x), - ...x, - }; - }); - - // CHANGE 5: Save to IndexedDB (async) instead of localStorage - await setDbObject(DATA_STORE_KEY, store, TWO_DAYS_MILLISECONDS); - - setDataStore(store); - console.log('retrieved all cres'); - } - } catch (error) { - console.error('Could not retrieve CREs error:'); - console.error(error); + const bootstrap = async () => { + setDataLoading(true); + try { + if (loadedPagesRef.current === 0 && !isFullStoreLoadedRef.current) { + await loadPage(1); + } else if (Object.keys(dataStoreRef.current).length) { + await rebuildDataTree(dataStoreRef.current); } + } finally { + setDataLoading(false); } - }, - { - retry: false, - // The query is disabled until hydration is complete - enabled: isHydrated, - } - ); + }; - useEffect(() => { - // Refined loading logic to account for the hydration phase - if (!isHydrated) { - setDataLoading(true); - } else { - setDataLoading(getStoreQuery.isLoading || getTreeQuery.isLoading); - } - }, [isHydrated, getStoreQuery.isLoading, getTreeQuery.isLoading]); + bootstrap(); + }, [isHydrated, loadPage, rebuildDataTree]); - // Added 'isHydrated' guard to prevent premature API calls useEffect(() => { - if (isHydrated) { - getStoreQuery.refetch(); + if (!isHydrated || isFullStoreLoaded || loadedPages === 0) { + return; } - }, [dataTree, isHydrated]); - useEffect(() => { - if (isHydrated) { - getTreeQuery.refetch(); + const idleCallback = (window as Window & { requestIdleCallback?: Function }).requestIdleCallback; + const cancelIdleCallback = (window as Window & { cancelIdleCallback?: Function }).cancelIdleCallback; + + const prefetch = () => { + if (!isFullStoreLoadedRef.current && loadedPagesRef.current < totalPagesRef.current) { + loadNextPage(); + } + }; + + if (idleCallback) { + const handle = idleCallback(prefetch, { timeout: 4000 }); + return () => cancelIdleCallback?.(handle); } - }, [dataStore, isHydrated]); // Also removed setDataStore from deps to be safer + + const timer = window.setTimeout(prefetch, 2000); + return () => window.clearTimeout(timer); + }, [isHydrated, isFullStoreLoaded, loadedPages, totalPages, loadNextPage]); + + const hasMore = !isFullStoreLoaded && loadedPages > 0 && loadedPages < totalPages; return ( { dataStore, dataTree, getStoreKey, + hasMore, + isLoadingMore, + fullLoadProgress, + loadNextPage, + ensureFullExplorerData, }} > {children} diff --git a/application/frontend/src/routes.tsx b/application/frontend/src/routes.tsx index f26b63798..58dbf501d 100644 --- a/application/frontend/src/routes.tsx +++ b/application/frontend/src/routes.tsx @@ -17,6 +17,7 @@ import { CommonRequirementEnumeration, Graph, SearchPage, Standard } from './pag import { BrowseRootCres } from './pages/BrowseRootCres/browseRootCres'; import { Chatbot } from './pages/chatbot/chatbot'; import { Explorer } from './pages/Explorer/explorer'; +import { withExplorerLayout } from './pages/Explorer/ExplorerLayout'; import { ExplorerCircles } from './pages/Explorer/visuals/circles/circles'; import { ExplorerForceGraph } from './pages/Explorer/visuals/force-graph/forceGraph'; import { GapAnalysis } from './pages/GapAnalysis/GapAnalysis'; @@ -112,17 +113,17 @@ export const ROUTES = (capabilities: Capabilities): IRoute[] => [ }, { path: `${EXPLORER}/circles`, - component: ExplorerCircles, + component: withExplorerLayout(ExplorerCircles), showFilter: false, }, { path: `${EXPLORER}/force_graph`, - component: ExplorerForceGraph, + component: withExplorerLayout(ExplorerForceGraph), showFilter: false, }, { path: `${EXPLORER}`, - component: Explorer, + component: withExplorerLayout(Explorer), showFilter: false, }, ]; diff --git a/application/frontend/www/bundle.js b/application/frontend/www/bundle.js index e5ac0cc91..c1abd0c26 100644 --- a/application/frontend/www/bundle.js +++ b/application/frontend/www/bundle.js @@ -1,2 +1,2 @@ /*! For license information please see bundle.js.LICENSE.txt */ -(()=>{var e={23:e=>{"use strict";function t(e){e.languages.mizar={comment:/::.+/,keyword:/@proof\b|\b(?:according|aggregate|all|and|antonym|are|as|associativity|assume|asymmetry|attr|be|begin|being|by|canceled|case|cases|clusters?|coherence|commutativity|compatibility|connectedness|consider|consistency|constructors|contradiction|correctness|def|deffunc|define|definitions?|defpred|do|does|end|environ|equals|ex|exactly|existence|for|from|func|given|hence|hereby|holds|idempotence|identity|iff?|implies|involutiveness|irreflexivity|is|it|let|means|mode|non|not|notations?|now|of|or|otherwise|over|per|pred|prefix|projectivity|proof|provided|qua|reconsider|redefine|reduce|reducibility|reflexivity|registrations?|requirements|reserve|sch|schemes?|section|selector|set|sethood|st|struct|such|suppose|symmetry|synonym|take|that|the|then|theorems?|thesis|thus|to|transitivity|uniqueness|vocabular(?:ies|y)|when|where|with|wrt)\b/,parameter:{pattern:/\$(?:10|\d)/,alias:"variable"},variable:/\b\w+(?=:)/,number:/(?:\b|-)\d+\b/,operator:/\.\.\.|->|&|\.?=/,punctuation:/\(#|#\)|[,:;\[\](){}]/}}e.exports=t,t.displayName="mizar",t.aliases=[]},33:e=>{"use strict";function t(e){!function(e){for(var t=/\(\*(?:[^(*]|\((?!\*)|\*(?!\))|)*\*\)/.source,n=0;n<2;n++)t=t.replace(//g,function(){return t});t=t.replace(//g,"[]"),e.languages.coq={comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},attribute:[{pattern:RegExp(/#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|)*\]/.source.replace(//g,function(){return t})),greedy:!0,alias:"attr-name",inside:{comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},operator:/=/,punctuation:/^#\[|\]$|[,()]/}},{pattern:/\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,alias:"attr-name"}],keyword:/\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,number:/\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,punct:{pattern:/@\{|\{\||\[=|:>/,alias:"punctuation"},operator:/\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,punctuation:/\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/}}(e)}e.exports=t,t.displayName="coq",t.aliases=[]},41:(e,t)=>{"use strict";var n,r,i,a;if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,c=s.now();t.unstable_now=function(){return s.now()-c}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var l=null,u=null,f=function(){if(null!==l)try{var e=t.unstable_now();l(!0,e),l=null}catch(e){throw setTimeout(f,0),e}};n=function(e){null!==l?setTimeout(n,0,e):(l=e,setTimeout(f,0))},r=function(e,t){u=setTimeout(e,t)},i=function(){clearTimeout(u)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var h=window.setTimeout,d=window.clearTimeout;if("undefined"!=typeof console){var p=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof p&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,b=null,m=-1,w=5,v=0;t.unstable_shouldYield=function(){return t.unstable_now()>=v},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,i=e[r];if(!(void 0!==i&&0T(o,n))void 0!==c&&0>T(c,o)?(e[r]=c,e[s]=n,r=s):(e[r]=o,e[a]=n,r=a);else{if(!(void 0!==c&&0>T(c,n)))break e;e[r]=c,e[s]=n,r=s}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var A=[],k=[],C=1,M=null,I=3,O=!1,R=!1,N=!1;function P(e){for(var t=S(k);null!==t;){if(null===t.callback)x(k);else{if(!(t.startTime<=e))break;x(k),t.sortIndex=t.expirationTime,_(A,t)}t=S(k)}}function L(e){if(N=!1,P(e),!R)if(null!==S(A))R=!0,n(D);else{var t=S(k);null!==t&&r(L,t.startTime-e)}}function D(e,n){R=!1,N&&(N=!1,i()),O=!0;var a=I;try{for(P(n),M=S(A);null!==M&&(!(M.expirationTime>n)||e&&!t.unstable_shouldYield());){var o=M.callback;if("function"==typeof o){M.callback=null,I=M.priorityLevel;var s=o(M.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?M.callback=s:M===S(A)&&x(A),P(n)}else x(A);M=S(A)}if(null!==M)var c=!0;else{var l=S(k);null!==l&&r(L,l.startTime-n),c=!1}return c}finally{M=null,I=a,O=!1}}var F=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){R||O||(R=!0,n(D))},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_getFirstCallbackNode=function(){return S(A)},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_scheduleCallback=function(e,a,o){var s=t.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0s?(e.sortIndex=o,_(k,e),null===S(A)&&e===S(k)&&(N?i():N=!0,r(L,o-s))):(e.sortIndex=c,_(A,e),R||O||(R=!0,n(D))),e},t.unstable_wrapCallback=function(e){var t=I;return function(){var n=I;I=t;try{return e.apply(this,arguments)}finally{I=n}}}},56:e=>{"use strict";function t(e){!function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(e)}e.exports=t,t.displayName="stylus",t.aliases=[]},58:e=>{"use strict";function t(e){!function(e){var t=/(?:\r?\n|\r)[ \t]*\|.+\|(?:(?!\|).)*/.source;e.languages.gherkin={pystring:{pattern:/("""|''')[\s\S]+?\1/,alias:"string"},comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},tag:{pattern:/(^[ \t]*)@\S*/m,lookbehind:!0},feature:{pattern:/((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Característica|Egenskab|Egenskap|Eiginleiki|Feature|Fīča|Fitur|Fonctionnalité|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Funcţionalitate|Funcționalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalitāte|Funkcionalnost|Funkcja|Funksie|Funktionalität|Funktionalitéit|Funzionalità|Hwaet|Hwæt|Jellemző|Karakteristik|Lastnost|Mak|Mogucnost|laH|Mogućnost|Moznosti|Možnosti|OH HAI|Omadus|Ominaisuus|Osobina|Özellik|Potrzeba biznesowa|perbogh|poQbogh malja'|Požadavek|Požiadavka|Pretty much|Qap|Qu'meH 'ut|Savybė|Tính năng|Trajto|Vermoë|Vlastnosť|Właściwość|Značilnost|Δυνατότητα|Λειτουργία|Могућност|Мөмкинлек|Особина|Свойство|Үзенчәлеклелек|Функционал|Функционалност|Функция|Функціонал|תכונה|خاصية|خصوصیت|صلاحیت|کاروبار کی ضرورت|وِیژگی|रूप लेख|ਖਾਸੀਅਤ|ਨਕਸ਼ ਨੁਹਾਰ|ਮੁਹਾਂਦਰਾ|గుణము|ಹೆಚ್ಚಳ|ความต้องการทางธุรกิจ|ความสามารถ|โครงหลัก|기능|フィーチャ|功能|機能):(?:[^:\r\n]+(?:\r?\n|\r|$))*/,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]+/,lookbehind:!0},keyword:/[^:\r\n]+:/}},scenario:{pattern:/(^[ \t]*)(?:Abstract Scenario|Abstrakt Scenario|Achtergrond|Aer|Ær|Agtergrond|All y'all|Antecedentes|Antecedents|Atburðarás|Atburðarásir|Awww, look mate|B4|Background|Baggrund|Bakgrund|Bakgrunn|Bakgrunnur|Beispiele|Beispiller|Bối cảnh|Cefndir|Cenario|Cenário|Cenario de Fundo|Cenário de Fundo|Cenarios|Cenários|Contesto|Context|Contexte|Contexto|Conto|Contoh|Contone|Dæmi|Dasar|Dead men tell no tales|Delineacao do Cenario|Delineação do Cenário|Dis is what went down|Dữ liệu|Dyagram Senaryo|Dyagram senaryo|Egzanp|Ejemplos|Eksempler|Ekzemploj|Enghreifftiau|Esbozo do escenario|Escenari|Escenario|Esempi|Esquema de l'escenari|Esquema del escenario|Esquema do Cenario|Esquema do Cenário|EXAMPLZ|Examples|Exempel|Exemple|Exemples|Exemplos|First off|Fono|Forgatókönyv|Forgatókönyv vázlat|Fundo|Geçmiş|Grundlage|Hannergrond|ghantoH|Háttér|Heave to|Istorik|Juhtumid|Keadaan|Khung kịch bản|Khung tình huống|Kịch bản|Koncept|Konsep skenario|Kontèks|Kontekst|Kontekstas|Konteksts|Kontext|Konturo de la scenaro|Latar Belakang|lut chovnatlh|lut|lutmey|Lýsing Atburðarásar|Lýsing Dæma|MISHUN SRSLY|MISHUN|Menggariskan Senario|mo'|Náčrt Scenára|Náčrt Scénáře|Náčrt Scenáru|Oris scenarija|Örnekler|Osnova|Osnova Scenára|Osnova scénáře|Osnutek|Ozadje|Paraugs|Pavyzdžiai|Példák|Piemēri|Plan du scénario|Plan du Scénario|Plan Senaryo|Plan senaryo|Plang vum Szenario|Pozadí|Pozadie|Pozadina|Príklady|Příklady|Primer|Primeri|Primjeri|Przykłady|Raamstsenaarium|Reckon it's like|Rerefons|Scenár|Scénář|Scenarie|Scenarij|Scenarijai|Scenarijaus šablonas|Scenariji|Scenārijs|Scenārijs pēc parauga|Scenarijus|Scenario|Scénario|Scenario Amlinellol|Scenario Outline|Scenario Template|Scenariomal|Scenariomall|Scenarios|Scenariu|Scenariusz|Scenaro|Schema dello scenario|Se ðe|Se the|Se þe|Senario|Senaryo Deskripsyon|Senaryo deskripsyon|Senaryo|Senaryo taslağı|Shiver me timbers|Situācija|Situai|Situasie Uiteensetting|Situasie|Skenario konsep|Skenario|Skica|Structura scenariu|Structură scenariu|Struktura scenarija|Stsenaarium|Swa hwaer swa|Swa|Swa hwær swa|Szablon scenariusza|Szenario|Szenariogrundriss|Tapaukset|Tapaus|Tapausaihio|Taust|Tausta|Template Keadaan|Template Senario|Template Situai|The thing of it is|Tình huống|Variantai|Voorbeelde|Voorbeelden|Wharrimean is|Yo-ho-ho|You'll wanna|Założenia|Παραδείγματα|Περιγραφή Σεναρίου|Σενάρια|Σενάριο|Υπόβαθρο|Кереш|Контекст|Концепт|Мисаллар|Мисоллар|Основа|Передумова|Позадина|Предистория|Предыстория|Приклади|Пример|Примери|Примеры|Рамка на сценарий|Скица|Структура сценарија|Структура сценария|Структура сценарію|Сценарий|Сценарий структураси|Сценарийның төзелеше|Сценарији|Сценарио|Сценарій|Тарих|Үрнәкләр|דוגמאות|רקע|תבנית תרחיש|תרחיש|الخلفية|الگوی سناریو|امثلة|پس منظر|زمینه|سناریو|سيناريو|سيناريو مخطط|مثالیں|منظر نامے کا خاکہ|منظرنامہ|نمونه ها|उदाहरण|परिदृश्य|परिदृश्य रूपरेखा|पृष्ठभूमि|ਉਦਾਹਰਨਾਂ|ਪਟਕਥਾ|ਪਟਕਥਾ ਢਾਂਚਾ|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਿਛੋਕੜ|ఉదాహరణలు|కథనం|నేపథ్యం|సన్నివేశం|ಉದಾಹರಣೆಗಳು|ಕಥಾಸಾರಾಂಶ|ವಿವರಣೆ|ಹಿನ್ನೆಲೆ|โครงสร้างของเหตุการณ์|ชุดของตัวอย่าง|ชุดของเหตุการณ์|แนวคิด|สรุปเหตุการณ์|เหตุการณ์|배경|시나리오|시나리오 개요|예|サンプル|シナリオ|シナリオアウトライン|シナリオテンプレ|シナリオテンプレート|テンプレ|例|例子|剧本|剧本大纲|劇本|劇本大綱|场景|场景大纲|場景|場景大綱|背景):[^:\r\n]*/m,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]*/,lookbehind:!0},keyword:/[^:\r\n]+:/}},"table-body":{pattern:RegExp("("+t+")(?:"+t+")+"),lookbehind:!0,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"},td:{pattern:/\s*[^\s|][^|]*/,alias:"string"},punctuation:/\|/}},"table-head":{pattern:RegExp(t),inside:{th:{pattern:/\s*[^\s|][^|]*/,alias:"variable"},punctuation:/\|/}},atrule:{pattern:/(^[ \t]+)(?:'a|'ach|'ej|7|a|A také|A taktiež|A tiež|A zároveň|Aber|Ac|Adott|Akkor|Ak|Aleshores|Ale|Ali|Allora|Alors|Als|Ama|Amennyiben|Amikor|Ampak|an|AN|Ananging|And y'all|And|Angenommen|Anrhegedig a|An|Apabila|Atès|Atesa|Atunci|Avast!|Aye|A|awer|Bagi|Banjur|Bet|Biết|Blimey!|Buh|But at the end of the day I reckon|But y'all|But|BUT|Cal|Când|Cand|Cando|Ce|Cuando|Če|Ða ðe|Ða|Dadas|Dada|Dados|Dado|DaH ghu' bejlu'|dann|Dann|Dano|Dan|Dar|Dat fiind|Data|Date fiind|Date|Dati fiind|Dati|Daţi fiind|Dați fiind|DEN|Dato|De|Den youse gotta|Dengan|Diberi|Diyelim ki|Donada|Donat|Donitaĵo|Do|Dun|Duota|Ðurh|Eeldades|Ef|Eğer ki|Entao|Então|Entón|E|En|Entonces|Epi|És|Etant donnée|Etant donné|Et|Étant données|Étant donnée|Étant donné|Etant données|Etant donnés|Étant donnés|Fakat|Gangway!|Gdy|Gegeben seien|Gegeben sei|Gegeven|Gegewe|ghu' noblu'|Gitt|Given y'all|Given|Givet|Givun|Ha|Cho|I CAN HAZ|In|Ir|It's just unbelievable|I|Ja|Jeśli|Jeżeli|Kad|Kada|Kadar|Kai|Kaj|Když|Keď|Kemudian|Ketika|Khi|Kiedy|Ko|Kuid|Kui|Kun|Lan|latlh|Le sa a|Let go and haul|Le|Lè sa a|Lè|Logo|Lorsqu'<|Lorsque|mä|Maar|Mais|Mając|Ma|Majd|Maka|Manawa|Mas|Men|Menawa|Mutta|Nalika|Nalikaning|Nanging|Når|När|Nato|Nhưng|Niin|Njuk|O zaman|Och|Og|Oletetaan|Ond|Onda|Oraz|Pak|Pero|Però|Podano|Pokiaľ|Pokud|Potem|Potom|Privzeto|Pryd|Quan|Quand|Quando|qaSDI'|Så|Sed|Se|Siis|Sipoze ke|Sipoze Ke|Sipoze|Si|Şi|Și|Soit|Stel|Tada|Tad|Takrat|Tak|Tapi|Ter|Tetapi|Tha the|Tha|Then y'all|Then|Thì|Thurh|Toda|Too right|Un|Und|ugeholl|Và|vaj|Vendar|Ve|wann|Wanneer|WEN|Wenn|When y'all|When|Wtedy|Wun|Y'know|Yeah nah|Yna|Youse know like when|Youse know when youse got|Y|Za predpokladu|Za předpokladu|Zadan|Zadani|Zadano|Zadate|Zadato|Zakładając|Zaradi|Zatati|Þa þe|Þa|Þá|Þegar|Þurh|Αλλά|Δεδομένου|Και|Όταν|Τότε|А також|Агар|Але|Али|Аммо|А|Әгәр|Әйтик|Әмма|Бирок|Ва|Вә|Дадено|Дано|Допустим|Если|Задате|Задати|Задато|И|І|К тому же|Када|Кад|Когато|Когда|Коли|Ләкин|Лекин|Нәтиҗәдә|Нехай|Но|Онда|Припустимо, що|Припустимо|Пусть|Также|Та|Тогда|Тоді|То|Унда|Һәм|Якщо|אבל|אזי|אז|בהינתן|וגם|כאשר|آنگاه|اذاً|اگر|اما|اور|با فرض|بالفرض|بفرض|پھر|تب|ثم|جب|عندما|فرض کیا|لكن|لیکن|متى|هنگامی|و|अगर|और|कदा|किन्तु|चूंकि|जब|तथा|तदा|तब|परन्तु|पर|यदि|ਅਤੇ|ਜਦੋਂ|ਜਿਵੇਂ ਕਿ|ਜੇਕਰ|ਤਦ|ਪਰ|అప్పుడు|ఈ పరిస్థితిలో|కాని|చెప్పబడినది|మరియు|ಆದರೆ|ನಂತರ|ನೀಡಿದ|ಮತ್ತು|ಸ್ಥಿತಿಯನ್ನು|กำหนดให้|ดังนั้น|แต่|เมื่อ|และ|그러면<|그리고<|단<|만약<|만일<|먼저<|조건<|하지만<|かつ<|しかし<|ただし<|ならば<|もし<|並且<|但し<|但是<|假如<|假定<|假設<|假设<|前提<|同时<|同時<|并且<|当<|當<|而且<|那么<|那麼<)(?=[ \t])/m,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"}}},outline:{pattern:/<[^>]+>/,alias:"variable"}}}(e)}e.exports=t,t.displayName="gherkin",t.aliases=[]},60:e=>{"use strict";function t(e){e.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i,greedy:!0},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],directive:{pattern:/#(?:Else|ElseIf|Endif|If|Pragma)\b/i,alias:"property"},keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|Auto|Boolean|Break|By(?:Ref|Val)|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:8|16|32|64|eger|erface)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Shared|Short|Single|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:8|16|32|64|eger)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|WeakAddressOf|Xor)\b/i,punctuation:/[.,;:()]/}}e.exports=t,t.displayName="xojo",t.aliases=[]},61:e=>{"use strict";function t(e){e.languages["splunk-spl"]={comment:/`comment\("(?:\\.|[^\\"])*"\)`/,string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0},keyword:/\b(?:abstract|accum|addcoltotals|addinfo|addtotals|analyzefields|anomalies|anomalousvalue|anomalydetection|append|appendcols|appendcsv|appendlookup|appendpipe|arules|associate|audit|autoregress|bin|bucket|bucketdir|chart|cluster|cofilter|collect|concurrency|contingency|convert|correlate|datamodel|dbinspect|dedup|delete|delta|diff|erex|eval|eventcount|eventstats|extract|fieldformat|fields|fieldsummary|filldown|fillnull|findtypes|folderize|foreach|format|from|gauge|gentimes|geom|geomfilter|geostats|head|highlight|history|iconify|input|inputcsv|inputlookup|iplocation|join|kmeans|kv|kvform|loadjob|localize|localop|lookup|makecontinuous|makemv|makeresults|map|mcollect|metadata|metasearch|meventcollect|mstats|multikv|multisearch|mvcombine|mvexpand|nomv|outlier|outputcsv|outputlookup|outputtext|overlap|pivot|predict|rangemap|rare|regex|relevancy|reltime|rename|replace|rest|return|reverse|rex|rtorder|run|savedsearch|script|scrub|search|searchtxn|selfjoin|sendemail|set|setfields|sichart|sirare|sistats|sitimechart|sitop|sort|spath|stats|strcat|streamstats|table|tags|tail|timechart|timewrap|top|transaction|transpose|trendline|tscollect|tstats|typeahead|typelearner|typer|union|uniq|untable|where|x11|xmlkv|xmlunescape|xpath|xyseries)\b/i,"operator-word":{pattern:/\b(?:and|as|by|not|or|xor)\b/i,alias:"operator"},function:/\b\w+(?=\s*\()/,property:/\b\w+(?=\s*=(?!=))/,date:{pattern:/\b\d{1,2}\/\d{1,2}\/\d{1,4}(?:(?::\d{1,2}){3})?\b/,alias:"number"},number:/\b\d+(?:\.\d+)?\b/,boolean:/\b(?:f|false|t|true)\b/i,operator:/[<>=]=?|[-+*/%|]/,punctuation:/[()[\],]/}}e.exports=t,t.displayName="splunkSpl",t.aliases=[]},70:(e,t,n)=>{"use strict";var r=n(8433);function i(e){e.register(r),e.languages.objectivec=e.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}e.exports=i,i.displayName="objectivec",i.aliases=["objc"]},73:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()(function(e){return e[1]});i.push([e.id,"main#gap-analysis{padding:30px;margin:var(--header-height) 0}main#gap-analysis span.name{padding:0 10px}@media(min-width: 0px)and (max-width: 500px){main#gap-analysis span.name{width:85px;display:inline-block}}",""]);const a=i},81:(e,t,n)=>{const r=n(3103);function i(e,t){return`\n${o(e,t)}\n${a(e)}\nreturn {Body: Body, Vector: Vector};\n`}function a(e){let t=r(e),n=t("{var}",{join:", "});return`\nfunction Body(${n}) {\n this.isPinned = false;\n this.pos = new Vector(${n});\n this.force = new Vector();\n this.velocity = new Vector();\n this.mass = 1;\n\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.reset = function() {\n this.force.reset();\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.setPosition = function (${n}) {\n ${t("this.pos.{var} = {var} || 0;",{indent:2})}\n};`}function o(e,t){let n=r(e),i="";return t&&(i=`${n("\n var v{var};\nObject.defineProperty(this, '{var}', {\n set: function(v) { \n if (!Number.isFinite(v)) throw new Error('Cannot set non-numbers to {var}');\n v{var} = v; \n },\n get: function() { return v{var}; }\n});")}`),`function Vector(${n("{var}",{join:", "})}) {\n ${i}\n if (typeof arguments[0] === 'object') {\n // could be another vector\n let v = arguments[0];\n ${n('if (!Number.isFinite(v.{var})) throw new Error("Expected value is not a finite number at Vector constructor ({var})");',{indent:4})}\n ${n("this.{var} = v.{var};",{indent:4})}\n } else {\n ${n('this.{var} = typeof {var} === "number" ? {var} : 0;',{indent:4})}\n }\n }\n \n Vector.prototype.reset = function () {\n ${n("this.{var} = ",{join:""})}0;\n };`}e.exports=function(e,t){let n=i(e,t),{Body:r}=new Function(n)();return r},e.exports.generateCreateBodyFunctionBody=i,e.exports.getVectorCode=o,e.exports.getBodyCode=a},94:(e,t,n)=>{"use strict";var r=n(618);function i(e){e.register(r),function(e){e.languages.crystal=e.languages.extend("ruby",{keyword:[/\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|annotation|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|ptr|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|undef|uninitialized|union|unless|until|when|while|with|yield)\b/,{pattern:/(\.\s*)(?:is_a|responds_to)\?/,lookbehind:!0}],number:/\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,operator:[/->/,e.languages.ruby.operator],punctuation:/[(){}[\].,;\\]/}),e.languages.insertBefore("crystal","string-literal",{attribute:{pattern:/@\[.*?\]/,inside:{delimiter:{pattern:/^@\[|\]$/,alias:"punctuation"},attribute:{pattern:/^(\s*)\w+/,lookbehind:!0,alias:"class-name"},args:{pattern:/\S(?:[\s\S]*\S)?/,inside:e.languages.crystal}}},expansion:{pattern:/\{(?:\{.*?\}|%.*?%)\}/,inside:{content:{pattern:/^(\{.)[\s\S]+(?=.\}$)/,lookbehind:!0,inside:e.languages.crystal},delimiter:{pattern:/^\{[\{%]|[\}%]\}$/,alias:"operator"}}},char:{pattern:/'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,greedy:!0}})}(e)}e.exports=i,i.displayName="crystal",i.aliases=[]},98:(e,t,n)=>{"use strict";var r=n(2046),i=["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"];e.exports=function(e){var t,n,a,o={};return e?(r.forEach(e.split("\n"),function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(o[t]&&i.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}}),o):o}},153:e=>{"use strict";function t(e){!function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(n){var r=t[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),"diff"===n&&i.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(e)}e.exports=t,t.displayName="diff",t.aliases=[]},164:(e,t,n)=>{"use strict";var r=n(5880);function i(e){e.register(r),e.languages.plsql=e.languages.extend("sql",{comment:{pattern:/\/\*[\s\S]*?\*\/|--.*/,greedy:!0},keyword:/\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,operator:/:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/}),e.languages.insertBefore("plsql","operator",{label:{pattern:/<<\s*\w+\s*>>/,alias:"symbol"}})}e.exports=i,i.displayName="plsql",i.aliases=[]},187:e=>{"use strict";function t(e){e.languages.jolie=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\[\s\S]|[^"\\])*"/,lookbehind:!0,greedy:!0},"class-name":{pattern:/((?:\b(?:as|courier|embed|in|inputPort|outputPort|service)\b|@)[ \t]*)\w+/,lookbehind:!0},keyword:/\b(?:as|cH|comp|concurrent|constants|courier|cset|csets|default|define|else|embed|embedded|execution|exit|extender|for|foreach|forward|from|global|if|import|in|include|init|inputPort|install|instanceof|interface|is_defined|linkIn|linkOut|main|new|nullProcess|outputPort|over|private|provide|public|scope|sequential|service|single|spawn|synchronized|this|throw|throws|type|undef|until|while|with)\b/,function:/\b[a-z_]\w*(?=[ \t]*[@(])/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?l?/i,operator:/-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[?\/%^@|]/,punctuation:/[()[\]{},;.:]/,builtin:/\b(?:Byte|any|bool|char|double|enum|float|int|length|long|ranges|regex|string|undefined|void)\b/}),e.languages.insertBefore("jolie","keyword",{aggregates:{pattern:/(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,lookbehind:!0,inside:{keyword:/\bwith\b/,"class-name":/\w+/,punctuation:/,/}},redirects:{pattern:/(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,lookbehind:!0,inside:{punctuation:/,/,"class-name":/\w+/,operator:/=>/}},property:{pattern:/\b(?:Aggregates|[Ii]nterfaces|Java|Javascript|Jolie|[Ll]ocation|OneWay|[Pp]rotocol|Redirects|RequestResponse)\b(?=[ \t]*:)/}})}e.exports=t,t.displayName="jolie",t.aliases=[]},261:(e,t,n)=>{"use strict";e.exports=n(4505)},267:(e,t,n)=>{"use strict";var r=n(4696);function i(e){e.register(r),e.languages.sparql=e.languages.extend("turtle",{boolean:/\b(?:false|true)\b/i,variable:{pattern:/[?$]\w+/,greedy:!0}}),e.languages.insertBefore("sparql","punctuation",{keyword:[/\b(?:A|ADD|ALL|AS|ASC|ASK|BNODE|BY|CLEAR|CONSTRUCT|COPY|CREATE|DATA|DEFAULT|DELETE|DESC|DESCRIBE|DISTINCT|DROP|EXISTS|FILTER|FROM|GROUP|HAVING|INSERT|INTO|LIMIT|LOAD|MINUS|MOVE|NAMED|NOT|NOW|OFFSET|OPTIONAL|ORDER|RAND|REDUCED|SELECT|SEPARATOR|SERVICE|SILENT|STRUUID|UNION|USING|UUID|VALUES|WHERE)\b/i,/\b(?:ABS|AVG|BIND|BOUND|CEIL|COALESCE|CONCAT|CONTAINS|COUNT|DATATYPE|DAY|ENCODE_FOR_URI|FLOOR|GROUP_CONCAT|HOURS|IF|IRI|isBLANK|isIRI|isLITERAL|isNUMERIC|isURI|LANG|LANGMATCHES|LCASE|MAX|MD5|MIN|MINUTES|MONTH|REGEX|REPLACE|ROUND|sameTerm|SAMPLE|SECONDS|SHA1|SHA256|SHA384|SHA512|STR|STRAFTER|STRBEFORE|STRDT|STRENDS|STRLANG|STRLEN|STRSTARTS|SUBSTR|SUM|TIMEZONE|TZ|UCASE|URI|YEAR)\b(?=\s*\()/i,/\b(?:BASE|GRAPH|PREFIX)\b/i]}),e.languages.rq=e.languages.sparql}e.exports=i,i.displayName="sparql",i.aliases=["rq"]},276:(e,t,n)=>{"use strict";var r=n(2046),i=n(7595),a=n(8854),o=n(3725);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||o.adapter)(e).then(function(t){return s(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(s(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},309:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()(function(e){return e[1]});i.push([e.id,"main#explorer-content{padding:30px;margin:var(--header-height) 0}main#explorer-content .search-field input{font-size:16px;height:32px;width:320px;margin-bottom:10px;border-radius:3px;border:1px solid #858585;padding:0 5px}main#explorer-content #graphs-menu{display:flex;margin-bottom:20px}main#explorer-content #graphs-menu .menu-title{margin:0 10px 0 0}main#explorer-content #graphs-menu ul{list-style:none;padding:0;margin:0;display:flex;font-size:15px}main#explorer-content #graphs-menu li{padding:0 8px}main#explorer-content #graphs-menu li+li{border-left:1px solid #b1b0b0}main#explorer-content #graphs-menu li:first-child{padding-left:0}main#explorer-content .list{padding:0;width:100%}main#explorer-content .arrow .icon{transform:rotate(-90deg)}main#explorer-content .arrow.active .icon{transform:rotate(0)}main#explorer-content .arrow:hover{cursor:pointer}main#explorer-content .item{border-top:1px dotted #d3d3d3;border-left:6px solid #d3d3d3;margin:4px 4px 4px 40px;background-color:rgba(200,200,200,.2);vertical-align:middle}main#explorer-content .item .content{display:flex;flex-wrap:wrap}main#explorer-content .item .header{margin-left:5px;overflow:hidden;white-space:nowrap;display:flex;align-items:center;vertical-align:middle}main#explorer-content .item .header>a{font-size:120%;line-height:30px;font-weight:bold;max-width:100%;white-space:normal}main#explorer-content .item .header .cre-code{margin-right:4px;color:gray}main#explorer-content .item .description{margin-left:20px}main#explorer-content .highlight{background-color:#ff0}main#explorer-content>.list>.item{margin-left:0}@media(min-width: 0px)and (max-width: 770px){#graphs-menu{flex-direction:column}}",""]);const a=i},310:e=>{"use strict";function t(e){e.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},identifier:{pattern:/([´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[{pattern:/(\bWITH\s+)COUNT(?=\s+INTO\b)/i,lookbehind:!0},/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_PATHS|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WINDOW|WITH)\b/i,{pattern:/(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,lookbehind:!0},{pattern:/\bOPTIONS(?=\s*\{)/i}],function:/\b(?!\d)\w+(?=\s*\()/,boolean:/\b(?:false|true)\b/i,range:{pattern:/\.\./,alias:"operator"},number:[/\b0b[01]+/i,/\b0x[0-9a-f]+/i,/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i],operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}}e.exports=t,t.displayName="aql",t.aliases=[]},323:e=>{"use strict";function t(e){e.languages.applescript={comment:[/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,/--.+/,/#.+/],string:/"(?:\\.|[^"\\\r\n])*"/,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?\b/i,operator:[/[&=≠≤≥*+\-\/÷^]|[<>]=?/,/\b(?:(?:begin|end|start)s? with|(?:contains?|(?:does not|doesn't) contain)|(?:is|isn't|is not) (?:contained by|in)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:comes|(?:does not|doesn't) come) (?:after|before)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equal to|equals|is not|isn't)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|as|div|mod|not|or))\b/],keyword:/\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,"class-name":/\b(?:POSIX file|RGB color|alias|application|boolean|centimeters|centimetres|class|constant|cubic centimeters|cubic centimetres|cubic feet|cubic inches|cubic meters|cubic metres|cubic yards|date|degrees Celsius|degrees Fahrenheit|degrees Kelvin|feet|file|gallons|grams|inches|integer|kilograms|kilometers|kilometres|list|liters|litres|meters|metres|miles|number|ounces|pounds|quarts|real|record|reference|script|square feet|square kilometers|square kilometres|square meters|square metres|square miles|square yards|text|yards)\b/,punctuation:/[{}():,¬«»《》]/}}e.exports=t,t.displayName="applescript",t.aliases=[]},334:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,o,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c{"use strict";function t(e){!function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(e)}e.exports=t,t.displayName="kotlin",t.aliases=["kt","kts"]},358:e=>{"use strict";function t(e){e.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,punctuation:/[()[\]{};,.]/},e.languages.uc=e.languages.uscript=e.languages.unrealscript}e.exports=t,t.displayName="unrealscript",t.aliases=["uc","uscript"]},377:e=>{"use strict";function t(e){e.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:False|True)\b/i,"class-name":/\b[A-Z][\dA-Z_]*\b/,number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}}e.exports=t,t.displayName="eiffel",t.aliases=[]},394:e=>{"use strict";function t(e){!function(e){e.languages.xquery=e.languages.extend("markup",{"xquery-comment":{pattern:/\(:[\s\S]*?:\)/,greedy:!0,alias:"comment"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},extension:{pattern:/\(#.+?#\)/,alias:"symbol"},variable:/\$[-\w:]+/,axis:{pattern:/(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/,lookbehind:!0,alias:"operator"},"keyword-operator":{pattern:/(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/,lookbehind:!0},function:/[\w-]+(?::[\w-]+)*(?=\s*\()/,"xquery-element":{pattern:/(element\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"tag"},"xquery-attribute":{pattern:/(attribute\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"attr-name"},builtin:{pattern:/(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:ENTITIES|ENTITY|ID|IDREFS?|NCName|NMTOKENS?|NOTATION|Name|QName|anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|int|integer|language|long|negativeInteger|nonNegativeInteger|nonPositiveInteger|normalizedString|positiveInteger|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/,lookbehind:!0},number:/\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/,operator:[/[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:/]/}),e.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,e.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/,e.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,e.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,inside:e.languages.xquery,alias:"language-xquery"};var t=function(e){return"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(t).join("")},n=function(r){for(var i=[],a=0;a0&&i[i.length-1].tagName===t(o.content[0].content[1])&&i.pop():"/>"===o.content[o.content.length-1].content||i.push({tagName:t(o.content[0].content[1]),openedBraces:0}):!(i.length>0&&"punctuation"===o.type&&"{"===o.content)||r[a+1]&&"punctuation"===r[a+1].type&&"{"===r[a+1].content||r[a-1]&&"plain-text"===r[a-1].type&&"{"===r[a-1].content?i.length>0&&i[i.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?i[i.length-1].openedBraces--:"comment"!==o.type&&(s=!0):i[i.length-1].openedBraces++),(s||"string"==typeof o)&&i.length>0&&0===i[i.length-1].openedBraces){var c=t(o);a0&&("string"==typeof r[a-1]||"plain-text"===r[a-1].type)&&(c=t(r[a-1])+c,r.splice(a-1,1),a--),/^\s+$/.test(c)?r[a]=c:r[a]=new e.Token("plain-text",c,null,c)}o.content&&"string"!=typeof o.content&&n(o.content)}};e.hooks.add("after-tokenize",function(e){"xquery"===e.language&&n(e.tokens)})}(e)}e.exports=t,t.displayName="xquery",t.aliases=[]},416:(e,t,n)=>{"use strict";n.d(t,{B:()=>a,t:()=>i});var r=console;function i(){return r}function a(e){r=e}},437:(e,t,n)=>{"use strict";var r=n(2046);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],a=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function l(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=c(void 0,e[i])):n[i]=c(e[i],t[i])}r.forEach(i,function(e){r.isUndefined(t[e])||(n[e]=c(void 0,t[e]))}),r.forEach(a,l),r.forEach(o,function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=c(void 0,e[i])):n[i]=c(void 0,t[i])}),r.forEach(s,function(r){r in t?n[r]=c(e[r],t[r]):r in e&&(n[r]=c(void 0,e[r]))});var u=i.concat(a).concat(o).concat(s),f=Object.keys(e).concat(Object.keys(t)).filter(function(e){return-1===u.indexOf(e)});return r.forEach(f,l),n}},452:e=>{"use strict";function t(e){!function(e){e.languages.ignore={comment:/^#.*/m,entry:{pattern:/\S(?:.*(?:(?:\\ )|\S))?/,alias:"string",inside:{operator:/^!|\*\*?|\?/,regex:{pattern:/(^|[^\\])\[[^\[\]]*\]/,lookbehind:!0},punctuation:/\//}}},e.languages.gitignore=e.languages.ignore,e.languages.hgignore=e.languages.ignore,e.languages.npmignore=e.languages.ignore}(e)}e.exports=t,t.displayName="ignore",t.aliases=["gitignore","hgignore","npmignore"]},463:e=>{"use strict";function t(e){e.languages.nasm={comment:/;.*$/m,string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,label:{pattern:/(^\s*)[A-Za-z._?$][\w.?$@~#]*:/m,lookbehind:!0,alias:"function"},keyword:[/\[?BITS (?:16|32|64)\]?/,{pattern:/(^\s*)section\s*[a-z.]+:?/im,lookbehind:!0},/(?:extern|global)[^;\r\n]*/i,/(?:CPU|DEFAULT|FLOAT).*$/m],register:{pattern:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s)\b/i,alias:"variable"},number:/(?:\b|(?=\$))(?:0[hx](?:\.[\da-f]+|[\da-f]+(?:\.[\da-f]+)?)(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-\/%<>=&|$!]/}}e.exports=t,t.displayName="nasm",t.aliases=[]},497:e=>{"use strict";function t(e){!function(e){e.languages.velocity=e.languages.extend("markup",{});var t={variable:{pattern:/(^|[^\\](?:\\\\)*)\$!?(?:[a-z][\w-]*(?:\([^)]*\))?(?:\.[a-z][\w-]*(?:\([^)]*\))?|\[[^\]]+\])*|\{[^}]+\})/i,lookbehind:!0,inside:{}},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},number:/\b\d+\b/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|[+*/%-]|&&|\|\||\.\.|\b(?:eq|g[et]|l[et]|n(?:e|ot))\b/,punctuation:/[(){}[\]:,.]/};t.variable.inside={string:t.string,function:{pattern:/([^\w-])[a-z][\w-]*(?=\()/,lookbehind:!0},number:t.number,boolean:t.boolean,punctuation:t.punctuation},e.languages.insertBefore("velocity","comment",{unparsed:{pattern:/(^|[^\\])#\[\[[\s\S]*?\]\]#/,lookbehind:!0,greedy:!0,inside:{punctuation:/^#\[\[|\]\]#$/}},"velocity-comment":[{pattern:/(^|[^\\])#\*[\s\S]*?\*#/,lookbehind:!0,greedy:!0,alias:"comment"},{pattern:/(^|[^\\])##.*/,lookbehind:!0,greedy:!0,alias:"comment"}],directive:{pattern:/(^|[^\\](?:\\\\)*)#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})(?:\s*\((?:[^()]|\([^()]*\))*\))?/i,lookbehind:!0,inside:{keyword:{pattern:/^#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})|\bin\b/,inside:{punctuation:/[{}]/}},rest:t}},variable:t.variable}),e.languages.velocity.tag.inside["attr-value"].inside.rest=e.languages.velocity}(e)}e.exports=t,t.displayName="velocity",t.aliases=[]},512:e=>{"use strict";function t(e){e.languages.cil={comment:/\/\/.*/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},directive:{pattern:/(^|\W)\.[a-z]+(?=\s)/,lookbehind:!0,alias:"class-name"},variable:/\[[\w\.]+\]/,keyword:/\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,function:/\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,boolean:/\b(?:false|true)\b/,number:/\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i,punctuation:/[{}[\];(),:=]|IL_[0-9A-Za-z]+/}}e.exports=t,t.displayName="cil",t.aliases=[]},527:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()(function(e){return e[1]});i.push([e.id,'.node{cursor:pointer}.node:hover{stroke:#000;stroke-width:1.5px}.node--leaf{fill:#fff}.label{font:11px "Helvetica Neue",Helvetica,Arial,sans-serif;text-anchor:middle;text-shadow:0 1px 0 #fff,1px 0 0 #fff,-1px 0 0 #fff,0 -1px 0 #fff}.label,.node--root,.ui.button.screen-size-button{margin:0;background-color:rgba(0,0,0,0)}.circle-tooltip{box-shadow:0 2px 5px rgba(0,0,0,.2);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;max-width:300px;word-wrap:break-word}.breadcrumb-item{word-break:break-word;overflow-wrap:anywhere;display:inline;max-width:100%}.breadcrumb-container{margin-top:0 !important;margin-bottom:0 !important;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;padding:10px;background-color:#f8f8f8;border-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,.1);overflow:auto;max-width:100%;line-height:1.4;white-space:normal;word-break:break-word;overflow-wrap:anywhere}',""]);const a=i},543:e=>{"use strict";function t(e){!function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},c=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(e)}e.exports=t,t.displayName="markdown",t.aliases=["md"]},571:e=>{"use strict";e.exports=n;var t=n.prototype;function n(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}t.space=null,t.normal={},t.property={}},597:(e,t,n)=>{"use strict";var r=n(8433);function i(e){e.register(r),e.languages.hlsl=e.languages.extend("c",{"class-name":[e.languages.c["class-name"],/\b(?:AppendStructuredBuffer|BlendState|Buffer|ByteAddressBuffer|CompileShader|ComputeShader|ConsumeStructuredBuffer|DepthStencilState|DepthStencilView|DomainShader|GeometryShader|Hullshader|InputPatch|LineStream|OutputPatch|PixelShader|PointStream|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture(?:1D|1DArray|2D|2DArray|3D)|RasterizerState|RenderTargetView|SamplerComparisonState|SamplerState|StructuredBuffer|Texture(?:1D|1DArray|2D|2DArray|2DMS|2DMSArray|3D|Cube|CubeArray)|TriangleStream|VertexShader)\b/],keyword:[/\b(?:asm|asm_fragment|auto|break|case|catch|cbuffer|centroid|char|class|column_major|compile|compile_fragment|const|const_cast|continue|default|delete|discard|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|fxgroup|goto|groupshared|if|in|inline|inout|interface|line|lineadj|linear|long|matrix|mutable|namespace|new|nointerpolation|noperspective|operator|out|packoffset|pass|pixelfragment|point|precise|private|protected|public|register|reinterpret_cast|return|row_major|sample|sampler|shared|short|signed|sizeof|snorm|stateblock|stateblock_state|static|static_cast|string|struct|switch|tbuffer|technique|technique10|technique11|template|texture|this|throw|triangle|triangleadj|try|typedef|typename|uniform|union|unorm|unsigned|using|vector|vertexfragment|virtual|void|volatile|while)\b/,/\b(?:bool|double|dword|float|half|int|min(?:10float|12int|16(?:float|int|uint))|uint)(?:[1-4](?:x[1-4])?)?\b/],number:/(?:(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?|\b0x[\da-fA-F]+)[fFhHlLuU]?\b/,boolean:/\b(?:false|true)\b/})}e.exports=i,i.displayName="hlsl",i.aliases=[]},604:e=>{"use strict";function t(e){e.languages.vhdl={comment:/--.+/,"vhdl-vectors":{pattern:/\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,alias:"number"},"quoted-function":{pattern:/"\S+?"(?=\()/,alias:"function"},string:/"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,constant:/\b(?:library|use)\b/i,keyword:/\b(?:'active|'ascending|'base|'delayed|'driving|'driving_value|'event|'high|'image|'instance_name|'last_active|'last_event|'last_value|'left|'leftof|'length|'low|'path_name|'pos|'pred|'quiet|'range|'reverse_range|'right|'rightof|'simple_name|'stable|'succ|'transaction|'val|'value|access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\w+(?=\()/,number:/'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,operator:/[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i,punctuation:/[{}[\];(),.:]/}}e.exports=t,t.displayName="vhdl",t.aliases=[]},613:(e,t,n)=>{e.exports=function(e){var t=n(2074),f=n(2475),h=n(5975);if(e){if(void 0!==e.springCoeff)throw new Error("springCoeff was renamed to springCoefficient");if(void 0!==e.dragCoeff)throw new Error("dragCoeff was renamed to dragCoefficient")}e=f(e,{springLength:10,springCoefficient:.8,gravity:-12,theta:.8,dragCoefficient:.9,timeStep:.5,adaptiveTimeStepWeight:0,dimensions:2,debug:!1});var d=l[e.dimensions];if(!d){var p=e.dimensions;d={Body:r(p,e.debug),createQuadTree:i(p),createBounds:a(p),createDragForce:o(p),createSpringForce:s(p),integrate:c(p)},l[p]=d}var g=d.Body,b=d.createQuadTree,m=d.createBounds,w=d.createDragForce,v=d.createSpringForce,y=d.integrate,E=n(4374).random(42),_=[],S=[],x=b(e,E),T=m(_,e,E),A=v(e,E),k=w(e),C=[],M=new Map,I=0;N("nbody",function(){if(0!==_.length){x.insertBodies(_);for(var e=_.length;e--;){var t=_[e];t.isPinned||(t.reset(),x.updateBodyForce(t),k.update(t))}}}),N("spring",function(){for(var e=S.length;e--;)A.update(S[e])});var O={bodies:_,quadTree:x,springs:S,settings:e,addForce:N,removeForce:function(e){var t=C.indexOf(M.get(e));t<0||(C.splice(t,1),M.delete(e))},getForces:function(){return M},step:function(){for(var t=0;tnew g(e))(e);return _.push(t),t},removeBody:function(e){if(e){var t=_.indexOf(e);if(!(t<0))return _.splice(t,1),0===_.length&&T.reset(),!0}},addSpring:function(e,n,r,i){if(!e||!n)throw new Error("Cannot add null spring to force simulator");"number"!=typeof r&&(r=-1);var a=new t(e,n,r,i>=0?i:-1);return S.push(a),a},getTotalMovement:function(){return 0},removeSpring:function(e){if(e){var t=S.indexOf(e);return t>-1?(S.splice(t,1),!0):void 0}},getBestNewBodyPosition:function(e){return T.getBestNewPosition(e)},getBBox:R,getBoundingBox:R,invalidateBBox:function(){console.warn("invalidateBBox() is deprecated, bounds always recomputed on `getBBox()` call")},gravity:function(t){return void 0!==t?(e.gravity=t,x.options({gravity:t}),this):e.gravity},theta:function(t){return void 0!==t?(e.theta=t,x.options({theta:t}),this):e.theta},random:E};return function(e,t){for(var n in e)u(e,t,n)}(e,O),h(O),O;function R(){return T.update(),T.box}function N(e,t){if(M.has(e))throw new Error("Force "+e+" is already added");M.set(e,t),C.push(t)}};var r=n(81),i=n(934),a=n(3599),o=n(5788),s=n(1325),c=n(680),l={};function u(e,t,n){if(e.hasOwnProperty(n)&&"function"!=typeof t[n]){var r=Number.isFinite(e[n]);t[n]=r?function(r){if(void 0!==r){if(!Number.isFinite(r))throw new Error("Value of "+n+" should be a valid number.");return e[n]=r,t}return e[n]}:function(r){return void 0!==r?(e[n]=r,t):e[n]}}}},618:e=>{"use strict";function t(e){!function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(e)}e.exports=t,t.displayName="ruby",t.aliases=["rb"]},640:e=>{"use strict";function t(e){!function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(e)}e.exports=t,t.displayName="sass",t.aliases=[]},672:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:a,seal:o,create:s}=Object,{apply:c,construct:l}="undefined"!=typeof Reflect&&Reflect;c||(c=function(e,t,n){return e.apply(t,n)}),a||(a=function(e){return e}),o||(o=function(e){return e}),l||(l=function(e,t){return new e(...t)});const u=_(Array.prototype.forEach),f=_(Array.prototype.pop),h=_(Array.prototype.push),d=_(String.prototype.toLowerCase),p=_(String.prototype.toString),g=_(String.prototype.match),b=_(String.prototype.replace),m=_(String.prototype.indexOf),w=_(String.prototype.trim),v=_(RegExp.prototype.test),y=(E=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),i=1;i/gm),j=o(/\${[\w\W]*}/gm),B=o(/^data-[\-\w.\u00B7-\uFFFF]/),z=o(/^aria-[\-\w]+$/),$=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=o(/^(?:\w+script|data):/i),G=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V=o(/^html$/i);var W=Object.freeze({__proto__:null,MUSTACHE_EXPR:F,ERB_EXPR:U,TMPLIT_EXPR:j,DATA_ATTR:B,ARIA_ATTR:z,IS_ALLOWED_URI:$,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:G,DOCTYPE_NAME:V});const q=()=>"undefined"==typeof window?null:window;return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q();const r=e=>t(e);if(r.version="3.0.5",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;const i=n.document,o=i.currentScript;let{document:s}=n;const{DocumentFragment:c,HTMLTemplateElement:l,Node:E,Element:_,NodeFilter:F,NamedNodeMap:U=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:j,DOMParser:B,trustedTypes:z}=n,H=_.prototype,G=T(H,"cloneNode"),X=T(H,"nextSibling"),Y=T(H,"childNodes"),K=T(H,"parentNode");if("function"==typeof l){const e=s.createElement("template");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let Z,Q="";const{implementation:J,createNodeIterator:ee,createDocumentFragment:te,getElementsByTagName:ne}=s,{importNode:re}=i;let ie={};r.isSupported="function"==typeof e&&"function"==typeof K&&J&&void 0!==J.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:oe,TMPLIT_EXPR:se,DATA_ATTR:ce,ARIA_ATTR:le,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:fe}=W;let{IS_ALLOWED_URI:he}=W,de=null;const pe=S({},[...A,...k,...C,...I,...R]);let ge=null;const be=S({},[...N,...P,...L,...D]);let me=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),we=null,ve=null,ye=!0,Ee=!0,_e=!1,Se=!0,xe=!1,Te=!1,Ae=!1,ke=!1,Ce=!1,Me=!1,Ie=!1,Oe=!0,Re=!1,Ne=!0,Pe=!1,Le={},De=null;const Fe=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ue=null;const je=S({},["audio","video","img","source","image","track"]);let Be=null;const ze=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",He="http://www.w3.org/2000/svg",Ge="http://www.w3.org/1999/xhtml";let Ve=Ge,We=!1,qe=null;const Xe=S({},[$e,He,Ge],p);let Ye;const Ke=["application/xhtml+xml","text/html"];let Ze,Qe=null;const Je=s.createElement("form"),et=function(e){return e instanceof RegExp||e instanceof Function},tt=function(e){if(!Qe||Qe!==e){if(e&&"object"==typeof e||(e={}),e=x(e),Ye=Ye=-1===Ke.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ze="application/xhtml+xml"===Ye?p:d,de="ALLOWED_TAGS"in e?S({},e.ALLOWED_TAGS,Ze):pe,ge="ALLOWED_ATTR"in e?S({},e.ALLOWED_ATTR,Ze):be,qe="ALLOWED_NAMESPACES"in e?S({},e.ALLOWED_NAMESPACES,p):Xe,Be="ADD_URI_SAFE_ATTR"in e?S(x(ze),e.ADD_URI_SAFE_ATTR,Ze):ze,Ue="ADD_DATA_URI_TAGS"in e?S(x(je),e.ADD_DATA_URI_TAGS,Ze):je,De="FORBID_CONTENTS"in e?S({},e.FORBID_CONTENTS,Ze):Fe,we="FORBID_TAGS"in e?S({},e.FORBID_TAGS,Ze):{},ve="FORBID_ATTR"in e?S({},e.FORBID_ATTR,Ze):{},Le="USE_PROFILES"in e&&e.USE_PROFILES,ye=!1!==e.ALLOW_ARIA_ATTR,Ee=!1!==e.ALLOW_DATA_ATTR,_e=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,xe=e.SAFE_FOR_TEMPLATES||!1,Te=e.WHOLE_DOCUMENT||!1,Ce=e.RETURN_DOM||!1,Me=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,ke=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,Re=e.SANITIZE_NAMED_PROPS||!1,Ne=!1!==e.KEEP_CONTENT,Pe=e.IN_PLACE||!1,he=e.ALLOWED_URI_REGEXP||$,Ve=e.NAMESPACE||Ge,me=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(me.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(me.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(me.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),xe&&(Ee=!1),Me&&(Ce=!0),Le&&(de=S({},[...R]),ge=[],!0===Le.html&&(S(de,A),S(ge,N)),!0===Le.svg&&(S(de,k),S(ge,P),S(ge,D)),!0===Le.svgFilters&&(S(de,C),S(ge,P),S(ge,D)),!0===Le.mathMl&&(S(de,I),S(ge,L),S(ge,D))),e.ADD_TAGS&&(de===pe&&(de=x(de)),S(de,e.ADD_TAGS,Ze)),e.ADD_ATTR&&(ge===be&&(ge=x(ge)),S(ge,e.ADD_ATTR,Ze)),e.ADD_URI_SAFE_ATTR&&S(Be,e.ADD_URI_SAFE_ATTR,Ze),e.FORBID_CONTENTS&&(De===Fe&&(De=x(De)),S(De,e.FORBID_CONTENTS,Ze)),Ne&&(de["#text"]=!0),Te&&S(de,["html","head","body"]),de.table&&(S(de,["tbody"]),delete we.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw y('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw y('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Z=e.TRUSTED_TYPES_POLICY,Q=Z.createHTML("")}else void 0===Z&&(Z=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(z,o)),null!==Z&&"string"==typeof Q&&(Q=Z.createHTML(""));a&&a(e),Qe=e}},nt=S({},["mi","mo","mn","ms","mtext"]),rt=S({},["foreignobject","desc","title","annotation-xml"]),it=S({},["title","style","font","a","script"]),at=S({},k);S(at,C),S(at,M);const ot=S({},I);S(ot,O);const st=function(e){h(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ct=function(e,t){try{h(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(Ce||Me)try{st(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},lt=function(e){let t,n;if(ke)e=""+e;else{const t=g(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ye&&Ve===Ge&&(e=''+e+"");const r=Z?Z.createHTML(e):e;if(Ve===Ge)try{t=(new B).parseFromString(r,Ye)}catch(e){}if(!t||!t.documentElement){t=J.createDocument(Ve,"template",null);try{t.documentElement.innerHTML=We?Q:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(s.createTextNode(n),i.childNodes[0]||null),Ve===Ge?ne.call(t,Te?"html":"body")[0]:Te?t.documentElement:i},ut=function(e){return ee.call(e.ownerDocument||e,e,F.SHOW_ELEMENT|F.SHOW_COMMENT|F.SHOW_TEXT,null,!1)},ft=function(e){return"object"==typeof E?e instanceof E:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ht=function(e,t,n){ie[e]&&u(ie[e],e=>{e.call(r,t,n,Qe)})},dt=function(e){let t;if(ht("beforeSanitizeElements",e,null),(n=e)instanceof j&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof U)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return st(e),!0;var n;const i=Ze(e.nodeName);if(ht("uponSanitizeElement",e,{tagName:i,allowedTags:de}),e.hasChildNodes()&&!ft(e.firstElementChild)&&(!ft(e.content)||!ft(e.content.firstElementChild))&&v(/<[/\w]/g,e.innerHTML)&&v(/<[/\w]/g,e.textContent))return st(e),!0;if(!de[i]||we[i]){if(!we[i]&>(i)){if(me.tagNameCheck instanceof RegExp&&v(me.tagNameCheck,i))return!1;if(me.tagNameCheck instanceof Function&&me.tagNameCheck(i))return!1}if(Ne&&!De[i]){const t=K(e)||e.parentNode,n=Y(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(G(n[r],!0),X(e))}return st(e),!0}return e instanceof _&&!function(e){let t=K(e);t&&t.tagName||(t={namespaceURI:Ve,tagName:"template"});const n=d(e.tagName),r=d(t.tagName);return!!qe[e.namespaceURI]&&(e.namespaceURI===He?t.namespaceURI===Ge?"svg"===n:t.namespaceURI===$e?"svg"===n&&("annotation-xml"===r||nt[r]):Boolean(at[n]):e.namespaceURI===$e?t.namespaceURI===Ge?"math"===n:t.namespaceURI===He?"math"===n&&rt[r]:Boolean(ot[n]):e.namespaceURI===Ge?!(t.namespaceURI===He&&!rt[r])&&!(t.namespaceURI===$e&&!nt[r])&&!ot[n]&&(it[n]||!at[n]):!("application/xhtml+xml"!==Ye||!qe[e.namespaceURI]))}(e)?(st(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!v(/<\/no(script|embed|frames)/i,e.innerHTML)?(xe&&3===e.nodeType&&(t=e.textContent,t=b(t,ae," "),t=b(t,oe," "),t=b(t,se," "),e.textContent!==t&&(h(r.removed,{element:e.cloneNode()}),e.textContent=t)),ht("afterSanitizeElements",e,null),!1):(st(e),!0)},pt=function(e,t,n){if(Oe&&("id"===t||"name"===t)&&(n in s||n in Je))return!1;if(Ee&&!ve[t]&&v(ce,t));else if(ye&&v(le,t));else if(!ge[t]||ve[t]){if(!(gt(e)&&(me.tagNameCheck instanceof RegExp&&v(me.tagNameCheck,e)||me.tagNameCheck instanceof Function&&me.tagNameCheck(e))&&(me.attributeNameCheck instanceof RegExp&&v(me.attributeNameCheck,t)||me.attributeNameCheck instanceof Function&&me.attributeNameCheck(t))||"is"===t&&me.allowCustomizedBuiltInElements&&(me.tagNameCheck instanceof RegExp&&v(me.tagNameCheck,n)||me.tagNameCheck instanceof Function&&me.tagNameCheck(n))))return!1}else if(Be[t]);else if(v(he,b(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==m(n,"data:")||!Ue[e])if(_e&&!v(ue,b(n,fe,"")));else if(n)return!1;return!0},gt=function(e){return e.indexOf("-")>0},bt=function(e){let t,n,i,a;ht("beforeSanitizeAttributes",e,null);const{attributes:o}=e;if(!o)return;const s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(a=o.length;a--;){t=o[a];const{name:c,namespaceURI:l}=t;if(n="value"===c?t.value:w(t.value),i=Ze(c),s.attrName=i,s.attrValue=n,s.keepAttr=!0,s.forceKeepAttr=void 0,ht("uponSanitizeAttribute",e,s),n=s.attrValue,s.forceKeepAttr)continue;if(ct(c,e),!s.keepAttr)continue;if(!Se&&v(/\/>/i,n)){ct(c,e);continue}xe&&(n=b(n,ae," "),n=b(n,oe," "),n=b(n,se," "));const u=Ze(e.nodeName);if(pt(u,i,n)){if(!Re||"id"!==i&&"name"!==i||(ct(c,e),n="user-content-"+n),Z&&"object"==typeof z&&"function"==typeof z.getAttributeType)if(l);else switch(z.getAttributeType(u,i)){case"TrustedHTML":n=Z.createHTML(n);break;case"TrustedScriptURL":n=Z.createScriptURL(n)}try{l?e.setAttributeNS(l,c,n):e.setAttribute(c,n),f(r.removed)}catch(e){}}}ht("afterSanitizeAttributes",e,null)},mt=function e(t){let n;const r=ut(t);for(ht("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ht("uponSanitizeShadowNode",n,null),dt(n)||(n.content instanceof c&&e(n.content),bt(n));ht("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t,n,a,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(We=!e,We&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ft(e)){if("function"!=typeof e.toString)throw y("toString is not a function");if("string"!=typeof(e=e.toString()))throw y("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Ae||tt(s),r.removed=[],"string"==typeof e&&(Pe=!1),Pe){if(e.nodeName){const t=Ze(e.nodeName);if(!de[t]||we[t])throw y("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof E)t=lt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!Ce&&!xe&&!Te&&-1===e.indexOf("<"))return Z&&Ie?Z.createHTML(e):e;if(t=lt(e),!t)return Ce?null:Ie?Q:""}t&&ke&&st(t.firstChild);const l=ut(Pe?e:t);for(;a=l.nextNode();)dt(a)||(a.content instanceof c&&mt(a.content),bt(a));if(Pe)return e;if(Ce){if(Me)for(o=te.call(t.ownerDocument);t.firstChild;)o.appendChild(t.firstChild);else o=t;return(ge.shadowroot||ge.shadowrootmode)&&(o=re.call(i,o,!0)),o}let u=Te?t.outerHTML:t.innerHTML;return Te&&de["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&v(V,t.ownerDocument.doctype.name)&&(u="\n"+u),xe&&(u=b(u,ae," "),u=b(u,oe," "),u=b(u,se," ")),Z&&Ie?Z.createHTML(u):u},r.setConfig=function(e){tt(e),Ae=!0},r.clearConfig=function(){Qe=null,Ae=!1},r.isValidAttribute=function(e,t,n){Qe||tt({});const r=Ze(e),i=Ze(t);return pt(r,i,n)},r.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],h(ie[e],t))},r.removeHook=function(e){if(ie[e])return f(ie[e])},r.removeHooks=function(e){ie[e]&&(ie[e]=[])},r.removeAllHooks=function(){ie={}},r}()}()},680:(e,t,n)=>{const r=n(3103);function i(e){let t=r(e);return`\n var length = bodies.length;\n if (length === 0) return 0;\n\n ${t("var d{var} = 0, t{var} = 0;",{indent:2})}\n\n for (var i = 0; i < length; ++i) {\n var body = bodies[i];\n if (body.isPinned) continue;\n\n if (adaptiveTimeStepWeight && body.springCount) {\n timeStep = (adaptiveTimeStepWeight * body.springLength/body.springCount);\n }\n\n var coeff = timeStep / body.mass;\n\n ${t("body.velocity.{var} += coeff * body.force.{var};",{indent:4})}\n ${t("var v{var} = body.velocity.{var};",{indent:4})}\n var v = Math.sqrt(${t("v{var} * v{var}",{join:" + "})});\n\n if (v > 1) {\n // We normalize it so that we move within timeStep range. \n // for the case when v <= 1 - we let velocity to fade out.\n ${t("body.velocity.{var} = v{var} / v;",{indent:6})}\n }\n\n ${t("d{var} = timeStep * body.velocity.{var};",{indent:4})}\n\n ${t("body.pos.{var} += d{var};",{indent:4})}\n\n ${t("t{var} += Math.abs(d{var});",{indent:4})}\n }\n\n return (${t("t{var} * t{var}",{join:" + "})})/length;\n`}e.exports=function(e){let t=i(e);return new Function("bodies","timeStep","adaptiveTimeStepWeight",t)},e.exports.generateIntegratorFunctionBody=i},706:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},712:e=>{"use strict";function t(e){!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,o=0;o{"use strict";function t(e){e.languages.bicep={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],property:[{pattern:/([\r\n][ \t]*)[a-z_]\w*(?=[ \t]*:)/i,lookbehind:!0},{pattern:/([\r\n][ \t]*)'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'(?=[ \t]*:)/,lookbehind:!0,greedy:!0}],string:[{pattern:/'''[^'][\s\S]*?'''/,greedy:!0},{pattern:/(^|[^\\'])'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0}],"interpolated-string":{pattern:/(^|[^\\'])'(?:\\.|\$(?:(?!\{)|\{[^{}\r\n]*\})|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}\r\n]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0},punctuation:/^\$\{|\}$/}},string:/[\s\S]+/}},datatype:{pattern:/(\b(?:output|param)\b[ \t]+\w+[ \t]+)\w+\b/,lookbehind:!0,alias:"class-name"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:existing|for|if|in|module|null|output|param|resource|targetScope|var)\b/,decorator:/@\w+\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,punctuation:/[{}[\];(),.:]/},e.languages.bicep["interpolated-string"].inside.interpolation.inside.expression.inside=e.languages.bicep}e.exports=t,t.displayName="bicep",t.aliases=[]},740:(e,t,n)=>{"use strict";var r=n(618);function i(e){e.register(r),function(e){e.languages.haml={"multiline-comment":{pattern:/((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*(?:(?:\r?\n|\r)\2[\t ].+)*/,lookbehind:!0,alias:"comment"},"multiline-code":[{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*(?:(?:\r?\n|\r)\2[\t ].*,[\t ]*)*(?:(?:\r?\n|\r)\2[\t ].+)/,lookbehind:!0,inside:e.languages.ruby},{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*(?:(?:\r?\n|\r)\2[\t ].*\|[\t ]*)*/,lookbehind:!0,inside:e.languages.ruby}],filter:{pattern:/((?:^|\r?\n|\r)([\t ]*)):[\w-]+(?:(?:\r?\n|\r)(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"symbol"}}},markup:{pattern:/((?:^|\r?\n|\r)[\t ]*)<.+/,lookbehind:!0,inside:e.languages.markup},doctype:{pattern:/((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/,lookbehind:!0},tag:{pattern:/((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^{}])+\}|\[[^\]]+\])*[\/<>]*/,lookbehind:!0,inside:{attributes:[{pattern:/(^|[^#])\{(?:\{[^}]+\}|[^{}])+\}/,lookbehind:!0,inside:e.languages.ruby},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/,lookbehind:!0},"attr-name":/[\w:-]+(?=\s*!?=|\s*[,)])/,punctuation:/[=(),]/}},{pattern:/\[[^\]]+\]/,inside:e.languages.ruby}],punctuation:/[<>]/}},code:{pattern:/((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,lookbehind:!0,inside:e.languages.ruby},interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},ruby:{pattern:/[\s\S]+/,inside:e.languages.ruby}}},punctuation:{pattern:/((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,lookbehind:!0}};for(var t=["css",{filter:"coffee",language:"coffeescript"},"erb","javascript","less","markdown","ruby","scss","textile"],n={},r=0,i=t.length;r{"use strict";function t(e){!function(e){var t=/(?:\B-|\b_|\b)[A-Za-z][\w-]*(?![\w-])/.source,n="(?:"+/\b(?:unsigned\s+)?long\s+long(?![\w-])/.source+"|"+/\b(?:unrestricted|unsigned)\s+[a-z]+(?![\w-])/.source+"|"+/(?!(?:unrestricted|unsigned)\b)/.source+t+/(?:\s*<(?:[^<>]|<[^<>]*>)*>)?/.source+")"+/(?:\s*\?)?/.source,r={};for(var i in e.languages["web-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"[^"]*"/,greedy:!0},namespace:{pattern:RegExp(/(\bnamespace\s+)/.source+t),lookbehind:!0},"class-name":[{pattern:/(^|[^\w-])(?:iterable|maplike|setlike)\s*<(?:[^<>]|<[^<>]*>)*>/,lookbehind:!0,inside:r},{pattern:RegExp(/(\b(?:attribute|const|deleter|getter|optional|setter)\s+)/.source+n),lookbehind:!0,inside:r},{pattern:RegExp("("+/\bcallback\s+/.source+t+/\s*=\s*/.source+")"+n),lookbehind:!0,inside:r},{pattern:RegExp(/(\btypedef\b\s*)/.source+n),lookbehind:!0,inside:r},{pattern:RegExp(/(\b(?:callback|dictionary|enum|interface(?:\s+mixin)?)\s+)(?!(?:interface|mixin)\b)/.source+t),lookbehind:!0},{pattern:RegExp(/(:\s*)/.source+t),lookbehind:!0},RegExp(t+/(?=\s+(?:implements|includes)\b)/.source),{pattern:RegExp(/(\b(?:implements|includes)\s+)/.source+t),lookbehind:!0},{pattern:RegExp(n+"(?="+/\s*(?:\.{3}\s*)?/.source+t+/\s*[(),;=]/.source+")"),inside:r}],builtin:/\b(?:ArrayBuffer|BigInt64Array|BigUint64Array|ByteString|DOMString|DataView|Float32Array|Float64Array|FrozenArray|Int16Array|Int32Array|Int8Array|ObservableArray|Promise|USVString|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray)\b/,keyword:[/\b(?:async|attribute|callback|const|constructor|deleter|dictionary|enum|getter|implements|includes|inherit|interface|mixin|namespace|null|optional|or|partial|readonly|required|setter|static|stringifier|typedef|unrestricted)\b/,/\b(?:any|bigint|boolean|byte|double|float|iterable|long|maplike|object|octet|record|sequence|setlike|short|symbol|undefined|unsigned|void)\b/],boolean:/\b(?:false|true)\b/,number:{pattern:/(^|[^\w-])-?(?:0x[0-9a-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|NaN|Infinity)(?![\w-])/i,lookbehind:!0},operator:/\.{3}|[=:?<>-]/,punctuation:/[(){}[\].,;]/},e.languages["web-idl"])"class-name"!==i&&(r[i]=e.languages["web-idl"][i]);e.languages.webidl=e.languages["web-idl"]}(e)}e.exports=t,t.displayName="webIdl",t.aliases=[]},745:e=>{"use strict";function t(e){!function(e){var t=e.languages.parser=e.languages.extend("markup",{keyword:{pattern:/(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,lookbehind:!0},variable:{pattern:/(^|[^^])\B\$(?:\w+|(?=[.{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{punctuation:/\.|:+/}},function:{pattern:/(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{keyword:{pattern:/(^@)(?:GET_|SET_)/,lookbehind:!0},punctuation:/\.|:+/}},escape:{pattern:/\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,alias:"builtin"},punctuation:/[\[\](){};]/});t=e.languages.insertBefore("parser","keyword",{"parser-comment":{pattern:/(\s)#.*/,lookbehind:!0,alias:"comment"},expression:{pattern:/(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,greedy:!0,lookbehind:!0,inside:{string:{pattern:/(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,lookbehind:!0},keyword:t.keyword,variable:t.variable,function:t.function,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[a-f\d]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?)\b/i,escape:t.escape,operator:/[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,punctuation:t.punctuation}}}),e.languages.insertBefore("inside","punctuation",{expression:t.expression,keyword:t.keyword,variable:t.variable,function:t.function,escape:t.escape,"parser-punctuation":{pattern:t.punctuation,alias:"punctuation"}},t.tag.inside["attr-value"])}(e)}e.exports=t,t.displayName="parser",t.aliases=[]},768:e=>{"use strict";function t(e){e.languages.asm6502={comment:/;.*/,directive:{pattern:/\.\w+(?= )/,alias:"property"},string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,"op-code":{pattern:/\b(?:ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA|adc|and|asl|bcc|bcs|beq|bit|bmi|bne|bpl|brk|bvc|bvs|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|jmp|jsr|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|rti|rts|sbc|sec|sed|sei|sta|stx|sty|tax|tay|tsx|txa|txs|tya)\b/,alias:"keyword"},"hex-number":{pattern:/#?\$[\da-f]{1,4}\b/i,alias:"number"},"binary-number":{pattern:/#?%[01]+\b/,alias:"number"},"decimal-number":{pattern:/#?\b\d+\b/,alias:"number"},register:{pattern:/\b[xya]\b/i,alias:"variable"},punctuation:/[(),:]/}}e.exports=t,t.displayName="asm6502",t.aliases=[]},816:(e,t,n)=>{"use strict";var r=n(1535),i=n(2208),a=r.booleanish,o=r.number,s=r.spaceSeparated;e.exports=i({transform:function(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:a,ariaAutoComplete:null,ariaBusy:a,ariaChecked:a,ariaColCount:o,ariaColIndex:o,ariaColSpan:o,ariaControls:s,ariaCurrent:null,ariaDescribedBy:s,ariaDetails:null,ariaDisabled:a,ariaDropEffect:s,ariaErrorMessage:null,ariaExpanded:a,ariaFlowTo:s,ariaGrabbed:a,ariaHasPopup:null,ariaHidden:a,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:s,ariaLevel:o,ariaLive:null,ariaModal:a,ariaMultiLine:a,ariaMultiSelectable:a,ariaOrientation:null,ariaOwns:s,ariaPlaceholder:null,ariaPosInSet:o,ariaPressed:a,ariaReadOnly:a,ariaRelevant:null,ariaRequired:a,ariaRoleDescription:s,ariaRowCount:o,ariaRowIndex:o,ariaRowSpan:o,ariaSelected:a,ariaSetSize:o,ariaSort:null,ariaValueMax:o,ariaValueMin:o,ariaValueNow:o,ariaValueText:null,role:null}})},851:(e,t,n)=>{e.exports=function(e){if("uniqueLinkId"in(e=e||{})&&(console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n","\n","Note: there is also change in default behavior: From now on each graph\nis considered to be not a multigraph by default (each edge is unique)."),e.multigraph=e.uniqueLinkId),void 0===e.multigraph&&(e.multigraph=!1),"function"!=typeof Map)throw new Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");var t,n=new Map,c=new Map,l={},u=0,f=e.multigraph?function(e,t,n){var r=s(e,t),i=l.hasOwnProperty(r);if(i||A(e,t)){i||(l[r]=0);var a="@"+ ++l[r];r=s(e+a,t+a)}return new o(e,t,n,r)}:function(e,t,n){var r=s(e,t),i=c.get(r);return i?(i.data=n,i):new o(e,t,n,r)},h=[],d=k,p=k,g=k,b=k,m={version:20,addNode:y,addLink:function(e,t,n){g();var r=E(e)||y(e),i=E(t)||y(t),o=f(e,t,n),s=c.has(o.id);return c.set(o.id,o),a(r,o),e!==t&&a(i,o),d(o,s?"update":"add"),b(),o},removeLink:function(e,t){return void 0!==t&&(e=A(e,t)),T(e)},removeNode:_,getNode:E,getNodeCount:S,getLinkCount:x,getEdgeCount:x,getLinksCount:x,getNodesCount:S,getLinks:function(e){var t=E(e);return t?t.links:null},forEachNode:I,forEachLinkedNode:function(e,t,r){var i=E(e);if(i&&i.links&&"function"==typeof t)return r?function(e,t,r){for(var i=e.values(),a=i.next();!a.done;){var o=a.value;if(o.fromId===t&&r(n.get(o.toId),o))return!0;a=i.next()}}(i.links,e,t):function(e,t,r){for(var i=e.values(),a=i.next();!a.done;){var o=a.value,s=o.fromId===t?o.toId:o.fromId;if(r(n.get(s),o))return!0;a=i.next()}}(i.links,e,t)},forEachLink:function(e){if("function"==typeof e)for(var t=c.values(),n=t.next();!n.done;){if(e(n.value))return!0;n=t.next()}},beginUpdate:g,endUpdate:b,clear:function(){g(),I(function(e){_(e.id)}),b()},hasLink:A,hasNode:E,getLink:A};return r(m),t=m.on,m.on=function(){return m.beginUpdate=g=C,m.endUpdate=b=M,d=w,p=v,m.on=t,t.apply(m,arguments)},m;function w(e,t){h.push({link:e,changeType:t})}function v(e,t){h.push({node:e,changeType:t})}function y(e,t){if(void 0===e)throw new Error("Invalid node identifier");g();var r=E(e);return r?(r.data=t,p(r,"update")):(r=new i(e,t),p(r,"add")),n.set(e,r),b(),r}function E(e){return n.get(e)}function _(e){var t=E(e);if(!t)return!1;g();var r=t.links;return r&&(r.forEach(T),t.links=null),n.delete(e),p(t,"remove"),b(),!0}function S(){return n.size}function x(){return c.size}function T(e){if(!e)return!1;if(!c.get(e.id))return!1;g(),c.delete(e.id);var t=E(e.fromId),n=E(e.toId);return t&&t.links.delete(e),n&&n.links.delete(e),d(e,"remove"),b(),!0}function A(e,t){if(void 0!==e&&void 0!==t)return c.get(s(e,t))}function k(){}function C(){u+=1}function M(){0==(u-=1)&&h.length>0&&(m.fire("changed",h),h.length=0)}function I(e){if("function"!=typeof e)throw new Error("Function is expected to iterate over graph nodes. You passed "+e);for(var t=n.values(),r=t.next();!r.done;){if(e(r.value))return!0;r=t.next()}}};var r=n(5975);function i(e,t){this.id=e,this.links=null,this.data=t}function a(e,t){e.links?e.links.add(t):e.links=new Set([t])}function o(e,t,n,r){this.fromId=e,this.toId=t,this.data=n,this.id=r}function s(e,t){return e.toString()+"👉 "+t.toString()}},856:(e,t,n)=>{"use strict";var r=n(7183);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},872:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.QueryClient,QueryClientProvider:()=>i.QueryClientProvider,useQuery:()=>i.useQuery});var r=n(4746);n.o(r,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return r.QueryClientProvider}}),n.o(r,"useQuery")&&n.d(t,{useQuery:function(){return r.useQuery}});var i=n(1443)},889:(e,t,n)=>{"use strict";var r=n(4336);function i(e){e.register(r),e.languages.idris=e.languages.extend("haskell",{comment:{pattern:/(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m},keyword:/\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/,builtin:void 0}),e.languages.insertBefore("idris","keyword",{"import-statement":{pattern:/(^\s*import\s+)(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m,lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.idr=e.languages.idris}e.exports=i,i.displayName="idris",i.aliases=["idr"]},892:e=>{"use strict";function t(e){e.languages.gcode={comment:/;.*|\B\(.*?\)\B/,string:{pattern:/"(?:""|[^"])*"/,greedy:!0},keyword:/\b[GM]\d+(?:\.\d+)?\b/,property:/\b[A-Z]/,checksum:{pattern:/(\*)\d+/,lookbehind:!0,alias:"number"},punctuation:/[:*]/}}e.exports=t,t.displayName="gcode",t.aliases=[]},905:e=>{"use strict";function t(e){e.languages.cypher={comment:/\/\/.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,greedy:!0},"class-name":{pattern:/(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,lookbehind:!0,greedy:!0},relationship:{pattern:/(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,lookbehind:!0,greedy:!0,alias:"property"},identifier:{pattern:/`(?:[^`\\\r\n])*`/,greedy:!0},variable:/\$\w+/,keyword:/\b(?:ADD|ALL|AND|AS|ASC|ASCENDING|ASSERT|BY|CALL|CASE|COMMIT|CONSTRAINT|CONTAINS|CREATE|CSV|DELETE|DESC|DESCENDING|DETACH|DISTINCT|DO|DROP|ELSE|END|ENDS|EXISTS|FOR|FOREACH|IN|INDEX|IS|JOIN|KEY|LIMIT|LOAD|MANDATORY|MATCH|MERGE|NODE|NOT|OF|ON|OPTIONAL|OR|ORDER(?=\s+BY)|PERIODIC|REMOVE|REQUIRE|RETURN|SCALAR|SCAN|SET|SKIP|START|STARTS|THEN|UNION|UNIQUE|UNWIND|USING|WHEN|WHERE|WITH|XOR|YIELD)\b/i,function:/\b\w+\b(?=\s*\()/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,operator:/:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,punctuation:/[()[\]{},;.]/}}e.exports=t,t.displayName="cypher",t.aliases=[]},913:e=>{"use strict";function t(e){!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(e)}e.exports=t,t.displayName="typescript",t.aliases=["ts"]},914:e=>{"use strict";function t(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}e.exports=t,t.displayName="ini",t.aliases=[]},923:(e,t,n)=>{"use strict";var r=n(8692);e.exports=r,r.register(n(2884)),r.register(n(7797)),r.register(n(6995)),r.register(n(5916)),r.register(n(5369)),r.register(n(5083)),r.register(n(3659)),r.register(n(2858)),r.register(n(5926)),r.register(n(4595)),r.register(n(323)),r.register(n(310)),r.register(n(5996)),r.register(n(6285)),r.register(n(9253)),r.register(n(768)),r.register(n(5766)),r.register(n(6969)),r.register(n(3907)),r.register(n(4972)),r.register(n(3678)),r.register(n(5656)),r.register(n(712)),r.register(n(9738)),r.register(n(6652)),r.register(n(5095)),r.register(n(731)),r.register(n(1275)),r.register(n(7659)),r.register(n(7650)),r.register(n(7751)),r.register(n(2601)),r.register(n(5445)),r.register(n(7465)),r.register(n(8433)),r.register(n(3776)),r.register(n(3088)),r.register(n(512)),r.register(n(6804)),r.register(n(3251)),r.register(n(6391)),r.register(n(3029)),r.register(n(9752)),r.register(n(33)),r.register(n(1377)),r.register(n(94)),r.register(n(8241)),r.register(n(5781)),r.register(n(5470)),r.register(n(2819)),r.register(n(9048)),r.register(n(905)),r.register(n(8356)),r.register(n(6627)),r.register(n(1322)),r.register(n(5945)),r.register(n(5875)),r.register(n(153)),r.register(n(2277)),r.register(n(9065)),r.register(n(5770)),r.register(n(1739)),r.register(n(1337)),r.register(n(1421)),r.register(n(377)),r.register(n(2432)),r.register(n(8473)),r.register(n(2668)),r.register(n(5183)),r.register(n(4473)),r.register(n(4761)),r.register(n(8160)),r.register(n(7949)),r.register(n(4003)),r.register(n(3770)),r.register(n(9122)),r.register(n(7322)),r.register(n(4052)),r.register(n(9846)),r.register(n(4584)),r.register(n(892)),r.register(n(8738)),r.register(n(4319)),r.register(n(58)),r.register(n(4652)),r.register(n(4838)),r.register(n(7600)),r.register(n(9443)),r.register(n(6325)),r.register(n(4508)),r.register(n(7849)),r.register(n(8072)),r.register(n(740)),r.register(n(6954)),r.register(n(4336)),r.register(n(2038)),r.register(n(9387)),r.register(n(597)),r.register(n(5174)),r.register(n(6853)),r.register(n(5686)),r.register(n(8194)),r.register(n(7107)),r.register(n(5467)),r.register(n(1525)),r.register(n(889)),r.register(n(6096)),r.register(n(452)),r.register(n(9338)),r.register(n(914)),r.register(n(4278)),r.register(n(3210)),r.register(n(4498)),r.register(n(3298)),r.register(n(2573)),r.register(n(7231)),r.register(n(3191)),r.register(n(187)),r.register(n(4215)),r.register(n(2293)),r.register(n(7603)),r.register(n(6647)),r.register(n(8148)),r.register(n(5729)),r.register(n(5166)),r.register(n(1328)),r.register(n(9229)),r.register(n(2809)),r.register(n(6656)),r.register(n(7427)),r.register(n(335)),r.register(n(5308)),r.register(n(5912)),r.register(n(2620)),r.register(n(1558)),r.register(n(4547)),r.register(n(2905)),r.register(n(5706)),r.register(n(1402)),r.register(n(4099)),r.register(n(8175)),r.register(n(1718)),r.register(n(8306)),r.register(n(8038)),r.register(n(6485)),r.register(n(5878)),r.register(n(543)),r.register(n(5562)),r.register(n(7007)),r.register(n(1997)),r.register(n(6966)),r.register(n(3019)),r.register(n(23)),r.register(n(3910)),r.register(n(3763)),r.register(n(2964)),r.register(n(5002)),r.register(n(4791)),r.register(n(2763)),r.register(n(1117)),r.register(n(463)),r.register(n(1698)),r.register(n(6146)),r.register(n(2408)),r.register(n(1464)),r.register(n(971)),r.register(n(4713)),r.register(n(70)),r.register(n(5268)),r.register(n(4797)),r.register(n(9128)),r.register(n(1471)),r.register(n(4983)),r.register(n(745)),r.register(n(9058)),r.register(n(2289)),r.register(n(5970)),r.register(n(1092)),r.register(n(6227)),r.register(n(5578)),r.register(n(1496)),r.register(n(6956)),r.register(n(164)),r.register(n(6393)),r.register(n(1459)),r.register(n(7309)),r.register(n(8985)),r.register(n(8545)),r.register(n(3935)),r.register(n(4493)),r.register(n(3171)),r.register(n(6220)),r.register(n(1288)),r.register(n(4340)),r.register(n(5508)),r.register(n(4727)),r.register(n(5456)),r.register(n(4591)),r.register(n(5306)),r.register(n(4559)),r.register(n(2563)),r.register(n(7794)),r.register(n(2132)),r.register(n(8622)),r.register(n(3123)),r.register(n(6181)),r.register(n(4210)),r.register(n(9984)),r.register(n(3791)),r.register(n(2252)),r.register(n(6358)),r.register(n(618)),r.register(n(7680)),r.register(n(5477)),r.register(n(640)),r.register(n(6042)),r.register(n(7473)),r.register(n(4478)),r.register(n(5147)),r.register(n(6580)),r.register(n(7993)),r.register(n(5670)),r.register(n(1972)),r.register(n(6923)),r.register(n(7656)),r.register(n(7881)),r.register(n(267)),r.register(n(61)),r.register(n(9530)),r.register(n(5880)),r.register(n(1269)),r.register(n(5394)),r.register(n(56)),r.register(n(9459)),r.register(n(7459)),r.register(n(5229)),r.register(n(6402)),r.register(n(4867)),r.register(n(4689)),r.register(n(7639)),r.register(n(8297)),r.register(n(6770)),r.register(n(1359)),r.register(n(9683)),r.register(n(1570)),r.register(n(4696)),r.register(n(3571)),r.register(n(913)),r.register(n(6499)),r.register(n(358)),r.register(n(5776)),r.register(n(1242)),r.register(n(2286)),r.register(n(7872)),r.register(n(8004)),r.register(n(497)),r.register(n(3802)),r.register(n(604)),r.register(n(4624)),r.register(n(7545)),r.register(n(1283)),r.register(n(2810)),r.register(n(744)),r.register(n(1126)),r.register(n(8400)),r.register(n(9144)),r.register(n(4485)),r.register(n(4686)),r.register(n(60)),r.register(n(394)),r.register(n(2837)),r.register(n(2831)),r.register(n(5542))},934:(e,t,n)=>{const r=n(3103),i=n(5987);function a(e){let t=r(e),n=Math.pow(2,e);return`\n\n/**\n * Our implementation of QuadTree is non-recursive to avoid GC hit\n * This data structure represent stack of elements\n * which we are trying to insert into quad tree.\n */\nfunction InsertStack () {\n this.stack = [];\n this.popIdx = 0;\n}\n\nInsertStack.prototype = {\n isEmpty: function() {\n return this.popIdx === 0;\n },\n push: function (node, body) {\n var item = this.stack[this.popIdx];\n if (!item) {\n // we are trying to avoid memory pressure: create new element\n // only when absolutely necessary\n this.stack[this.popIdx] = new InsertStackElement(node, body);\n } else {\n item.node = node;\n item.body = body;\n }\n ++this.popIdx;\n },\n pop: function () {\n if (this.popIdx > 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n\n${l(e)}\n${o(e)}\n${c(e)}\n${s(e)}\n\nfunction createQuadTree(options, random) {\n options = options || {};\n options.gravity = typeof options.gravity === 'number' ? options.gravity : -1;\n options.theta = typeof options.theta === 'number' ? options.theta : 0.8;\n\n var gravity = options.gravity;\n var updateQueue = [];\n var insertStack = new InsertStack();\n var theta = options.theta;\n\n var nodesCache = [];\n var currentInCache = 0;\n var root = newNode();\n\n return {\n insertBodies: insertBodies,\n\n /**\n * Gets root node if it is present\n */\n getRoot: function() {\n return root;\n },\n\n updateBodyForce: update,\n\n options: function(newOptions) {\n if (newOptions) {\n if (typeof newOptions.gravity === 'number') {\n gravity = newOptions.gravity;\n }\n if (typeof newOptions.theta === 'number') {\n theta = newOptions.theta;\n }\n\n return this;\n }\n\n return {\n gravity: gravity,\n theta: theta\n };\n }\n };\n\n function newNode() {\n // To avoid pressure on GC we reuse nodes.\n var node = nodesCache[currentInCache];\n if (node) {\n${function(){let e=[];for(let t=0;t {var}max) {var}max = pos.{var};",{indent:6})}\n }\n\n // Makes the bounds square.\n var maxSideLength = -Infinity;\n ${t("if ({var}max - {var}min > maxSideLength) maxSideLength = {var}max - {var}min ;",{indent:4})}\n\n currentInCache = 0;\n root = newNode();\n ${t("root.min_{var} = {var}min;",{indent:4})}\n ${t("root.max_{var} = {var}min + maxSideLength;",{indent:4})}\n\n i = bodies.length - 1;\n if (i >= 0) {\n root.body = bodies[i];\n }\n while (i--) {\n insert(bodies[i], root);\n }\n }\n\n function insert(newBody) {\n insertStack.reset();\n insertStack.push(root, newBody);\n\n while (!insertStack.isEmpty()) {\n var stackItem = insertStack.pop();\n var node = stackItem.node;\n var body = stackItem.body;\n\n if (!node.body) {\n // This is internal node. Update the total mass of the node and center-of-mass.\n ${t("var {var} = body.pos.{var};",{indent:8})}\n node.mass += body.mass;\n ${t("node.mass_{var} += body.mass * {var};",{indent:8})}\n\n // Recursively insert the body in the appropriate quadrant.\n // But first find the appropriate quadrant.\n var quadIdx = 0; // Assume we are in the 0's quad.\n ${t("var min_{var} = node.min_{var};",{indent:8})}\n ${t("var max_{var} = (min_{var} + node.max_{var}) / 2;",{indent:8})}\n\n${function(){let t=[],n=Array(9).join(" ");for(let r=0;r max_${i(r)}) {`),t.push(n+` quadIdx = quadIdx + ${Math.pow(2,r)};`),t.push(n+` min_${i(r)} = max_${i(r)};`),t.push(n+` max_${i(r)} = node.max_${i(r)};`),t.push(n+"}");return t.join("\n")}()}\n\n var child = getChild(node, quadIdx);\n\n if (!child) {\n // The node is internal but this quadrant is not taken. Add\n // subnode to it.\n child = newNode();\n ${t("child.min_{var} = min_{var};",{indent:10})}\n ${t("child.max_{var} = max_{var};",{indent:10})}\n child.body = body;\n\n setChild(node, quadIdx, child);\n } else {\n // continue searching in this quadrant.\n insertStack.push(child, body);\n }\n } else {\n // We are trying to add to the leaf node.\n // We have to convert current leaf into internal node\n // and continue adding two nodes.\n var oldBody = node.body;\n node.body = null; // internal nodes do not cary bodies\n\n if (isSamePosition(oldBody.pos, body.pos)) {\n // Prevent infinite subdivision by bumping one node\n // anywhere in this quadrant\n var retriesCount = 3;\n do {\n var offset = random.nextDouble();\n ${t("var d{var} = (node.max_{var} - node.min_{var}) * offset;",{indent:12})}\n\n ${t("oldBody.pos.{var} = node.min_{var} + d{var};",{indent:12})}\n retriesCount -= 1;\n // Make sure we don't bump it out of the box. If we do, next iteration should fix it\n } while (retriesCount > 0 && isSamePosition(oldBody.pos, body.pos));\n\n if (retriesCount === 0 && isSamePosition(oldBody.pos, body.pos)) {\n // This is very bad, we ran out of precision.\n // if we do not return from the method we'll get into\n // infinite loop here. So we sacrifice correctness of layout, and keep the app running\n // Next layout iteration should get larger bounding box in the first step and fix this\n return;\n }\n }\n // Next iteration should subdivide node further.\n insertStack.push(node, oldBody);\n insertStack.push(node, body);\n }\n }\n }\n}\nreturn createQuadTree;\n\n`}function o(e){let t=r(e);return`\n function isSamePosition(point1, point2) {\n ${t("var d{var} = Math.abs(point1.{var} - point2.{var});",{indent:2})}\n \n return ${t("d{var} < 1e-8",{join:" && "})};\n } \n`}function s(e){var t=Math.pow(2,e);return`\nfunction setChild(node, idx, child) {\n ${function(){let e=[];for(let n=0;n 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n"}e.exports=function(e){let t=a(e);return new Function(t)()},e.exports.generateQuadTreeFunctionBody=a,e.exports.getInsertStackCode=u,e.exports.getQuadNodeCode=l,e.exports.isSamePosition=o,e.exports.getChildBodyCode=c,e.exports.setChildBodyCode=s},971:e=>{"use strict";function t(e){e.languages.nix={comment:{pattern:/\/\*[\s\S]*?\*\/|#.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/,greedy:!0,inside:{interpolation:{pattern:/(^|(?:^|(?!'').)[^\\])\$\{(?:[^{}]|\{[^}]*\})*\}/,lookbehind:!0,inside:null}}},url:[/\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/,{pattern:/([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/,lookbehind:!0}],antiquotation:{pattern:/\$(?=\{)/,alias:"important"},number:/\b\d+\b/,keyword:/\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/,function:/\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:Tarball|url)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/,punctuation:/[{}()[\].,:;]/},e.languages.nix.string.inside.interpolation.inside=e.languages.nix}e.exports=t,t.displayName="nix",t.aliases=[]},993:(e,t,n)=>{"use strict";var r=n(6326),i=n(334),a=n(9828);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n
- + {fullLoadProgress && (

Loading graph data ({fullLoadProgress})…

)} diff --git a/application/frontend/src/pages/Explorer/visuals/force-graph/forceGraph.tsx b/application/frontend/src/pages/Explorer/visuals/force-graph/forceGraph.tsx index 46bafbca7..29f57c291 100644 --- a/application/frontend/src/pages/Explorer/visuals/force-graph/forceGraph.tsx +++ b/application/frontend/src/pages/Explorer/visuals/force-graph/forceGraph.tsx @@ -22,8 +22,15 @@ export const ExplorerForceGraph = () => { const [ignoreTypes, setIgnoreTypes] = useState(['same']); const [maxCount, setMaxCount] = useState(0); const [maxNodeSize, setMaxNodeSize] = useState(0); - const { dataLoading, dataTree, getStoreKey, dataStore, ensureFullExplorerData, fullLoadProgress } = - useDataStore(); + const { + dataLoading, + dataTree, + getStoreKey, + dataStore, + ensureFullExplorerData, + fullLoadProgress, + dataLoadError, + } = useDataStore(); const fgRef = useRef(); // ADDING STATE FOR FILTERING LOGIC const [filterTypeA, setFilterTypeA] = useState(''); @@ -34,7 +41,15 @@ export const ExplorerForceGraph = () => { const [combinedOptions, setCombinedOptions] = useState([]); useEffect(() => { - ensureFullExplorerData(); + let active = true; + void ensureFullExplorerData().catch((err) => { + if (active) { + console.error('Failed to load explorer graph data', err); + } + }); + return () => { + active = false; + }; }, [ensureFullExplorerData]); // Adding a show all checkbox @@ -436,7 +451,7 @@ export const ExplorerForceGraph = () => { }, [graphData]); return (
- + {fullLoadProgress && (

Loading graph data ({fullLoadProgress})…

)} diff --git a/application/frontend/src/providers/DataProvider.tsx b/application/frontend/src/providers/DataProvider.tsx index c72a10c84..09ca520aa 100644 --- a/application/frontend/src/providers/DataProvider.tsx +++ b/application/frontend/src/providers/DataProvider.tsx @@ -33,6 +33,7 @@ type DataContextValues = { hasMore: boolean; isLoadingMore: boolean; fullLoadProgress: string | null; + dataLoadError: Error | null; loadNextPage: () => Promise; ensureFullExplorerData: () => Promise; }; @@ -71,12 +72,14 @@ export const DataProvider = ({ children }: { children: React.ReactNode }) => { const [isLoadingMore, setIsLoadingMore] = useState(false); const [isFullStoreLoaded, setIsFullStoreLoaded] = useState(false); const [fullLoadProgress, setFullLoadProgress] = useState(null); + const [dataLoadError, setDataLoadError] = useState(null); const dataStoreRef = useRef(dataStore); const loadedPagesRef = useRef(loadedPages); const totalPagesRef = useRef(totalPages); const isFullStoreLoadedRef = useRef(isFullStoreLoaded); const loadingPageRef = useRef(false); + const loadChainRef = useRef(Promise.resolve>({})); const fullLoadRef = useRef | null>(null); const bootstrapDoneRef = useRef(false); @@ -102,23 +105,23 @@ export const DataProvider = ({ children }: { children: React.ReactNode }) => { const buildTree = useCallback( (doc: Document, store: Record, keyPath: string[] = []): TreeDocument => { const selfKey = getStoreKey(doc); - keyPath.push(selfKey); + const nextPath = [...keyPath, selfKey]; const storedDoc = structuredClone(store[selfKey] ?? doc); const initialLinks = storedDoc.links || []; let creLinks = initialLinks.filter( - (x) => !!x.document && !keyPath.includes(getStoreKey(x.document)) && getStoreKey(x.document) in store + (x) => !!x.document && !nextPath.includes(getStoreKey(x.document)) && getStoreKey(x.document) in store ); creLinks = creLinks.filter((x) => x.ltype === 'Contains'); creLinks = creLinks.map((x) => ({ ltype: x.ltype, - document: buildTree(x.document, store, keyPath), + document: buildTree(x.document, store, nextPath), })); storedDoc.links = [...creLinks]; const standards = initialLinks.filter( (link) => link.document && link.document.doctype === 'Standard' && - !keyPath.includes(getStoreKey(link.document)) + !nextPath.includes(getStoreKey(link.document)) ); storedDoc.links = [...creLinks, ...standards]; return storedDoc; @@ -154,51 +157,68 @@ export const DataProvider = ({ children }: { children: React.ReactNode }) => { setDataTree([]); return []; } - const result = await axios.get(`${apiUrl}/root_cres`); - const treeData = result.data.data.map((x: Document) => buildTree(x, store)); - setDataTree(treeData); - return treeData; + try { + const result = await axios.get(`${apiUrl}/root_cres`); + const treeData = result.data.data.map((x: Document) => buildTree(x, store)); + setDataTree(treeData); + return treeData; + } catch (err) { + const error = err instanceof Error ? err : new Error('Failed to load explorer tree'); + setDataLoadError(error); + throw error; + } }, [apiUrl, buildTree] ); const loadPage = useCallback( async (page: number): Promise> => { - if (loadingPageRef.current) { - return dataStoreRef.current; - } - loadingPageRef.current = true; - setIsLoadingMore(true); - try { - const result = await axios.get(`${apiUrl}/all_cres`, { - params: { page, per_page: EXPLORER_CRE_PAGE_SIZE }, - }); - const docs: Document[] = result.data.data || []; - const pagesTotal = Number(result.data.total_pages) || 1; - const nextStore = mergeDocsIntoStore(docs, dataStoreRef.current, getStoreKey); - const pagesLoaded = page; - - dataStoreRef.current = nextStore; - setDataStore(nextStore); - setLoadedPages(pagesLoaded); - setTotalPages(pagesTotal); - loadedPagesRef.current = pagesLoaded; - totalPagesRef.current = pagesTotal; - - const fullLoaded = pagesLoaded >= pagesTotal; - if (fullLoaded) { - isFullStoreLoadedRef.current = true; - setIsFullStoreLoaded(true); + const nextLoad = loadChainRef.current.then(async () => { + if (isFullStoreLoadedRef.current || (loadedPagesRef.current >= page && loadedPagesRef.current > 0)) { + return dataStoreRef.current; } - const treeData = await rebuildDataTree(nextStore); - await persistCache(nextStore, pagesLoaded, pagesTotal, fullLoaded, treeData); + loadingPageRef.current = true; + setIsLoadingMore(true); + try { + const result = await axios.get(`${apiUrl}/all_cres`, { + params: { page, per_page: EXPLORER_CRE_PAGE_SIZE }, + }); + const docs: Document[] = result.data.data || []; + const pagesTotal = Number(result.data.total_pages) || 1; + const nextStore = mergeDocsIntoStore(docs, dataStoreRef.current, getStoreKey); + const pagesLoaded = page; + + dataStoreRef.current = nextStore; + setDataStore(nextStore); + setLoadedPages(pagesLoaded); + setTotalPages(pagesTotal); + loadedPagesRef.current = pagesLoaded; + totalPagesRef.current = pagesTotal; + setDataLoadError(null); + + const fullLoaded = pagesLoaded >= pagesTotal; + if (fullLoaded) { + isFullStoreLoadedRef.current = true; + setIsFullStoreLoaded(true); + } + + const treeData = await rebuildDataTree(nextStore); + await persistCache(nextStore, pagesLoaded, pagesTotal, fullLoaded, treeData); + + return nextStore; + } catch (err) { + const error = err instanceof Error ? err : new Error('Failed to load CRE data'); + setDataLoadError(error); + throw error; + } finally { + loadingPageRef.current = false; + setIsLoadingMore(false); + } + }); - return nextStore; - } finally { - loadingPageRef.current = false; - setIsLoadingMore(false); - } + loadChainRef.current = nextLoad.catch(() => dataStoreRef.current); + return nextLoad; }, [apiUrl, getStoreKey, persistCache, rebuildDataTree] ); @@ -289,6 +309,8 @@ export const DataProvider = ({ children }: { children: React.ReactNode }) => { } else if (Object.keys(dataStoreRef.current).length) { await rebuildDataTree(dataStoreRef.current); } + } catch { + // loadPage/rebuildDataTree already set dataLoadError } finally { setDataLoading(false); } @@ -332,6 +354,7 @@ export const DataProvider = ({ children }: { children: React.ReactNode }) => { hasMore, isLoadingMore, fullLoadProgress, + dataLoadError, loadNextPage, ensureFullExplorerData, }} diff --git a/application/frontend/src/routes.tsx b/application/frontend/src/routes.tsx index 58dbf501d..d2d495a97 100644 --- a/application/frontend/src/routes.tsx +++ b/application/frontend/src/routes.tsx @@ -26,6 +26,10 @@ import { MyOpenCRE } from './pages/MyOpenCRE/MyOpenCRE'; import { SearchName } from './pages/Search/SearchName'; import { StandardSection } from './pages/Standard/StandardSection'; +const ExplorerWithLayout = withExplorerLayout(Explorer); +const ExplorerCirclesWithLayout = withExplorerLayout(ExplorerCircles); +const ExplorerForceGraphWithLayout = withExplorerLayout(ExplorerForceGraph); + export interface IRoute { path: string; component: ReactNode | ReactNode[]; @@ -113,17 +117,17 @@ export const ROUTES = (capabilities: Capabilities): IRoute[] => [ }, { path: `${EXPLORER}/circles`, - component: withExplorerLayout(ExplorerCircles), + component: ExplorerCirclesWithLayout, showFilter: false, }, { path: `${EXPLORER}/force_graph`, - component: withExplorerLayout(ExplorerForceGraph), + component: ExplorerForceGraphWithLayout, showFilter: false, }, { path: `${EXPLORER}`, - component: withExplorerLayout(Explorer), + component: ExplorerWithLayout, showFilter: false, }, ]; diff --git a/application/frontend/www/bundle.js b/application/frontend/www/bundle.js index c1abd0c26..82b47922d 100644 --- a/application/frontend/www/bundle.js +++ b/application/frontend/www/bundle.js @@ -1,2 +1,2 @@ /*! For license information please see bundle.js.LICENSE.txt */ -(()=>{var e={6137:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(9693);n(7598);var i=n(6326);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n=0;r-=1)this.handlers[r].called||(this.handlers[r].called=!0,this.handlers[r](e));for(var i=n;i>=0;i-=1)this.handlers[i].called=!1}else(0,this.handlers[n])(e)}},{key:"hasHandlers",value:function(){return this.handlers.length>0}},{key:"removeHandlers",value:function(t){for(var n=[],r=this.handlers.length,i=0;i0;var t=this.handlerSets.get(e);return!!t&&t.hasHandlers()}},{key:"removeHandlers",value:function(t,n){var r=p(this.handlerSets);if(!r.has(t))return new e(this.poolName,r);var i=r.get(t).removeHandlers(n);return i.hasHandlers()?r.set(t,i):r.delete(t),new e(this.poolName,r)}}]),e}();l(m,"createByType",(function(e,t,n){var r=new Map;return r.set(t,new d(n)),new m(e,r)}));var w=function(){function e(t){var n=this;o(this,e),l(this,"handlers",new Map),l(this,"pools",new Map),l(this,"target",void 0),l(this,"createEmitter",(function(e){return function(t){n.pools.forEach((function(n){n.dispatchEvent(e,t)}))}})),this.target=t}return c(e,[{key:"addHandlers",value:function(e,t,n){if(this.pools.has(e)){var r=this.pools.get(e);this.pools.set(e,r.addHandlers(t,n))}else this.pools.set(e,m.createByType(e,t,n));this.handlers.has(t)||this.addTargetHandler(t)}},{key:"hasHandlers",value:function(){return this.handlers.size>0}},{key:"removeHandlers",value:function(e,t,n){if(this.pools.has(e)){var r=this.pools.get(e).removeHandlers(t,n);r.hasHandlers()?this.pools.set(e,r):this.pools.delete(e);var i=!1;this.pools.forEach((function(e){return i=i||e.hasHandlers(t)})),i||this.removeTargetHandler(t)}}},{key:"addTargetHandler",value:function(e){var t=this.createEmitter(e);this.handlers.set(e,t),this.target.addEventListener(e,t,!0)}},{key:"removeTargetHandler",value:function(e){this.handlers.has(e)&&(this.target.removeEventListener(e,this.handlers.get(e),!0),this.handlers.delete(e))}}]),e}(),v=new(function(){function e(){var t=this;o(this,e),l(this,"targets",new Map),l(this,"getTarget",(function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=b(e);if(t.targets.has(r))return t.targets.get(r);if(!n)return null;var i=new w(r);return t.targets.set(r,i),i})),l(this,"removeTarget",(function(e){t.targets.delete(b(e))}))}return c(e,[{key:"sub",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(r.canUseDOM){var i=n.target,a=void 0===i?document:i,o=n.pool,s=void 0===o?"default":o;this.getTarget(a).addHandlers(s,e,g(t))}}},{key:"unsub",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(r.canUseDOM){var i=n.target,a=void 0===i?document:i,o=n.pool,s=void 0===o?"default":o,c=this.getTarget(a,!1);c&&(c.removeHandlers(s,e,g(t)),c.hasHandlers()||this.removeTarget(a))}}}]),e}()),y=function(e){function t(){return o(this,t),function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,f(t).apply(this,arguments))}return u(t,i.PureComponent),c(t,[{key:"componentDidMount",value:function(){this.subscribe(this.props)}},{key:"componentDidUpdate",value:function(e){this.unsubscribe(e),this.subscribe(this.props)}},{key:"componentWillUnmount",value:function(){this.unsubscribe(this.props)}},{key:"subscribe",value:function(e){var t=e.name,n=e.on,r=e.pool,i=e.target;v.sub(t,n,{pool:r,target:i})}},{key:"unsubscribe",value:function(e){var t=e.name,n=e.on,r=e.pool,i=e.target;v.unsub(t,n,{pool:r,target:i})}},{key:"render",value:function(){return null}}]),t}();l(y,"defaultProps",{pool:"default",target:"document"}),y.propTypes={},t.instance=v,t.default=y},8638:(e,t,n)=>{"use strict";var r;r=n(6137),e.exports=r.default,e.exports.instance=r.instance},6899:(e,t,n)=>{e.exports=n(8693)},2274:(e,t,n)=>{"use strict";var r=n(2046),i=n(3556),a=n(8706),o=n(4912),s=n(4921),c=n(98),l=n(7736),u=n(2149);e.exports=function(e){return new Promise((function(t,n){var f=e.data,h=e.headers,d=e.responseType;r.isFormData(f)&&delete h["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var g=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";h.Authorization="Basic "+btoa(g+":"+b)}var m=s(e.baseURL,e.url);function w(){if(p){var r="getAllResponseHeaders"in p?c(p.getAllResponseHeaders()):null,a={data:d&&"text"!==d&&"json"!==d?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:r,config:e,request:p};i(t,n,a),p=null}}if(p.open(e.method.toUpperCase(),o(m,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,"onloadend"in p?p.onloadend=w:p.onreadystatechange=function(){p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))&&setTimeout(w)},p.onabort=function(){p&&(n(u("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){n(u("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(u(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var v=(e.withCredentials||l(m))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;v&&(h[e.xsrfHeaderName]=v)}"setRequestHeader"in p&&r.forEach(h,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete h[t]:p.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),d&&"json"!==d&&(p.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),n(e),p=null)})),f||(f=null),p.send(f)}))}},8693:(e,t,n)=>{"use strict";var r=n(2046),i=n(4266),a=n(8053),o=n(437);function s(e){var t=new a(e),n=i(a.prototype.request,t);return r.extend(n,a.prototype,t),r.extend(n,t),n}var c=s(n(3725));c.Axios=a,c.create=function(e){return s(o(c.defaults,e))},c.Cancel=n(6562),c.CancelToken=n(1537),c.isCancel=n(8854),c.all=function(e){return Promise.all(e)},c.spread=n(706),c.isAxiosError=n(5645),e.exports=c,e.exports.default=c},6562:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},1537:(e,t,n)=>{"use strict";var r=n(6562);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},8854:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},8053:(e,t,n)=>{"use strict";var r=n(2046),i=n(4912),a=n(9685),o=n(276),s=n(437),c=n(5703),l=c.validators;function u(e){this.defaults=e,this.interceptors={request:new a,response:new a}}u.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:l.transitional(l.boolean,"1.0.0"),forcedJSONParsing:l.transitional(l.boolean,"1.0.0"),clarifyTimeoutError:l.transitional(l.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!r){var u=[o,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(a),i=Promise.resolve(e);u.length;)i=i.then(u.shift(),u.shift());return i}for(var f=e;n.length;){var h=n.shift(),d=n.shift();try{f=h(f)}catch(e){d(e);break}}try{i=o(f)}catch(e){return Promise.reject(e)}for(;a.length;)i=i.then(a.shift(),a.shift());return i},u.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){u.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){u.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=u},9685:(e,t,n)=>{"use strict";var r=n(2046);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},4921:(e,t,n)=>{"use strict";var r=n(1215),i=n(8154);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},2149:(e,t,n)=>{"use strict";var r=n(7875);e.exports=function(e,t,n,i,a){var o=new Error(e);return r(o,t,n,i,a)}},276:(e,t,n)=>{"use strict";var r=n(2046),i=n(7595),a=n(8854),o=n(3725);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return s(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(s(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},7875:e=>{"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.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:this.config,code:this.code}},e}},437:(e,t,n)=>{"use strict";var r=n(2046);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],a=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function l(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=c(void 0,e[i])):n[i]=c(e[i],t[i])}r.forEach(i,(function(e){r.isUndefined(t[e])||(n[e]=c(void 0,t[e]))})),r.forEach(a,l),r.forEach(o,(function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=c(void 0,e[i])):n[i]=c(void 0,t[i])})),r.forEach(s,(function(r){r in t?n[r]=c(e[r],t[r]):r in e&&(n[r]=c(void 0,e[r]))}));var u=i.concat(a).concat(o).concat(s),f=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===u.indexOf(e)}));return r.forEach(f,l),n}},3556:(e,t,n)=>{"use strict";var r=n(2149);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},7595:(e,t,n)=>{"use strict";var r=n(2046),i=n(3725);e.exports=function(e,t,n){var a=this||i;return r.forEach(n,(function(n){e=n.call(a,e,t)})),e}},3725:(e,t,n)=>{"use strict";var r=n(2046),i=n(7892),a=n(7875),o={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,l={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=n(2274)),c),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(0,JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw a(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){l.headers[e]=r.merge(o)})),e.exports=l},4266:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(2046);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var o=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),o.push(i(t)+"="+i(e))})))})),a=o.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},8154:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},8706:(e,t,n)=>{"use strict";var r=n(2046);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,a,o){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1215:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},5645:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7736:(e,t,n)=>{"use strict";var r=n(2046);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{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 e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},7892:(e,t,n)=>{"use strict";var r=n(2046);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},98:(e,t,n)=>{"use strict";var r=n(2046),i=["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"];e.exports=function(e){var t,n,a,o={};return e?(r.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(o[t]&&i.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},706:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},5703:(e,t,n)=>{"use strict";var r=n(3760),i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={},o=r.version.split(".");function s(e,t){for(var n=t?t.split("."):o,r=e.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]0;){var a=r[i],o=t[a];if(o){var s=e[a],c=void 0===s||o(s,a,e);if(!0!==c)throw new TypeError("option "+a+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+a)}},validators:i}},2046:(e,t,n)=>{"use strict";var r=n(4266),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function o(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n{"use strict";t.q=function(e){for(var t,i=[],a=String(e||r),o=a.indexOf(n),s=0,c=!1;!c;)-1===o&&(o=a.length,c=!0),!(t=a.slice(s,o).trim())&&c||i.push(t),s=o+1,o=a.indexOf(n,s);return i};var n=",",r=""},7334:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,"*{box-sizing:border-box}html,body{height:100%;width:100%;margin:0;padding:0;overscroll-behavior-y:none}html{text-size-adjust:100%;background-color:#fff}body{background-color:#fff;overflow:hidden}#mount{height:100%;width:100%;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:none}.app{min-height:100%}",""]);const a=i},6771:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,".document-node .icon.circle{font-size:.5em;position:relative;text-align:center;margin:0 .6rem 0 .3rem;padding:0 .5rem 0 0}.document-node .icon.external{color:#2185d0;font-size:.9em;padding-left:.5em}.document-node .external:hover::before{color:#115c96;padding:1px}.document-node .external-link a,.document-node.external-link a{color:rgba(0,0,0,.4)}.document-node .external-link:hover a,.document-node.external-link:hover a{color:rgba(0,0,0,.87)}.document-node__link-type-container hr{margin:15px 0}.document-node__link-type-container{border-left:3px solid rgba(33,133,208,.2);margin-left:.5rem;padding-left:.75rem}.document-node__link-type-container .accordion.ui.styled div>.title.external-link{padding-top:0;padding-bottom:.25em}.document-node__link-type-container .accordion.ui.styled div:first-child>.title.external-link{padding-top:.75em;padding-bottom:.25em}.document-node__link-type-container .accordion.ui.styled div>span+.title.external-link{border-top:none}.document-node__link-type-container .accordion.ui.styled div:last-child>.title.external-link{padding-bottom:.75em}",""]);const a=i},5941:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,".cre-page{padding:30px;margin:var(--header-height) 0}.cre-page__links-container{margin-top:10px}.cre-page .cre-page__heading{font-size:2rem;margin-bottom:0px}.cre-page .cre-page__sub-heading{color:#999;margin-top:0px;font-size:1.2rem}.cre-page .cre-page__description{width:50%}.cre-page .cre-page__links-header{margin-bottom:10px}.cre-page .cre-page__links{padding-top:10px}.cre-page .cre-page__links:not(:first-child){padding-top:40px}",""]);const a=i},5005:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,".cre-page{padding:30px;margin:var(--header-height) 0}.cre-page__links-container{margin-top:10px}.cre-page .cre-page__heading{font-size:2rem;margin-bottom:0px}.cre-page .cre-page__sub-heading{color:#999;margin-top:0px;font-size:1.2rem}.cre-page .cre-page__description{width:50%}.cre-page .cre-page__links-header{margin-bottom:10px}.cre-page .cre-page__links{padding-top:10px}.cre-page .cre-page__links:not(:first-child){padding-top:20px}.cre-page__links-container.accordion.ui.styled{padding-top:0;border:none;border-radius:0;margin-top:0;box-shadow:0 1px 2px 0 rgba(34,36,38,.15),0 1px 0 1px rgba(34,36,38,.15)}.cre-page__links-container.accordion.ui.styled:nth-child(2){box-shadow:0 1px 2px 0 rgba(34,36,38,.15),0 0 0 1px rgba(34,36,38,.15);border-radius:.28571429rem 0}.cre-page__links-container.accordion.ui.styled:nth-child(2)>.title.external-link{padding-top:.75em;padding-bottom:.25em}.cre-page__links-container.accordion.ui.styled:last-child{border-radius:0 .28571429rem}.cre-page__links-container.accordion.ui.styled:last-child>.title.external-link{padding-bottom:.75em}.cre-page__links-container.accordion.ui.styled>.title.external-link{padding-top:0;padding-bottom:.25em}.cre-page__links-container.accordion.ui.styled>span+.title.external-link{border-top:none}@media(max-width: 768px){.cre-page{padding:1rem}.cre-page__description{width:100%}.cre-page__heading{font-size:1.5rem}.cre-page__sub-heading{font-size:1rem}}",""]);const a=i},7025:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,".graph-debug-panel{margin-top:16px;padding:12px;border:1px solid #d4d4d4;border-radius:4px;background:#fafafa}.graph-debug-panel__header{display:flex;align-items:center;gap:8px;margin-bottom:8px;font-size:14px;flex-wrap:wrap}.graph-debug-panel__summary{color:#666;font-size:12px;margin-left:4px}.graph-debug-panel__legend{font-size:12px;color:#555;margin-bottom:10px}.graph-debug-panel__table-wrap{width:100%;overflow-x:auto;overflow-y:auto;max-height:400px;-webkit-overflow-scrolling:touch}.graph-debug-panel__table{min-width:700px}.graph-debug-panel__node-name{font-family:monospace;font-size:12px;white-space:nowrap}",""]);const a=i},4743:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,"main#explorer-content .tags{display:flex;gap:4px;height:100%;justify-content:center;align-items:center}main#explorer-content .tags .ui.label{border:1px solid #2185d0;text-shadow:none}main#explorer-content .tags a:hover .label{background:#4183c4;color:#fff}",""]);const a=i},309:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,"main#explorer-content{padding:30px;margin:var(--header-height) 0;color:#f7fafc;border-radius:8px;box-shadow:0 2px 4px rgba(0,0,0,.1)}main#explorer-content h1,main#explorer-content h2,main#explorer-content h3,main#explorer-content h4,main#explorer-content h5,main#explorer-content h6,main#explorer-content p,main#explorer-content label,main#explorer-content .menu-title{color:#1a202c}main#explorer-content a{color:#0056b3}main#explorer-content .search-field input{font-size:16px;height:32px;width:320px;margin-bottom:10px;border-radius:3px;border:1px solid #858585;padding:0 5px;color:#333;background-color:#fff}main#explorer-content #graphs-menu{display:flex;margin-bottom:20px}main#explorer-content #graphs-menu .menu-title{margin:0 10px 0 0}main#explorer-content #graphs-menu ul{list-style:none;padding:0;margin:0;display:flex;font-size:15px}main#explorer-content #graphs-menu li{padding:0 8px}main#explorer-content #graphs-menu li+li{border-left:1px solid #b1b0b0}main#explorer-content #graphs-menu li:first-child{padding-left:0}main#explorer-content .list{padding:0;width:100%}main#explorer-content .arrow .icon{transform:rotate(-90deg)}main#explorer-content .arrow.active .icon{transform:rotate(0)}main#explorer-content .arrow:hover{cursor:pointer}main#explorer-content .item{border-top:1px dotted #d3d3d3;border-left:6px solid #d3d3d3;margin:4px 4px 4px 40px;background-color:rgba(200,200,200,.2);vertical-align:middle}main#explorer-content .item .content{display:flex;flex-wrap:wrap}main#explorer-content .item .header{margin-left:5px;overflow:hidden;white-space:nowrap;display:flex;align-items:center;vertical-align:middle}main#explorer-content .item .header>a{font-size:120%;line-height:30px;font-weight:bold;max-width:100%;white-space:normal}main#explorer-content .item .header .cre-code{margin-right:4px;color:gray}main#explorer-content .item .description{margin-left:20px}main#explorer-content .highlight{background-color:#ff0;color:#000}main#explorer-content>.list>.item{margin-left:0}@media(min-width: 0px)and (max-width: 770px){#graphs-menu{flex-direction:column}}#debug-toggle{margin-top:10px;margin-bottom:4px}@media(max-width: 768px){main#explorer-content{padding:1rem}main#explorer-content .search-field input{width:100%}main#explorer-content .item{margin:4px 4px 4px 1rem}}",""]);const a=i},527:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,'.node{cursor:pointer}.node:hover{stroke:#000;stroke-width:1.5px}.node--leaf{fill:#fff}.label{font:11px "Helvetica Neue",Helvetica,Arial,sans-serif;text-anchor:middle;text-shadow:0 1px 0 #fff,1px 0 0 #fff,-1px 0 0 #fff,0 -1px 0 #fff}.label,.node--root,.ui.button.screen-size-button{margin:0;background-color:rgba(0,0,0,0)}.circle-tooltip{box-shadow:0 2px 5px rgba(0,0,0,.2);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;max-width:300px;word-wrap:break-word}.breadcrumb-item{word-break:break-word;overflow-wrap:anywhere;display:inline;max-width:100%}.breadcrumb-container{margin-top:0 !important;margin-bottom:0 !important;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;padding:10px;background-color:#f8f8f8;border-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,.1);overflow:auto;max-width:100%;line-height:1.4;white-space:normal;word-break:break-word;overflow-wrap:anywhere}',""]);const a=i},8006:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,"body{margin:0}",""]);const a=i},73:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,"main#gap-analysis{padding:30px;margin:var(--header-height) 0}main#gap-analysis span.name{padding:0 10px}@media(min-width: 0px)and (max-width: 500px){main#gap-analysis span.name{width:85px;display:inline-block}}@media(max-width: 768px){main#gap-analysis{padding:1rem}}",""]);const a=i},3789:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,".membership-required{margin-top:20vh;text-align:center}.membership-required p{font-weight:bold}",""]);const a=i},6129:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,".myopencre-container{margin-top:3rem}.myopencre-section{margin-top:2rem}.myopencre-upload{margin-top:3rem}.myopencre-disabled{opacity:.7}.myopencre-preview{margin-top:1rem}.myopencre-intro{font-size:1.05rem;font-weight:400;margin-bottom:.5rem}.cursor-pointer summary{cursor:pointer}",""]);const a=i},3101:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,".navbar__search{display:none}@media(min-width: 1024px){.navbar__search{display:flex;align-items:center}}.navbar__mobile-menu .navbar__search,.mobile-search-container .navbar__search{display:block !important;width:100%}.navbar__search form{position:relative;display:flex;align-items:center;border:1px solid rgba(var(--border-rgb), 0.5);border-radius:var(--radius);background-color:rgba(var(--card-rgb), 0.5);backdrop-filter:blur(4px);transition:all .2s ease}.navbar__search .search-icon{position:absolute;left:.75rem;top:50%;transform:translateY(-50%);color:var(--muted-foreground);height:1.2rem;width:1.2rem;vector-effect:non-scaling-stroke}.navbar__search input{padding:.5rem 1rem .5rem 2.5rem;width:100%;max-width:16rem;background-color:rgba(var(--card-rgb), 0.5);border:1px solid rgba(102,157,246,.267);border-radius:9999px;color:var(--foreground);box-shadow:inset 0 0 0 1px rgba(255,255,255,.02),0 1px 4px rgba(0,0,0,.25);transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease}.navbar__search input:hover{background-color:rgba(255,255,255,.06);border-color:rgba(96,165,250,.4)}.navbar__search input:focus{outline:none;background-color:rgba(255,255,255,.08);border-color:rgba(96,165,250,.6);box-shadow:inset 0 0 0 1px rgba(255,255,255,.03),0 2px 6px rgba(0,0,0,.3)}.navbar__search .search-error{margin-top:.25rem;font-size:.75rem;color:#f87171}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap;border:0}",""]);const a=i},6591:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,':root{--background: hsl(222.2, 84%, 4.9%);--foreground: hsl(210, 40%, 98%);--card: hsl(222.2, 84%, 4.9%);--card-foreground: hsl(210, 40%, 98%);--popover: hsl(222.2, 84%, 4.9%);--popover-foreground: hsl(210, 40%, 98%);--primary: hsl(210, 40%, 98%);--primary-foreground: hsl(210, 40%, 9.8%);--secondary: hsl(217.2, 32.6%, 17.5%);--secondary-foreground: hsl(210, 40%, 98%);--muted: hsl(217.2, 32.6%, 17.5%);--muted-foreground: hsl(215, 20.2%, 65.1%);--accent: hsl(217.2, 32.6%, 17.5%);--accent-foreground: hsl(210, 40%, 98%);--destructive: hsl(0, 62.8%, 30.6%);--destructive-foreground: hsl(210, 40%, 98%);--border: hsl(217.2, 32.6%, 17.5%);--input: hsl(217.2, 32.6%, 17.5%);--ring: hsl(212.7, 26.8%, 83.9%);--radius: 0.5rem}@keyframes fade-in{0%{opacity:0;transform:translateY(10px)}100%{opacity:1;transform:translateY(0)}}@keyframes bounce{0%,100%{transform:translateY(-25%);animation-timing-function:cubic-bezier(0.8, 0, 1, 1)}50%{transform:translateY(0);animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}body{font-family:"Inter",system-ui,sans-serif;min-height:100vh}.link-style{cursor:pointer;text-decoration:none}.link-style:hover{text-decoration:underline}.loading-container{display:flex;align-items:center;justify-content:center;min-height:100vh;background-color:var(--background);color:var(--foreground)}.loading-container .loading-content{text-align:center}.loading-container .loading-content .spinner{margin:0 auto 1rem;height:2rem;width:2rem;border-bottom:2px solid #60a5fa;border-radius:50%;animation:spin 1s linear infinite}.loading-container .loading-content .loading-text{color:var(--muted-foreground)}.main-container{min-height:100vh;background-color:var(--background);color:var(--foreground)}.bouncing-arrow{position:fixed;bottom:2rem;left:50%;transform:translateX(-50%);z-index:50}.bouncing-arrow__button{background-color:rgba(59,130,246,.2);backdrop-filter:blur(4px);border:1px solid rgba(96,165,250,.5);border-radius:9999px;padding:1rem;transition:all .3s;animation:bounce 1s infinite;cursor:pointer}.bouncing-arrow__button:hover{background-color:rgba(59,130,246,.3);transform:scale(1.1)}.bouncing-arrow__icon{height:1.5rem;width:1.5rem;stroke:#60a5fa}.hero-section{min-height:100vh;background:linear-gradient(to bottom right, var(--background), var(--background), rgba(15, 23, 42, 0.2));position:relative;overflow:hidden}.hero-section__bg-effects{position:absolute;inset:0}.hero-section__bg-effects .radial-gradient{background-image:radial-gradient(circle, rgba(30, 58, 138, 0.2), transparent, transparent);position:absolute;inset:0}.hero-section__bg-effects .blur-circle{position:absolute;border-radius:9999px;filter:blur(48px)}.hero-section__bg-effects .blur-circle--blue{top:25%;left:25%;width:24rem;height:24rem;background-color:rgba(59,130,246,.1)}.hero-section__bg-effects .blur-circle--purple{bottom:25%;right:25%;width:24rem;height:24rem;background-color:rgba(168,85,247,.1)}.hero-section__bg-effects .blur-circle--emerald{top:50%;left:50%;width:16rem;height:16rem;background-color:rgba(16,185,129,.1);transform:translate(-50%, -50%)}.hero-section__content{position:relative;z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;padding:0 .5rem;margin-top:3rem}.hero-section__logo-container{text-align:center;max-width:96rem;margin:0 auto 2rem;animation:fade-in .6s ease-out}.hero-section__logo-container .logo-wrapper{display:flex;flex-direction:column;justify-content:center;margin-bottom:3rem}.hero-section__logo-container .logo-wrapper img{margin-right:5rem;height:auto;width:100%;max-width:64rem}.hero-section__logo-container .logo-subtitle{font-size:1.5rem;color:var(--muted-foreground);max-width:48rem;margin:0 auto;line-height:1.625;font-weight:600}.hero-section__logo-container .logo-subtitle span{color:#60a5fa;font-weight:600}@media(min-width: 640px){.hero-section__logo-container .logo-subtitle{font-size:1.5rem}}@media(min-width: 768px){.hero-section__logo-container .logo-subtitle{font-size:1.875rem}}.hero-section__description{text-align:center;max-width:80rem;margin:0 auto 4rem;animation:fade-in .6s ease-out .1s}.hero-section__description p{color:var(--muted-foreground);max-width:48rem;margin:0 auto;line-height:1.625;font-size:1.125rem}@media(min-width: 640px){.hero-section__description p{font-size:1.125rem}}.hero-section__search-bar-container{width:100%;max-width:80rem;margin:0 auto 5rem;animation:fade-in .6s ease-out .2s}.search-bar{max-width:42rem;margin:0 auto}.search-bar .search-bar__group{position:relative}.search-bar .search-bar__group .search-bar__blur-bg{position:absolute;inset:0;background-image:linear-gradient(to right, rgba(59, 130, 246, 0.2), rgba(168, 85, 247, 0.2), rgba(16, 185, 129, 0.2));border-radius:1rem;filter:blur(16px);transition:all .3s}.search-bar .search-bar__group:hover .search-bar__blur-bg{filter:blur(24px)}.search-bar .search-bar__group .search-bar__wrapper{position:relative;background-color:rgba(var(--card-rgb), 0.6);backdrop-filter:blur(16px);border:1px solid rgba(var(--border-rgb), 0.3);border-radius:1rem;padding:.5rem;box-shadow:0 25px 50px -12px rgba(0,0,0,.25)}.search-bar .search-bar__group .search-bar__wrapper .search-bar__flex{display:flex;align-items:center;position:relative}.search-bar .search-bar__group .search-bar__wrapper .search-bar__flex .search-bar__icon{position:absolute;left:1.5rem;top:50%;transform:translateY(-50%);color:var(--muted-foreground);height:1.5rem;width:1.5rem;z-index:10}.search-bar .search-bar__group .search-bar__wrapper .search-bar__flex .search-bar__input{width:100%;padding-left:4rem;padding-right:8.5rem;padding-top:1.5rem;padding-bottom:1.5rem;font-size:1.125rem;background-color:rgba(0,0,0,0);border:none;color:var(--foreground)}.search-bar .search-bar__group .search-bar__wrapper .search-bar__flex .search-bar__input:focus{outline:none;box-shadow:none}.search-bar .search-bar__group .search-bar__wrapper .search-bar__flex .search-bar__input::placeholder{color:rgba(var(--muted-foreground-rgb), 0.7)}.search-bar .search-bar__group .search-bar__wrapper .search-bar__flex .search-bar__button{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);background-image:linear-gradient(to right, #3b82f6, #2563eb);color:#fff;padding:.75rem 2rem;border-radius:.75rem;font-weight:500;transition:all .2s;box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);border:none;cursor:pointer}.search-bar .search-bar__group .search-bar__wrapper .search-bar__flex .search-bar__button:hover{background-image:linear-gradient(to right, #2563eb, #1d4ed8);transform:translateY(-50%) scale(1.05)}.section{position:relative;z-index:10;width:100%;max-width:112rem;margin:0 auto 4rem;padding:0 1rem}@media(min-width: 640px){.section{padding:0 1.5rem}}@media(min-width: 1024px){.section{padding:0 2rem}}.section__header{text-align:center;margin-bottom:4rem}.section__title{font-size:2.25rem;font-weight:700;color:#fff;margin-bottom:1rem}.section__divider{width:6rem;height:.25rem;margin:0 auto}.section__divider--blue-em-purp{background-image:linear-gradient(to right, #93c5fd, #6ee7b7, #d8b4fe)}.section__divider--purp-blue-em{background-image:linear-gradient(to right, #d8b4fe, #93c5fd, #6ee7b7)}.section__description{color:var(--muted-foreground);font-size:1.125rem;max-width:42rem;margin:1.5rem auto 0;line-height:1.625}.info-card-grid{display:grid;grid-template-columns:1fr;gap:2rem;animation:fade-in .6s ease-out .4s}@media(min-width: 768px){.info-card-grid{grid-template-columns:repeat(3, 1fr)}}.info-card{backdrop-filter:blur(4px);border-radius:.75rem;padding:1.5rem;transition:all .3s;font-size:1.25rem}.info-card:hover{box-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04);transform:translateY(-0.5rem)}.info-card--blue{background-image:linear-gradient(to bottom right, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.3));border:1px solid rgba(96,165,250,.3)}.info-card--blue:hover{background-image:linear-gradient(to bottom right, rgba(59, 130, 246, 0.3), rgba(37, 99, 235, 0.4));border-color:rgba(96,165,250,.5);box-shadow:0 20px 25px -5px rgba(59,130,246,.2)}.info-card--blue .info-card__title{color:#93c5fd}.info-card--blue:hover .info-card__title{color:#bfdbfe}.info-card--emerald{background-image:linear-gradient(to bottom right, rgba(16, 185, 129, 0.2), rgba(6, 122, 107, 0.3));border:1px solid rgba(52,211,153,.3)}.info-card--emerald:hover{background-image:linear-gradient(to bottom right, rgba(16, 185, 129, 0.3), rgba(6, 122, 107, 0.4));border-color:rgba(52,211,153,.5);box-shadow:0 20px 25px -5px rgba(16,185,129,.2)}.info-card--emerald .info-card__title{color:#6ee7b7}.info-card--emerald:hover .info-card__title{color:#a7f3d0}.info-card--purple{background-image:linear-gradient(to bottom right, rgba(168, 85, 247, 0.2), rgba(219, 39, 119, 0.3));border:1px solid rgba(192,132,252,.3)}.info-card--purple:hover{background-image:linear-gradient(to bottom right, rgba(168, 85, 247, 0.3), rgba(219, 39, 119, 0.4));border-color:rgba(192,132,252,.5);box-shadow:0 20px 25px -5px rgba(168,85,247,.2)}.info-card--purple .info-card__title{color:#d8b4fe}.info-card--purple:hover .info-card__title{color:#e9d5ff}.info-card__title{font-size:1.5rem;font-weight:600;margin-bottom:.75rem;transition:color .3s}.info-card__text{font-size:1.125rem;color:var(--muted-foreground);line-height:1.625;transition:color .3s}.info-card__text p+p{margin-top:.5rem}.info-card:hover .info-card__text{color:rgba(var(--muted-foreground-rgb), 0.9)}.how-to-use-grid{display:grid;grid-template-columns:1fr;gap:2rem}@media(min-width: 768px){.how-to-use-grid{grid-template-columns:repeat(3, 1fr)}}.htu-card{backdrop-filter:blur(4px);border-radius:.75rem;padding:2rem;text-align:center;transition:all .3s}.htu-card:hover{transform:translateY(-0.5rem)}.htu-card__icon-wrapper{width:4rem;height:4rem;border-radius:9999px;display:flex;align-items:center;justify-content:center;margin:0 auto 1.5rem;transition:transform .3s}.htu-card:hover .htu-card__icon-wrapper{transform:scale(1.1)}.htu-card__icon-wrapper .icon{height:2rem;width:2rem;color:#fff}.htu-card__title{font-size:1.5rem;font-weight:600;margin-bottom:1rem;transition:color .3s}.htu-card__text{color:var(--muted-foreground);font-size:1.125rem;line-height:1.625;margin-bottom:1rem;transition:color .3s}.htu-card:hover .htu-card__text{color:rgba(var(--muted-foreground-rgb), 0.9)}.htu-card__text a{text-decoration:none;transition:color .3s}.htu-card--orange{background-image:linear-gradient(to bottom right, rgba(249, 115, 22, 0.2), rgba(220, 38, 38, 0.3));border:1px solid rgba(251,146,60,.3)}.htu-card--orange:hover{border-color:rgba(251,146,60,.5);box-shadow:0 20px 25px -5px rgba(249,115,22,.2)}.htu-card--orange .htu-card__icon-wrapper{background-image:linear-gradient(to bottom right, #f97316, #ef4444)}.htu-card--orange .htu-card__title{color:#fdba74}.htu-card--orange:hover .htu-card__title{color:#fcd34d}.htu-card--orange .htu-card__text a{color:#fdba74}.htu-card--orange:hover .htu-card__text a{color:#fcd34d}.htu-card--cyan{background-image:linear-gradient(to bottom right, rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.3));border:1px solid rgba(34,211,238,.3)}.htu-card--cyan:hover{border-color:rgba(34,211,238,.5);box-shadow:0 20px 25px -5px rgba(6,182,212,.2)}.htu-card--cyan .htu-card__icon-wrapper{background-image:linear-gradient(to bottom right, #06b6d4, #3b82f6)}.htu-card--cyan .htu-card__title{color:#67e8f9}.htu-card--cyan:hover .htu-card__title{color:#22d3ee}.htu-card--cyan .htu-card__text a{color:#67e8f9}.htu-card--cyan:hover .htu-card__text a{color:#22d3ee}.htu-card--indigo{background-image:linear-gradient(to bottom right, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.3));border:1px solid rgba(129,140,248,.3)}.htu-card--indigo:hover{border-color:rgba(129,140,248,.5);box-shadow:0 20px 25px -5px rgba(99,102,241,.2)}.htu-card--indigo .htu-card__icon-wrapper{background-image:linear-gradient(to bottom right, #6366f1, #a855f7)}.htu-card--indigo .htu-card__title{color:#a5b4fc}.htu-card--indigo:hover .htu-card__title{color:#c7d2fe}.htu-card--indigo .htu-card__text a{color:#818cf8}.htu-card--indigo:hover .htu-card__text a{color:#a5b4fc}.features-grid{display:grid;grid-template-columns:1fr;gap:3rem}@media(min-width: 768px){.features-grid{grid-template-columns:repeat(2, 1fr)}}.feature-block{backdrop-filter:blur(4px);border-radius:.75rem;padding:2rem;transition:all .3s}.feature-block:hover{transform:translateY(-0.5rem)}.feature-block__icon-wrapper{width:4rem;height:4rem;border-radius:9999px;display:flex;align-items:center;justify-content:center;margin-bottom:1.5rem;transition:transform .3s}.feature-block:hover .feature-block__icon-wrapper{transform:scale(1.1)}.feature-block__icon-wrapper .icon{height:2rem;width:2rem;color:#fff}.feature-block__title{font-size:1.5rem;font-weight:600;margin-bottom:1rem;transition:color .3s}.feature-block__text{color:var(--muted-foreground);font-size:1.125rem;line-height:1.625;margin-bottom:1rem;transition:color .3s}.feature-block:hover .feature-block__text{color:rgba(var(--muted-foreground-rgb), 0.9)}.feature-block--rose{background-image:linear-gradient(to bottom right, rgba(225, 29, 72, 0.2), rgba(219, 39, 119, 0.3));border:1px solid rgba(244,63,94,.3)}.feature-block--rose:hover{border-color:rgba(244,63,94,.5);box-shadow:0 20px 25px -5px rgba(225,29,72,.2)}.feature-block--rose .feature-block__icon-wrapper{background-image:linear-gradient(to bottom right, #e11d48, #db2777)}.feature-block--rose .feature-block__title{color:#f9a8d4}.feature-block--rose:hover .feature-block__title{color:#fbcfe8}.feature-block--teal{background-image:linear-gradient(to bottom right, rgba(20, 184, 166, 0.2), rgba(22, 163, 74, 0.3));border:1px solid rgba(45,212,191,.3)}.feature-block--teal:hover{border-color:rgba(45,212,191,.5);box-shadow:0 20px 25px -5px rgba(20,184,166,.2)}.feature-block--teal .feature-block__icon-wrapper{background-image:linear-gradient(to bottom right, #14b8a6, #16a34a)}.feature-block--teal .feature-block__title{color:#5eead4}.feature-block--teal:hover .feature-block__title{color:#99f6e4}.founders-grid{display:grid;grid-template-columns:1fr;gap:1.5rem;align-items:center}@media(min-width: 768px){.founders-grid{grid-template-columns:.9fr 1.1fr;gap:2rem}}.founders-images{display:flex;flex-direction:column;align-items:center;gap:2rem}.founders-images .founders-images__row{display:flex;gap:2rem}.founders-images .founders-images__row .founder{text-align:center}.founders-images .founders-images__row .founder__img-wrapper{width:8rem;height:8rem;margin:0 auto 1rem;transition:transform .3s}.founders-images .founders-images__row .founder__img-wrapper:hover{transform:scale(1.1)}.founders-images .founders-images__row .founder__img-wrapper img{width:8rem;height:8rem;border-radius:50%;object-fit:cover}.founders-images .founders-images__row .founder__name{font-size:1.25rem;font-weight:600;color:#fff;transition:color .3s}.founders-images .founders-images__row .founder:hover .founders-images .founders-images__row .founder__name--spyros{color:#fcd34d}.founders-images .founders-images__row .founder:hover .founders-images .founders-images__row .founder__name--rob{color:#c4b5fd}.founders-text{display:flex;flex-direction:column;gap:1.5rem;font-size:1.125rem}.founders-text .text-card{backdrop-filter:blur(4px);border:1px solid rgba(156,163,175,.3);background-image:linear-gradient(to bottom right, rgba(107, 114, 128, 0.2), rgba(75, 85, 99, 0.3));border-radius:.75rem;padding:1.5rem;transition:all .3s}.founders-text .text-card:hover{transform:translateY(-0.5rem);border-color:rgba(156,163,175,.5);box-shadow:0 20px 25px -5px rgba(107,114,128,.2);background-image:linear-gradient(to bottom right, rgba(107, 114, 128, 0.3), rgba(75, 85, 99, 0.4))}.founders-text .text-card p{color:var(--muted-foreground);line-height:1.625;transition:color .3s}.founders-text .text-card p:hover{color:rgba(var(--muted-foreground-rgb), 0.9)}.founders-text .text-card p:not(:last-child){margin-bottom:1rem}.contact-container{max-width:64rem;margin:0 auto}.contact-container .contact-card{backdrop-filter:blur(4px);border:1px solid rgba(96,165,250,.3);background-image:linear-gradient(to bottom right, rgba(59, 130, 246, 0.2), rgba(79, 70, 229, 0.3));border-radius:.75rem;padding:2rem;text-align:center;transition:all .3s}.contact-container .contact-card:hover{transform:translateY(-0.5rem);border-color:rgba(96,165,250,.5);box-shadow:0 20px 25px -5px rgba(59,130,246,.2);background-image:linear-gradient(to bottom right, rgba(59, 130, 246, 0.3), rgba(79, 70, 229, 0.4))}.contact-container .contact-card p{color:var(--muted-foreground);line-height:1.625;transition:color .3s}.contact-container .contact-card:hover p{color:rgba(var(--muted-foreground-rgb), 0.9)}.contact-container .contact-card__main-text{margin-bottom:1.5rem;font-size:1.125rem}.contact-container .contact-card__info{margin-bottom:2rem;font-size:1.125rem}.contact-container .contact-card__info .info-item{font-size:1.125rem}.contact-container .contact-card__info .info-item .highlight-link{color:#93c5fd;font-weight:600;text-decoration:underline;transition:color .3s}.contact-container .contact-card__info .info-item+.info-item{margin-top:1rem;font-size:1.125rem}.contact-container .contact-card__info .linkedin-text span{color:#93c5fd;transition:color .3s;font-size:1.125rem}.contact-container .contact-card:hover .highlight-link{color:#bfdbfe}.contact-container .contact-card:hover .linkedin-text span{color:#bfdbfe}.contact-container .contact-card__details{background-color:rgba(59,130,246,.2);border-radius:.5rem;padding:1.5rem;transition:background-color .3s}.contact-container .contact-card__details:hover{background-color:rgba(59,130,246,.3)}.contact-container .contact-card__details p{font-size:1.125rem}.contact-container .contact-card__details a{color:#93c5fd;transition:color .3s}.contact-container .contact-card__details:hover a{color:#bfdbfe}.community-grid{display:grid;grid-template-columns:1fr;gap:2rem}@media(min-width: 768px){.community-grid{grid-template-columns:repeat(3, 1fr)}}.community-card{backdrop-filter:blur(4px);border-radius:.75rem;padding:2rem;text-align:center;transition:all .3s}.community-card:hover{transform:translateY(-0.5rem)}.community-card__icon-wrapper{width:5rem;height:5rem;background-color:#fff;border-radius:1rem;display:flex;align-items:center;justify-content:center;margin:0 auto 1.5rem;transition:transform .3s}.community-card:hover .community-card__icon-wrapper{transform:scale(1.1)}.community-card__icon-wrapper img{height:3rem;width:3rem}.community-card__title{font-size:1.5rem;font-weight:600;margin-bottom:1rem;transition:color .3s}.community-card__text{color:var(--muted-foreground);font-size:1.125rem;line-height:1.625;margin-bottom:1.5rem;transition:color .3s}.community-card:hover .community-card__text{color:rgba(var(--muted-foreground-rgb), 0.9)}.community-card__button{border:1px solid;background-color:rgba(0,0,0,0);padding:.5rem 1rem;border-radius:.375rem;transition:all .2s;cursor:pointer}.community-card--slack{background-image:linear-gradient(to bottom right, rgba(168, 85, 247, 0.2), rgba(219, 39, 119, 0.3));border:1px solid rgba(192,132,252,.3)}.community-card--slack:hover{border-color:rgba(192,132,252,.5);box-shadow:0 20px 25px -5px rgba(168,85,247,.2)}.community-card--slack .community-card__title{color:#d8b4fe}.community-card--slack:hover .community-card__title{color:#e9d5ff}.community-card--slack .community-card__button{border-color:#c084fc;color:#c084fc}.community-card--slack .community-card__button:hover{background-color:rgba(192,132,252,.1);color:#e9d5ff}.community-card--linkedin{background-image:linear-gradient(to bottom right, rgba(59, 130, 246, 0.2), rgba(6, 182, 212, 0.3));border:1px solid rgba(96,165,250,.3)}.community-card--linkedin:hover{border-color:rgba(96,165,250,.5);box-shadow:0 20px 25px -5px rgba(59,130,246,.2)}.community-card--linkedin .community-card__title{color:#93c5fd}.community-card--linkedin:hover .community-card__title{color:#bfdbfe}.community-card--linkedin .community-card__button{border-color:#60a5fa;color:#60a5fa}.community-card--linkedin .community-card__button:hover{background-color:rgba(96,165,250,.1);color:#93c5fd}.community-card--github{background-image:linear-gradient(to bottom right, rgba(107, 114, 128, 0.2), rgba(75, 85, 99, 0.3));border:1px solid rgba(156,163,175,.3)}.community-card--github:hover{border-color:rgba(156,163,175,.5);box-shadow:0 20px 25px -5px rgba(107,114,128,.2)}.community-card--github .community-card__title{color:#d1d5db}.community-card--github:hover .community-card__title{color:#e5e7eb}.community-card--github .community-card__button{border-color:#9ca3af;color:#9ca3af}.community-card--github .community-card__button:hover{background-color:rgba(156,163,175,.1);color:#d1d5db}.footer{position:relative;z-index:10;width:100%;padding:3rem 0;background:linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));backdrop-filter:blur(12px) saturate(160%);-webkit-backdrop-filter:blur(12px) saturate(160%);border-top:1px solid rgba(255,255,255,.12)}.footer__container{max-width:112rem;margin:0 auto;padding:0 1rem}@media(min-width: 640px){.footer__container{padding:0 1.5rem}}@media(min-width: 1024px){.footer__container{padding:0 2rem}}.footer__grid{display:grid;grid-template-columns:1fr;gap:2.5rem}@media(min-width: 768px){.footer__grid{grid-template-columns:repeat(4, 1fr)}}.footer__about{padding:1rem;border-radius:1rem;background:rgba(255,255,255,.04);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.08);display:flex;flex-direction:column;gap:.5rem;transition:transform .3s ease,box-shadow .3s ease}.footer__about:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.25),inset 0 0 0 1px rgba(255,255,255,.05)}.footer__about .logo-link{display:flex;align-items:center;gap:.5rem}.footer__about .logo-link img{height:2.5rem;width:auto;filter:drop-shadow(0 0 6px rgba(255, 255, 255, 0.15))}.footer__about p{margin-top:.25rem;max-width:280px;font-size:.875rem;line-height:1.4;color:rgba(255,255,255,.65)}.footer__links-column{padding:1rem;border-radius:1rem;background:rgba(255,255,255,.04);backdrop-filter:blur(6px);border:1px solid rgba(255,255,255,.08);transition:background-color .3s ease,box-shadow .3s ease}.footer__links-column:hover{background:rgba(255,255,255,.07);transform:translateY(-2px)}.footer__links-column .column-title{color:#fff;font-weight:500;margin-bottom:1rem;font-size:.95rem}.footer__links-column .links-list{color:#fff;font-weight:500;margin-bottom:1rem;font-size:.95rem}.footer__links-column .links-list a{display:block;color:var(--muted-foreground);font-size:.9rem;transition:color .25s ease;text-decoration:none}.footer__links-column .links-list a:hover{color:rgba(var(--muted-foreground-rgb), 0.9)}.loading-screen{min-height:100vh;background-color:var(--background);color:var(--foreground);display:flex;align-items:center;justify-content:center}.loading-container{text-align:center}.spinner{margin:0 auto 1rem auto;height:2rem;width:2rem;border:2px solid rgba(0,0,0,0);border-top:2px solid #3b82f6;border-radius:50%;animation:spin .75s linear infinite}.loading-text{color:var(--muted-foreground);font-size:1rem}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width: 396px){.search-bar .search-bar__group .search-bar__wrapper .search-bar__flex .search-bar__icon{left:1rem;height:1.1rem;width:1.1rem}.search-bar .search-bar__group .search-bar__wrapper .search-bar__flex .search-bar__input{font-size:.9rem;padding-top:.9rem;padding-bottom:.9rem;padding-left:3rem;padding-right:6.5rem}.search-bar .search-bar__group .search-bar__wrapper .search-bar__flex .search-bar__button{padding:.45rem 1.2rem;font-size:.85rem;border-radius:.6rem}}',""]);const a=i},6197:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,".standard-page{padding:30px;margin:var(--header-height) 0}.standard-page__links-container{margin-top:10px}.standard-page .pagination-container{margin-top:15px;display:flex;justify-content:center}.standard-page .standard-page__heading{font-size:2rem;margin-bottom:0px}.standard-page .standard-page__sub-heading{color:#999;margin-top:0px;font-size:1.2rem}@media(min-width: 0px)and (max-width: 599px){.standard-page__links-container{word-break:break-word}}@media(max-width: 768px){.standard-page{padding:1rem}.standard-page__heading{font-size:1.5rem}.standard-page__sub-heading{font-size:1rem}}",""]);const a=i},6709:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,".chat-container{margin:3rem auto;margin-top:1.5rem;max-width:960px;display:flex;flex-direction:column;position:relative}.chat-container.chat-active{height:calc(100vh - 179px);overflow:hidden}@media(max-width: 768px){.chat-container{padding:0 1rem}}@media(max-width: 360px){.chat-container{padding:0 .75rem}}.chat-messages{display:flex;flex-direction:column;gap:1.25rem;flex:1;overflow-y:auto;padding-bottom:1rem;scroll-behavior:smooth;overscroll-behavior:contain}@media(max-width: 768px){.chat-messages{gap:.75rem}}h1.ui.header.chatbot-title{font-weight:600;line-height:1.25;font-size:clamp(1.4rem,3vw,2.2rem);margin-top:2rem;margin-bottom:1rem !important}@media(max-width: 768px){h1.ui.header.chatbot-title{margin-top:2.75rem;margin-bottom:.75rem !important;font-size:clamp(1.35rem,4vw,1.8rem)}}@media(max-width: 360px){h1.ui.header.chatbot-title{margin-top:3rem}}.chat-message{display:flex;gap:1.25rem}@media(max-width: 768px){.chat-message{gap:.75rem}}.chat-message.user{justify-content:flex-end}.chat-message.assistant{justify-content:flex-start}.message-card{max-width:65%;background:#fff;border-radius:16px;padding:1rem 1.25rem;box-shadow:0 6px 18px rgba(0,0,0,.08);text-align:left;line-height:1.6;animation:fadeInUp .25s ease-out}@media(max-width: 1024px){.message-card{max-width:75%}}@media(max-width: 768px){.message-card{max-width:88%}}@media(max-width: 360px){.message-card{max-width:92%}}.chat-message.user .message-card{background:#eaf4ff;border-left:4px solid #2185d0}.chat-message.assistant .message-card{background:#f9fafb;border-left:4px solid #21ba45}.message-header{display:flex;justify-content:space-between;font-size:.7rem;margin-bottom:.4rem;color:#666}.message-role{font-weight:600;text-transform:capitalize}.message-timestamp{opacity:.7}.message-body{font-size:.95rem;text-align:left;word-wrap:break-word;overflow-wrap:anywhere;max-width:100%}.message-body p{margin:.5rem 0}.message-body ul{padding-left:1.25rem}.message-body code{background:#f4f4f4;padding:.2rem .4rem;border-radius:4px;font-size:.85rem;white-space:pre-wrap;word-break:break-word}.message-body a{word-break:break-all}.message-body pre{max-width:100%;overflow-x:auto}.references{margin-top:.75rem;border-top:1px solid #e0e0e0;padding-top:.5rem}.references-title{font-size:.75rem;font-weight:600;margin-bottom:.25rem;color:#444}.reference-card{font-size:.8rem;margin-bottom:.25rem}.reference-card a{color:#1976d2;text-decoration:none}.reference-card a:hover{text-decoration:underline}.reference-link{font-size:.7rem;opacity:.8}.accuracy-warning{margin-top:.75rem;font-size:.75rem;color:#b71c1c}.chat-input{position:sticky;bottom:0;z-index:5;margin-top:1rem;background-color:#daebdb;border:1px solid #bed6e8;padding:.75rem;border-radius:12px;box-shadow:0 2px 6px rgba(0,0,0,.05)}.chat-input .ui.input input{height:40px;line-height:40px;border-radius:10px !important}.chatbot-disclaimer{margin-top:2.5rem;font-size:1.01rem;color:#333;max-width:900px;margin-left:auto;margin-right:auto;line-height:1.6}.typing-indicator{display:flex;gap:.4rem;align-items:center;min-height:32px;padding:.75rem 1rem;margin-top:.5rem}.typing-indicator .dot{width:8px;height:8px;background-color:#21ba45;border-radius:50%;animation:typingBounce 1.4s infinite ease-in-out both}.typing-indicator .dot:nth-child(2){animation-delay:.2s}.typing-indicator .dot:nth-child(3){animation-delay:.4s}.chatbot-layout{min-height:100vh;padding-top:1rem}@media(max-width: 768px){.chatbot-layout{min-height:auto;padding-top:2rem}}@media(max-width: 768px){.chatbot-layout.ui.grid{align-items:flex-start !important}}.scroll-to-bottom{position:absolute;bottom:160px;left:50%;transform:translateX(-50%);z-index:10;width:34px;height:34px;border-radius:50%;border:none;background:#2f80bd;color:#c5f0c9;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 12px rgba(0,0,0,.15);border:#1976d2;opacity:1;backdrop-filter:none;transition:transform .2s ease;animation:fadeIn .15s ease-out}.scroll-to-bottom:hover{opacity:1;transform:translateX(-50%) translateY(-2px)}.scroll-icon{margin:0 !important;display:flex !important;align-items:center;justify-content:center}@media(max-width: 768px){.scroll-to-bottom{bottom:160px}}.chat-surface{display:flex;flex-direction:column;height:100%;background:#fcfcfa;backdrop-filter:blur(6px);border-radius:18px;border:1px solid rgba(0,0,0,.05);box-shadow:0 12px 40px rgba(0,0,0,.08),inset 0 1px 0 rgba(255,255,255,.4);padding:1.25rem}.chat-landing-state{text-align:center;margin:auto;padding:3rem 1rem}.chat-landing-state h2{font-size:1.6rem;font-weight:600;margin-bottom:.5rem}.chat-landing-state p{font-size:.95rem;color:#555;max-width:480px;margin:0 auto}@keyframes typingBounce{0%,80%,100%{transform:scale(0);opacity:.3}40%{transform:scale(1);opacity:1}}@keyframes fadeInUp{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeIn{from{opacity:0;transform:translateX(-50%) translateY(6px)}to{opacity:.85;transform:translateX(-50%) translateY(0)}}",""]);const a=i},5963:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,'.navbar{position:sticky;width:100%;top:0;z-index:50;background-color:rgba(var(--background-rgb), 0.8);backdrop-filter:blur(4px);border-bottom:1px solid rgba(255,255,255,.2);background-color:var(--background);color:var(--foreground)}.navbar__container{max-width:112rem;margin:0 auto;padding:0 1rem}@media(min-width: 640px){.navbar__container{padding:0 1.5rem}}@media(min-width: 1024px){.navbar__container{padding:0 2rem}}.navbar__content{display:flex;justify-content:space-between;align-items:center;height:4rem}.navbar__logo{display:flex;align-items:center;gap:.5rem;margin-left:4rem}.navbar__logo img{height:4rem;width:10rem;display:block}@media(max-width: 767px){.navbar__logo{margin-left:1rem}.navbar__logo img{width:auto;max-width:7rem;height:3rem}}.navbar__desktop-links{display:none;align-items:center;gap:2rem}@media(min-width: 768px){.navbar__desktop-links{display:flex}}.navbar__desktop-links .nav-link{color:var(--muted-foreground);text-decoration:none;font-size:1.2rem;transition:color .2s}.navbar__desktop-links .nav-link:hover{color:var(--foreground)}.navbar__desktop-links .nav-link--active{color:var(--foreground);position:relative}.navbar__desktop-links .nav-link--active::after{content:"";position:absolute;left:0;right:0;bottom:-0.5rem;height:2px;background-color:#60a5fa;border-radius:2px}.navbar__actions{display:flex;align-items:center;gap:1rem}.navbar__desktop-auth{display:none;align-items:center;gap:1rem}@media(min-width: 768px){.navbar__desktop-auth{display:flex}}.navbar__desktop-auth .user-info{display:flex;align-items:center;gap:.75rem}.navbar__desktop-auth .user-info .user-details{display:flex;align-items:center;gap:.5rem}.navbar__desktop-auth .user-info .user-details .icon{height:1rem;width:1rem}.navbar__desktop-auth .user-info .user-details span{font-size:.875rem;color:var(--muted-foreground)}.navbar__desktop-auth .btn{padding:.5rem 1rem;border-radius:var(--radius);border:none;cursor:pointer;transition:all .2s}.navbar__desktop-auth .btn--ghost{background:rgba(0,0,0,0);color:var(--muted-foreground)}.navbar__desktop-auth .btn--ghost:hover{color:var(--foreground)}.navbar__desktop-auth .btn--primary{background-color:#fff;color:#000}.navbar__desktop-auth .btn--primary:hover{background-color:#e5e7eb}.navbar__mobile-menu-toggle{background:rgba(0,0,0,0);border:none;cursor:pointer;padding:.5rem;border-radius:var(--radius)}.navbar__mobile-menu-toggle .icon{height:1.25rem;width:1.25rem;color:var(--foreground)}@media(min-width: 768px){.navbar__mobile-menu-toggle{display:none}}.navbar__mobile-menu{position:fixed;top:0;right:0;width:300px;height:100%;background-color:var(--background);border-left:1px solid var(--border);padding:1rem;transform:translateX(100%);transition:transform .3s ease-in-out;display:flex;flex-direction:column;gap:1rem;z-index:50}.navbar__mobile-menu.is-open{transform:translateX(0)}@media(min-width: 400px){.navbar__mobile-menu{width:400px}}.navbar__mobile-menu .mobile-search-container{width:100%;margin-bottom:1rem}.navbar__mobile-menu .mobile-search-container .search-bar{width:100%}.navbar__mobile-menu .mobile-search-container .search-bar input{width:100%;padding:.6rem 1rem;border-radius:var(--radius);border:1px solid var(--border);background-color:var(--input);color:var(--foreground)}.navbar__mobile-menu .navbar__search{position:relative}.navbar__mobile-menu .navbar__search .search-icon{position:absolute;left:.75rem;top:50%;transform:translateY(-50%);color:var(--muted-foreground);height:1rem;width:1rem}.navbar__mobile-menu .navbar__search input{width:100%;padding:.5rem 1rem .5rem 2.5rem;background-color:var(--input);border:1px solid var(--border);border-radius:var(--radius);color:var(--foreground)}.navbar__mobile-menu .navbar__search .search-error{color:red;font-size:.75rem;margin-top:.25rem}.navbar__mobile-menu .mobile-search-form{position:relative}.navbar__mobile-menu .mobile-search-form .search-icon{position:absolute;left:.75rem;top:50%;transform:translateY(-50%);color:var(--muted-foreground);height:1rem;width:1rem}.navbar__mobile-menu .mobile-search-form input{width:100%;padding:.5rem 1rem .5rem 2.5rem;background-color:var(--input);border:1px solid var(--border);border-radius:var(--radius);color:var(--foreground)}.navbar__mobile-menu .mobile-nav-links{display:flex;flex-direction:column;gap:.5rem}.navbar__mobile-menu .mobile-nav-links .nav-link{padding:.5rem 1rem;border-radius:var(--radius);color:var(--muted-foreground);text-decoration:none;transition:all .2s}.navbar__mobile-menu .mobile-nav-links .nav-link:hover{color:var(--foreground);background-color:var(--muted)}.navbar__mobile-menu .mobile-nav-links .nav-link--active{background-color:rgba(96,165,250,.18);color:var(--foreground);font-weight:500}.navbar__mobile-menu .mobile-auth{border-top:1px solid var(--border);padding-top:1rem}.navbar__mobile-menu .mobile-auth .user-info,.navbar__mobile-menu .mobile-auth .auth-buttons{display:flex;flex-direction:column;gap:.75rem}.navbar__mobile-menu .mobile-auth .user-details{display:flex;align-items:center;gap:.5rem;padding:0 1rem}.navbar__mobile-menu .mobile-auth .user-details .icon{height:1rem;width:1rem}.navbar__mobile-menu .mobile-auth .user-details span{font-size:.875rem;color:var(--muted-foreground)}.navbar__mobile-menu .mobile-auth .btn{width:100%;text-align:left;justify-content:flex-start}.navbar__overlay{position:fixed;inset:0;z-index:40;background-color:rgba(0,0,0,.5);display:none}.navbar__overlay.is-open{display:block}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap;border:0}',""]);const a=i},8035:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()((function(e){return e[1]}));i.push([e.id,".no-route__container{display:flex !important;align-items:center;justify-content:center;align-self:center;height:100vh}",""]);const a=i},5248:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var a=0;a1?n-1:0),i=1;i/gm),j=o(/\${[\w\W]*}/gm),B=o(/^data-[\-\w.\u00B7-\uFFFF]/),z=o(/^aria-[\-\w]+$/),$=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=o(/^(?:\w+script|data):/i),G=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V=o(/^html$/i);var W=Object.freeze({__proto__:null,MUSTACHE_EXPR:F,ERB_EXPR:U,TMPLIT_EXPR:j,DATA_ATTR:B,ARIA_ATTR:z,IS_ALLOWED_URI:$,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:G,DOCTYPE_NAME:V});const q=()=>"undefined"==typeof window?null:window;return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q();const r=e=>t(e);if(r.version="3.0.5",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;const i=n.document,o=i.currentScript;let{document:s}=n;const{DocumentFragment:c,HTMLTemplateElement:l,Node:E,Element:_,NodeFilter:F,NamedNodeMap:U=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:j,DOMParser:B,trustedTypes:z}=n,H=_.prototype,G=T(H,"cloneNode"),X=T(H,"nextSibling"),Y=T(H,"childNodes"),K=T(H,"parentNode");if("function"==typeof l){const e=s.createElement("template");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let Z,Q="";const{implementation:J,createNodeIterator:ee,createDocumentFragment:te,getElementsByTagName:ne}=s,{importNode:re}=i;let ie={};r.isSupported="function"==typeof e&&"function"==typeof K&&J&&void 0!==J.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:oe,TMPLIT_EXPR:se,DATA_ATTR:ce,ARIA_ATTR:le,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:fe}=W;let{IS_ALLOWED_URI:he}=W,de=null;const pe=S({},[...A,...k,...C,...I,...N]);let ge=null;const be=S({},[...R,...P,...L,...D]);let me=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),we=null,ve=null,ye=!0,Ee=!0,_e=!1,Se=!0,xe=!1,Te=!1,Ae=!1,ke=!1,Ce=!1,Me=!1,Ie=!1,Oe=!0,Ne=!1,Re=!0,Pe=!1,Le={},De=null;const Fe=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ue=null;const je=S({},["audio","video","img","source","image","track"]);let Be=null;const ze=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",He="http://www.w3.org/2000/svg",Ge="http://www.w3.org/1999/xhtml";let Ve=Ge,We=!1,qe=null;const Xe=S({},[$e,He,Ge],p);let Ye;const Ke=["application/xhtml+xml","text/html"];let Ze,Qe=null;const Je=s.createElement("form"),et=function(e){return e instanceof RegExp||e instanceof Function},tt=function(e){if(!Qe||Qe!==e){if(e&&"object"==typeof e||(e={}),e=x(e),Ye=Ye=-1===Ke.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ze="application/xhtml+xml"===Ye?p:d,de="ALLOWED_TAGS"in e?S({},e.ALLOWED_TAGS,Ze):pe,ge="ALLOWED_ATTR"in e?S({},e.ALLOWED_ATTR,Ze):be,qe="ALLOWED_NAMESPACES"in e?S({},e.ALLOWED_NAMESPACES,p):Xe,Be="ADD_URI_SAFE_ATTR"in e?S(x(ze),e.ADD_URI_SAFE_ATTR,Ze):ze,Ue="ADD_DATA_URI_TAGS"in e?S(x(je),e.ADD_DATA_URI_TAGS,Ze):je,De="FORBID_CONTENTS"in e?S({},e.FORBID_CONTENTS,Ze):Fe,we="FORBID_TAGS"in e?S({},e.FORBID_TAGS,Ze):{},ve="FORBID_ATTR"in e?S({},e.FORBID_ATTR,Ze):{},Le="USE_PROFILES"in e&&e.USE_PROFILES,ye=!1!==e.ALLOW_ARIA_ATTR,Ee=!1!==e.ALLOW_DATA_ATTR,_e=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,xe=e.SAFE_FOR_TEMPLATES||!1,Te=e.WHOLE_DOCUMENT||!1,Ce=e.RETURN_DOM||!1,Me=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,ke=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,Ne=e.SANITIZE_NAMED_PROPS||!1,Re=!1!==e.KEEP_CONTENT,Pe=e.IN_PLACE||!1,he=e.ALLOWED_URI_REGEXP||$,Ve=e.NAMESPACE||Ge,me=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(me.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(me.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(me.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),xe&&(Ee=!1),Me&&(Ce=!0),Le&&(de=S({},[...N]),ge=[],!0===Le.html&&(S(de,A),S(ge,R)),!0===Le.svg&&(S(de,k),S(ge,P),S(ge,D)),!0===Le.svgFilters&&(S(de,C),S(ge,P),S(ge,D)),!0===Le.mathMl&&(S(de,I),S(ge,L),S(ge,D))),e.ADD_TAGS&&(de===pe&&(de=x(de)),S(de,e.ADD_TAGS,Ze)),e.ADD_ATTR&&(ge===be&&(ge=x(ge)),S(ge,e.ADD_ATTR,Ze)),e.ADD_URI_SAFE_ATTR&&S(Be,e.ADD_URI_SAFE_ATTR,Ze),e.FORBID_CONTENTS&&(De===Fe&&(De=x(De)),S(De,e.FORBID_CONTENTS,Ze)),Re&&(de["#text"]=!0),Te&&S(de,["html","head","body"]),de.table&&(S(de,["tbody"]),delete we.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw y('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw y('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Z=e.TRUSTED_TYPES_POLICY,Q=Z.createHTML("")}else void 0===Z&&(Z=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(z,o)),null!==Z&&"string"==typeof Q&&(Q=Z.createHTML(""));a&&a(e),Qe=e}},nt=S({},["mi","mo","mn","ms","mtext"]),rt=S({},["foreignobject","desc","title","annotation-xml"]),it=S({},["title","style","font","a","script"]),at=S({},k);S(at,C),S(at,M);const ot=S({},I);S(ot,O);const st=function(e){h(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ct=function(e,t){try{h(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(Ce||Me)try{st(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},lt=function(e){let t,n;if(ke)e=""+e;else{const t=g(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ye&&Ve===Ge&&(e=''+e+"");const r=Z?Z.createHTML(e):e;if(Ve===Ge)try{t=(new B).parseFromString(r,Ye)}catch(e){}if(!t||!t.documentElement){t=J.createDocument(Ve,"template",null);try{t.documentElement.innerHTML=We?Q:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(s.createTextNode(n),i.childNodes[0]||null),Ve===Ge?ne.call(t,Te?"html":"body")[0]:Te?t.documentElement:i},ut=function(e){return ee.call(e.ownerDocument||e,e,F.SHOW_ELEMENT|F.SHOW_COMMENT|F.SHOW_TEXT,null,!1)},ft=function(e){return"object"==typeof E?e instanceof E:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ht=function(e,t,n){ie[e]&&u(ie[e],(e=>{e.call(r,t,n,Qe)}))},dt=function(e){let t;if(ht("beforeSanitizeElements",e,null),(n=e)instanceof j&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof U)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return st(e),!0;var n;const i=Ze(e.nodeName);if(ht("uponSanitizeElement",e,{tagName:i,allowedTags:de}),e.hasChildNodes()&&!ft(e.firstElementChild)&&(!ft(e.content)||!ft(e.content.firstElementChild))&&v(/<[/\w]/g,e.innerHTML)&&v(/<[/\w]/g,e.textContent))return st(e),!0;if(!de[i]||we[i]){if(!we[i]&>(i)){if(me.tagNameCheck instanceof RegExp&&v(me.tagNameCheck,i))return!1;if(me.tagNameCheck instanceof Function&&me.tagNameCheck(i))return!1}if(Re&&!De[i]){const t=K(e)||e.parentNode,n=Y(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(G(n[r],!0),X(e))}return st(e),!0}return e instanceof _&&!function(e){let t=K(e);t&&t.tagName||(t={namespaceURI:Ve,tagName:"template"});const n=d(e.tagName),r=d(t.tagName);return!!qe[e.namespaceURI]&&(e.namespaceURI===He?t.namespaceURI===Ge?"svg"===n:t.namespaceURI===$e?"svg"===n&&("annotation-xml"===r||nt[r]):Boolean(at[n]):e.namespaceURI===$e?t.namespaceURI===Ge?"math"===n:t.namespaceURI===He?"math"===n&&rt[r]:Boolean(ot[n]):e.namespaceURI===Ge?!(t.namespaceURI===He&&!rt[r])&&!(t.namespaceURI===$e&&!nt[r])&&!ot[n]&&(it[n]||!at[n]):!("application/xhtml+xml"!==Ye||!qe[e.namespaceURI]))}(e)?(st(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!v(/<\/no(script|embed|frames)/i,e.innerHTML)?(xe&&3===e.nodeType&&(t=e.textContent,t=b(t,ae," "),t=b(t,oe," "),t=b(t,se," "),e.textContent!==t&&(h(r.removed,{element:e.cloneNode()}),e.textContent=t)),ht("afterSanitizeElements",e,null),!1):(st(e),!0)},pt=function(e,t,n){if(Oe&&("id"===t||"name"===t)&&(n in s||n in Je))return!1;if(Ee&&!ve[t]&&v(ce,t));else if(ye&&v(le,t));else if(!ge[t]||ve[t]){if(!(gt(e)&&(me.tagNameCheck instanceof RegExp&&v(me.tagNameCheck,e)||me.tagNameCheck instanceof Function&&me.tagNameCheck(e))&&(me.attributeNameCheck instanceof RegExp&&v(me.attributeNameCheck,t)||me.attributeNameCheck instanceof Function&&me.attributeNameCheck(t))||"is"===t&&me.allowCustomizedBuiltInElements&&(me.tagNameCheck instanceof RegExp&&v(me.tagNameCheck,n)||me.tagNameCheck instanceof Function&&me.tagNameCheck(n))))return!1}else if(Be[t]);else if(v(he,b(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==m(n,"data:")||!Ue[e])if(_e&&!v(ue,b(n,fe,"")));else if(n)return!1;return!0},gt=function(e){return e.indexOf("-")>0},bt=function(e){let t,n,i,a;ht("beforeSanitizeAttributes",e,null);const{attributes:o}=e;if(!o)return;const s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(a=o.length;a--;){t=o[a];const{name:c,namespaceURI:l}=t;if(n="value"===c?t.value:w(t.value),i=Ze(c),s.attrName=i,s.attrValue=n,s.keepAttr=!0,s.forceKeepAttr=void 0,ht("uponSanitizeAttribute",e,s),n=s.attrValue,s.forceKeepAttr)continue;if(ct(c,e),!s.keepAttr)continue;if(!Se&&v(/\/>/i,n)){ct(c,e);continue}xe&&(n=b(n,ae," "),n=b(n,oe," "),n=b(n,se," "));const u=Ze(e.nodeName);if(pt(u,i,n)){if(!Ne||"id"!==i&&"name"!==i||(ct(c,e),n="user-content-"+n),Z&&"object"==typeof z&&"function"==typeof z.getAttributeType)if(l);else switch(z.getAttributeType(u,i)){case"TrustedHTML":n=Z.createHTML(n);break;case"TrustedScriptURL":n=Z.createScriptURL(n)}try{l?e.setAttributeNS(l,c,n):e.setAttribute(c,n),f(r.removed)}catch(e){}}}ht("afterSanitizeAttributes",e,null)},mt=function e(t){let n;const r=ut(t);for(ht("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ht("uponSanitizeShadowNode",n,null),dt(n)||(n.content instanceof c&&e(n.content),bt(n));ht("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t,n,a,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(We=!e,We&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ft(e)){if("function"!=typeof e.toString)throw y("toString is not a function");if("string"!=typeof(e=e.toString()))throw y("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Ae||tt(s),r.removed=[],"string"==typeof e&&(Pe=!1),Pe){if(e.nodeName){const t=Ze(e.nodeName);if(!de[t]||we[t])throw y("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof E)t=lt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!Ce&&!xe&&!Te&&-1===e.indexOf("<"))return Z&&Ie?Z.createHTML(e):e;if(t=lt(e),!t)return Ce?null:Ie?Q:""}t&&ke&&st(t.firstChild);const l=ut(Pe?e:t);for(;a=l.nextNode();)dt(a)||(a.content instanceof c&&mt(a.content),bt(a));if(Pe)return e;if(Ce){if(Me)for(o=te.call(t.ownerDocument);t.firstChild;)o.appendChild(t.firstChild);else o=t;return(ge.shadowroot||ge.shadowrootmode)&&(o=re.call(i,o,!0)),o}let u=Te?t.outerHTML:t.innerHTML;return Te&&de["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&v(V,t.ownerDocument.doctype.name)&&(u="\n"+u),xe&&(u=b(u,ae," "),u=b(u,oe," "),u=b(u,se," ")),Z&&Ie?Z.createHTML(u):u},r.setConfig=function(e){tt(e),Ae=!0},r.clearConfig=function(){Qe=null,Ae=!1},r.isValidAttribute=function(e,t,n){Qe||tt({});const r=Ze(e),i=Ze(t);return pt(r,i,n)},r.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],h(ie[e],t))},r.removeHook=function(e){if(ie[e])return f(ie[e])},r.removeHooks=function(e){ie[e]&&(ie[e]=[])},r.removeAllHooks=function(){ie={}},r}()}()},6799:e=>{e.exports=function e(t,n,r){function i(o,s){if(!n[o]){if(!t[o]){if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[o]={exports:{}};t[o][0].call(l.exports,(function(e){return i(t[o][1][e]||e)}),l,l.exports,e,t,n,r)}return n[o].exports}for(var a=void 0,o=0;o0&&void 0!==arguments[0]?arguments[0]:{},r=n.defaultLayoutOptions,a=void 0===r?{}:r,s=n.algorithms,c=void 0===s?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking"]:s,l=n.workerFactory,u=n.workerUrl;if(i(this,e),this.defaultLayoutOptions=a,this.initialized=!1,void 0===u&&void 0===l)throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var f=l;void 0!==u&&void 0===l&&(f=function(e){return new Worker(e)});var h=f(u);if("function"!=typeof h.postMessage)throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new o(h),this.worker.postMessage({cmd:"register",algorithms:c}).then((function(e){return t.initialized=!0})).catch(console.err)}return r(e,[{key:"layout",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.layoutOptions,r=void 0===n?this.defaultLayoutOptions:n,i=t.logging,a=void 0!==i&&i,o=t.measureExecutionTime,s=void 0!==o&&o;return e?this.worker.postMessage({cmd:"layout",graph:e,layoutOptions:r,options:{logging:a,measureExecutionTime:s}}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker.terminate()}}]),e}();n.default=a;var o=function(){function e(t){var n=this;if(i(this,e),void 0===t)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=t,this.worker.onmessage=function(e){setTimeout((function(){n.receive(n,e)}),0)}}return r(e,[{key:"postMessage",value:function(e){var t=this.id||0;this.id=t+1,e.id=t;var n=this;return new Promise((function(r,i){n.resolvers[t]=function(e,t){e?(n.convertGwtStyleError(e),i(e)):r(t)},n.worker.postMessage(e)}))}},{key:"receive",value:function(e,t){var n=t.data,r=e.resolvers[n.id];r&&(delete e.resolvers[n.id],n.error?r(n.error):r(null,n.data))}},{key:"terminate",value:function(){this.worker.terminate&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(e){if(e){var t=e.__java$exception;t&&(t.cause&&t.cause.backingJsObject&&(e.cause=t.cause.backingJsObject,this.convertGwtStyleError(e.cause)),delete e.__java$exception)}}}]),e}()},{}],2:[function(e,t,n){"use strict";var r=e("./elk-api.js").default;Object.defineProperty(t.exports,"__esModule",{value:!0}),t.exports=r,r.default=r},{"./elk-api.js":1}]},{},[2])(2)},1771:(e,t,n)=>{var r;function a(){}function s(){}function c(){}function l(){}function u(){}function f(){}function h(){}function d(){}function p(){}function b(){}function m(){}function w(){}function v(){}function y(){}function E(){}function _(){}function S(){}function x(){}function T(){}function A(){}function k(){}function C(){}function M(){}function I(){}function O(){}function N(){}function R(){}function P(){}function L(){}function D(){}function F(){}function U(){}function j(){}function B(){}function z(){}function $(){}function H(){}function G(){}function V(){}function W(){}function q(){}function X(){}function Y(){}function K(){}function Z(){}function Q(){}function J(){}function ee(){}function te(){}function ne(){}function re(){}function ie(){}function ae(){}function oe(){}function se(){}function ce(){}function le(){}function ue(){}function fe(){}function he(){}function de(){}function pe(){}function ge(){}function be(){}function me(){}function we(){}function ve(){}function ye(){}function Ee(){}function _e(){}function Se(){}function xe(){}function Te(){}function Ae(){}function ke(){}function Ce(){}function Me(){}function Ie(){}function Oe(){}function Ne(){}function Re(){}function Pe(){}function Le(){}function De(){}function Fe(){}function Ue(){}function je(){}function Be(){}function ze(){}function $e(){}function He(){}function Ge(){}function Ve(){}function We(){}function qe(){}function Xe(){}function Ye(){}function Ke(){}function Ze(){}function Qe(){}function Je(){}function et(){}function tt(){}function nt(){}function rt(){}function it(){}function at(){}function ot(){}function st(){}function ct(){}function lt(){}function ut(){}function ft(){}function ht(){}function dt(){}function pt(){}function gt(){}function bt(){}function mt(){}function wt(){}function vt(){}function yt(){}function Et(){}function _t(){}function St(){}function xt(){}function Tt(){}function At(){}function kt(){}function Ct(){}function Mt(){}function It(){}function Ot(){}function Nt(){}function Rt(){}function Pt(){}function Lt(){}function Dt(){}function Ft(){}function Ut(){}function jt(){}function Bt(){}function zt(){}function $t(){}function Ht(){}function Gt(){}function Vt(){}function Wt(){}function qt(){}function Xt(){}function Yt(){}function Kt(){}function Zt(){}function Qt(){}function Jt(){}function en(){}function tn(){}function nn(){}function rn(){}function an(){}function on(){}function sn(){}function cn(){}function ln(){}function un(){}function fn(){}function hn(){}function dn(){}function pn(){}function gn(){}function bn(){}function mn(){}function wn(){}function vn(){}function yn(){}function En(){}function _n(){}function Sn(){}function xn(){}function Tn(){}function An(){}function kn(){}function Cn(){}function Mn(){}function In(){}function On(){}function Nn(){}function Rn(){}function Pn(){}function Ln(){}function Dn(){}function Fn(){}function Un(){}function jn(){}function Bn(){}function zn(){}function $n(){}function Hn(){}function Gn(){}function Vn(){}function Wn(){}function qn(){}function Xn(){}function Yn(){}function Kn(){}function Zn(){}function Qn(){}function Jn(){}function er(){}function tr(){}function nr(){}function rr(){}function ir(){}function ar(){}function or(){}function sr(){}function cr(){}function lr(){}function ur(){}function fr(){}function hr(){}function dr(){}function pr(){}function gr(){}function br(){}function mr(){}function wr(){}function vr(){}function yr(){}function Er(){}function _r(){}function Sr(){}function xr(){}function Tr(){}function Ar(){}function kr(){}function Cr(){}function Mr(){}function Ir(){}function Or(){}function Nr(){}function Rr(){}function Pr(){}function Lr(){}function Dr(){}function Fr(){}function Ur(){}function jr(){}function Br(){}function zr(){}function $r(){}function Hr(){}function Gr(){}function Vr(){}function Wr(){}function qr(){}function Xr(){}function Yr(){}function Kr(){}function Zr(){}function Qr(){}function Jr(){}function ei(){}function ti(){}function ni(){}function ri(){}function ii(){}function ai(){}function oi(){}function si(){}function ci(){}function li(){}function ui(){}function fi(){}function hi(){}function di(){}function pi(){}function gi(){}function bi(){}function mi(){}function wi(){}function vi(){}function yi(){}function Ei(){}function _i(){}function Si(){}function xi(){}function Ti(){}function Ai(){}function ki(){}function Ci(){}function Mi(){}function Ii(){}function Oi(){}function Ni(){}function Ri(){}function Pi(){}function Li(){}function Di(){}function Fi(){}function Ui(){}function ji(){}function Bi(){}function zi(){}function $i(){}function Hi(){}function Gi(){}function Vi(){}function Wi(){}function qi(){}function Xi(){}function Yi(){}function Ki(){}function Zi(){}function Qi(){}function Ji(){}function ea(){}function ta(){}function na(){}function ra(){}function ia(){}function aa(){}function oa(){}function sa(){}function ca(){}function la(){}function ua(){}function fa(){}function ha(){}function da(){}function pa(){}function ga(){}function ba(){}function ma(){}function wa(){}function va(){}function ya(){}function Ea(){}function _a(){}function Sa(){}function xa(){}function Ta(){}function Aa(){}function ka(){}function Ca(){}function Ma(){}function Ia(){}function Oa(){}function Na(){}function Ra(){}function Pa(){}function La(){}function Da(){}function Fa(){}function Ua(){}function ja(){}function Ba(){}function za(){}function $a(){}function Ha(){}function Ga(){}function Va(){}function Wa(){}function qa(){}function Xa(){}function Ya(){}function Ka(){}function Za(){}function Qa(){}function Ja(){}function eo(){}function to(){}function no(){}function ro(){}function io(){}function ao(){}function oo(){}function so(){}function co(){}function lo(){}function uo(){}function fo(){}function ho(){}function po(){}function go(){}function bo(){}function mo(){}function wo(){}function vo(){}function yo(){}function Eo(){}function _o(){}function So(){}function xo(){}function To(){}function Ao(){}function ko(){}function Co(){}function Mo(){}function Io(){}function Oo(){}function No(){}function Ro(){}function Po(){}function Lo(){}function Do(){}function Fo(){}function Uo(){}function jo(){}function Bo(){}function zo(){}function $o(){}function Ho(){}function Go(){}function Vo(){}function Wo(){}function qo(){}function Xo(){}function Yo(){}function Ko(){}function Zo(){}function Qo(){}function Jo(){}function es(){}function ts(){}function ns(){}function rs(){}function is(){}function as(){}function os(){}function ss(){}function cs(){}function ls(){}function us(){}function fs(){}function hs(){}function ds(){}function ps(){}function gs(){}function bs(){}function ms(){}function ws(){}function vs(){}function ys(){}function Es(){}function _s(){}function Ss(){}function xs(){}function Ts(){}function As(){}function ks(){}function Cs(){}function Ms(){}function Is(){}function Os(){}function Ns(){}function Rs(){}function Ps(){}function Ls(){}function Ds(){}function Fs(){}function Us(){}function js(){}function Bs(){}function zs(){}function $s(){}function Hs(){}function Gs(){}function Vs(){}function Ws(){}function qs(){}function Xs(){}function Ys(){}function Ks(){}function Zs(){}function Qs(){}function Js(){}function ec(){}function tc(){}function nc(){}function rc(){}function ic(){}function ac(){}function oc(){}function sc(){}function cc(){}function lc(){}function uc(){}function fc(){}function hc(){}function dc(){}function pc(){}function gc(){}function bc(){}function mc(){}function wc(){}function vc(){}function yc(){}function Ec(){}function _c(){}function Sc(){}function xc(){}function Tc(){}function Ac(){}function kc(){}function Cc(){}function Mc(){}function Ic(){}function Oc(){}function Nc(){}function Rc(){}function Pc(){}function Lc(){}function Dc(){}function Fc(){}function Uc(){}function jc(){}function Bc(){}function zc(){}function $c(){}function Hc(){}function Gc(){}function Vc(){}function Wc(){}function qc(){}function Xc(){}function Yc(){}function Kc(){}function Zc(){}function Qc(){}function Jc(){}function el(){}function tl(){}function nl(){}function rl(){}function il(){}function al(){}function ol(){}function sl(){}function cl(){}function ll(){}function ul(){}function fl(){}function hl(){}function dl(){}function pl(){}function gl(){}function bl(){}function ml(){}function wl(){}function vl(){}function yl(){}function El(){}function _l(){}function Sl(){}function xl(){}function Tl(){}function Al(){}function kl(){}function Cl(){}function Ml(){}function Il(){}function Ol(){}function Nl(){}function Rl(){}function Pl(){}function Ll(){}function Dl(){}function Fl(){}function Ul(){}function jl(){}function Bl(){}function zl(){}function $l(){}function Hl(){}function Gl(){}function Vl(){}function Wl(){}function ql(){}function Xl(){}function Yl(){}function Kl(){}function Zl(){}function Ql(){}function Jl(){}function eu(){}function tu(){}function nu(){}function ru(){}function iu(){}function au(){}function ou(){}function su(){}function cu(){}function lu(){}function uu(){}function fu(){}function hu(){}function du(){}function pu(){}function gu(){}function bu(){}function mu(){}function wu(){}function vu(){}function yu(){}function Eu(){}function _u(){}function Su(){}function xu(){}function Tu(){}function Au(){}function ku(){}function Cu(){}function Mu(){}function Iu(){}function Ou(){}function Nu(){}function Ru(){}function Pu(){Bw()}function Lu(){Mre()}function Du(){u5()}function Fu(){jee()}function Uu(){Moe()}function ju(){ehe()}function Bu(){Zne()}function zu(){ste()}function $u(){AS()}function Hu(){xS()}function Gu(){XP()}function Vu(){TS()}function Wu(){f0()}function qu(){rY()}function Xu(){d4()}function Yu(){CS()}function Ku(){toe()}function Zu(){oG()}function Qu(){JY()}function Ju(){Rve()}function ef(){mve()}function tf(){H1()}function nf(){RV()}function rf(){G1()}function af(){W1()}function of(){cG()}function sf(){nre()}function cf(){TK()}function lf(){OG()}function uf(){j3()}function ff(){IS()}function hf(){rue()}function df(){Yse()}function pf(){uG()}function gf(){Npe()}function bf(){f2()}function mf(){xoe()}function wf(){Xae()}function vf(){c5()}function yf(){oue()}function Ef(){l5()}function _f(){qae()}function Sf(){Ede()}function xf(){zte()}function Tf(){AK()}function Af(){Ove()}function kf(){K9()}function Cf(){gbe()}function Mf(){dP()}function If(){z0()}function Of(){dge()}function Nf(e){sB(e)}function Rf(e){this.a=e}function Pf(e){this.a=e}function Lf(e){this.a=e}function Df(e){this.a=e}function Ff(e){this.a=e}function Uf(e){this.a=e}function jf(e){this.a=e}function Bf(e){this.a=e}function zf(e){this.a=e}function $f(e){this.a=e}function Hf(e){this.a=e}function Gf(e){this.a=e}function Vf(e){this.a=e}function Wf(e){this.a=e}function qf(e){this.a=e}function Xf(e){this.a=e}function Yf(e){this.a=e}function Kf(e){this.a=e}function Zf(e){this.a=e}function Qf(e){this.a=e}function Jf(e){this.a=e}function eh(e){this.a=e}function th(e){this.a=e}function nh(e){this.a=e}function rh(e){this.a=e}function ih(e){this.a=e}function ah(e){this.a=e}function oh(e){this.a=e}function sh(e){this.a=e}function ch(e){this.a=e}function lh(e){this.a=e}function uh(e){this.a=e}function fh(e){this.c=e}function hh(e){this.b=e}function dh(){this.a=[]}function ph(e,t){e.a=t}function gh(e,t){e.j=t}function bh(e,t){e.c=t}function mh(e,t){e.d=t}function wh(e,t){e.k=t}function vh(e,t){e.d=t}function yh(e,t){e.a=t}function Eh(e,t){e.a=t}function _h(e,t){e.c=t}function Sh(e,t){e.a=t}function xh(e,t){e.f=t}function Th(e,t){e.e=t}function Ah(e,t){e.g=t}function kh(e,t){e.e=t}function Ch(e,t){e.f=t}function Mh(e,t){e.i=t}function Ih(e,t){e.i=t}function Oh(e,t){e.b=t}function Nh(e,t){e.o=t}function Rh(e,t){e.n=t}function Ph(e){e.b=e.a}function Lh(e){e.c=e.d.d}function Dh(e){this.d=e}function Fh(e){this.a=e}function Uh(e){this.a=e}function jh(e){this.a=e}function Bh(e){this.a=e}function zh(e){this.a=e}function $h(e){this.a=e}function Hh(e){this.a=e}function Gh(e){this.a=e}function Vh(e){this.a=e}function Wh(e){this.a=e}function qh(e){this.a=e}function Xh(e){this.a=e}function Yh(e){this.a=e}function Kh(e){this.a=e}function Zh(e){this.a=e}function Qh(e){this.b=e}function Jh(e){this.b=e}function ed(e){this.b=e}function td(e){this.c=e}function nd(e){this.c=e}function rd(e){this.a=e}function id(e){this.a=e}function ad(e){this.a=e}function od(e){this.a=e}function sd(e){this.a=e}function cd(e){this.a=e}function ld(e){this.a=e}function ud(e){this.a=e}function fd(e){this.a=e}function hd(e){this.a=e}function dd(e){this.a=e}function pd(e){this.a=e}function gd(e){this.a=e}function bd(e){this.a=e}function md(e){this.a=e}function wd(e){this.a=e}function vd(e){this.a=e}function yd(e){this.a=e}function Ed(e){this.a=e}function _d(e){this.a=e}function Sd(e){this.a=e}function xd(e){this.a=e}function Td(e){this.a=e}function Ad(e){this.a=e}function kd(e){this.a=e}function Cd(e){this.a=e}function Md(e){this.a=e}function Id(e){this.a=e}function Od(e){this.a=e}function Nd(e){this.a=e}function Rd(e){this.a=e}function Pd(e){this.a=e}function Ld(e){this.a=e}function Dd(e){this.a=e}function Fd(e){this.c=e}function Ud(e){this.a=e}function jd(e){this.a=e}function Bd(e){this.a=e}function zd(e){this.a=e}function $d(e){this.a=e}function Hd(e){this.a=e}function Gd(e){this.a=e}function Vd(e){this.a=e}function Wd(e){this.a=e}function qd(e){this.a=e}function Xd(e){this.a=e}function Yd(e){this.a=e}function Kd(e){this.a=e}function Zd(e){this.e=e}function Qd(e){this.a=e}function Jd(e){this.a=e}function ep(e){this.a=e}function tp(e){this.a=e}function np(e){this.a=e}function rp(e){this.a=e}function ip(e){this.a=e}function ap(e){this.a=e}function op(e){this.a=e}function sp(e){this.a=e}function cp(e){this.a=e}function lp(e){this.a=e}function up(e){this.a=e}function fp(e){this.a=e}function hp(e){this.a=e}function dp(e){this.a=e}function pp(e){this.a=e}function gp(e){this.a=e}function bp(e){this.a=e}function mp(e){this.a=e}function wp(e){this.a=e}function vp(e){this.a=e}function yp(e){this.a=e}function Ep(e){this.a=e}function _p(e){this.a=e}function Sp(e){this.a=e}function xp(e){this.a=e}function Tp(e){this.a=e}function Ap(e){this.a=e}function kp(e){this.a=e}function Cp(e){this.a=e}function Mp(e){this.a=e}function Ip(e){this.a=e}function Op(e){this.a=e}function Np(e){this.a=e}function Rp(e){this.a=e}function Pp(e){this.a=e}function Lp(e){this.a=e}function Dp(e){this.a=e}function Fp(e){this.a=e}function Up(e){this.a=e}function jp(e){this.a=e}function Bp(e){this.a=e}function zp(e){this.a=e}function $p(e){this.a=e}function Hp(e){this.a=e}function Gp(e){this.a=e}function Vp(e){this.a=e}function Wp(e){this.a=e}function qp(e){this.a=e}function Xp(e){this.a=e}function Yp(e){this.a=e}function Kp(e){this.a=e}function Zp(e){this.a=e}function Qp(e){this.c=e}function Jp(e){this.b=e}function eg(e){this.a=e}function tg(e){this.a=e}function ng(e){this.a=e}function rg(e){this.a=e}function ig(e){this.a=e}function ag(e){this.a=e}function og(e){this.a=e}function sg(e){this.a=e}function cg(e){this.a=e}function lg(e){this.a=e}function ug(e){this.a=e}function fg(e){this.a=e}function hg(e){this.a=e}function dg(e){this.a=e}function pg(e){this.a=e}function gg(e){this.a=e}function bg(e){this.a=e}function mg(e){this.a=e}function wg(e){this.a=e}function vg(e){this.a=e}function yg(e){this.a=e}function Eg(e){this.a=e}function _g(e){this.a=e}function Sg(e){this.a=e}function xg(e){this.a=e}function Tg(e){this.a=e}function Ag(e){this.a=e}function kg(e){this.a=e}function Cg(e){this.a=e}function Mg(e){this.a=e}function Ig(e){this.a=e}function Og(e){this.a=e}function Ng(e){this.a=e}function Rg(e){this.a=e}function Pg(e){this.a=e}function Lg(e){this.a=e}function Dg(e){this.a=e}function Fg(e){this.a=e}function Ug(e){this.a=e}function jg(e){this.a=e}function Bg(e){this.a=e}function zg(e){this.f=e}function $g(e){this.a=e}function Hg(e){this.a=e}function Gg(e){this.a=e}function Vg(e){this.a=e}function Wg(e){this.a=e}function qg(e){this.a=e}function Xg(e){this.a=e}function Yg(e){this.a=e}function Kg(e){this.a=e}function Zg(e){this.a=e}function Qg(e){this.a=e}function Jg(e){this.a=e}function eb(e){this.a=e}function tb(e){this.a=e}function nb(e){this.a=e}function rb(e){this.a=e}function ib(e){this.a=e}function ab(e){this.a=e}function ob(e){this.a=e}function sb(e){this.a=e}function cb(e){this.a=e}function lb(e){this.a=e}function ub(e){this.a=e}function fb(e){this.a=e}function hb(e){this.a=e}function db(e){this.a=e}function pb(e){this.a=e}function gb(e){this.a=e}function bb(e){this.a=e}function mb(e){this.b=e}function wb(e){this.a=e}function vb(e){this.a=e}function yb(e){this.a=e}function Eb(e){this.a=e}function _b(e){this.a=e}function Sb(e){this.a=e}function xb(e){this.a=e}function Tb(e){this.a=e}function Ab(e){this.a=e}function kb(e){this.a=e}function Cb(e){this.b=e}function Mb(e){this.c=e}function Ib(e){this.e=e}function Ob(e){this.a=e}function Nb(e){this.a=e}function Rb(e){this.a=e}function Pb(e){this.a=e}function Lb(e){this.d=e}function Db(e){this.a=e}function Fb(e){this.a=e}function Ub(e){this.a=e}function jb(e){this.e=e}function Bb(){this.a=0}function zb(){JC(this)}function $b(){eM(this)}function Hb(){zU(this)}function Gb(){GB(this)}function Vb(){}function Wb(){this.c=_nt}function qb(e,t){e.b+=t}function Xb(e){return e.a}function Yb(e){return e.a}function Kb(e){return e.a}function Zb(e){return e.a}function Qb(e){return e.a}function Jb(e){return e.e}function em(){return null}function tm(){return null}function nm(e,t){t.$c(e.a)}function rm(e,t){e.a=t-e.a}function im(e,t){e.b=t-e.b}function am(e,t){e.e=t,t.b=e}function om(e){b$(),oDe.be(e)}function sm(e){bP(),this.a=e}function cm(e){bP(),this.a=e}function lm(e){bP(),this.a=e}function um(e){kB(),this.a=e}function fm(){this.a=this}function hm(){this.Bb|=256}function dm(){DI.call(this)}function pm(){DI.call(this)}function gm(){dm.call(this)}function bm(){dm.call(this)}function mm(){dm.call(this)}function wm(){dm.call(this)}function vm(){dm.call(this)}function ym(){dm.call(this)}function Em(){dm.call(this)}function _m(){dm.call(this)}function Sm(){dm.call(this)}function xm(){dm.call(this)}function Tm(){dm.call(this)}function Am(e){wle(e.c,e.b)}function km(e,t){E2(e.e,t)}function Cm(e,t){SL(e.a,t)}function Mm(e,t){e.length=t}function Im(){this.b=new Jk}function Om(){this.a=new Hb}function Nm(){this.a=new Hb}function Rm(){this.a=new $b}function Pm(){this.a=new $b}function Lm(){this.a=new $b}function Dm(){this.a=new we}function Fm(){this.a=new WX}function Um(){this.a=new ut}function jm(){this.a=new eS}function Bm(){this.a=new XH}function zm(){this.a=new mR}function $m(){this.a=new cV}function Hm(){this.a=new $b}function Gm(){this.a=new $b}function Vm(){this.a=new $b}function Wm(){this.a=new $b}function qm(){this.d=new $b}function Xm(){this.a=new Om}function Ym(){this.b=new Hb}function Km(){this.a=new Hb}function Zm(){this.a=new Ku}function Qm(){this.b=new $b}function Jm(){this.e=new $b}function ew(e){this.a=function(e){var t;return(t=woe(e))>34028234663852886e22?e_e:t<-34028234663852886e22?t_e:t}(e)}function tw(){this.d=new $b}function nw(){nw=S,new Hb}function rw(){gm.call(this)}function iw(){Rm.call(this)}function aw(){ER.call(this)}function ow(){Vb.call(this)}function sw(){Vb.call(this)}function cw(){ow.call(this)}function lw(){sw.call(this)}function uw(){$b.call(this)}function fw(){L$.call(this)}function hw(){L$.call(this)}function dw(){Hw.call(this)}function pw(){Hw.call(this)}function gw(){Hw.call(this)}function bw(){Ww.call(this)}function mw(){iS.call(this)}function ww(){tc.call(this)}function vw(){tc.call(this)}function yw(){Kw.call(this)}function Ew(){Kw.call(this)}function _w(){Hb.call(this)}function Sw(){Hb.call(this)}function xw(){Hb.call(this)}function Tw(){Om.call(this)}function Aw(){s1.call(this)}function kw(){hm.call(this)}function Cw(){kI.call(this)}function Mw(){kI.call(this)}function Iw(){Hb.call(this)}function Ow(){Hb.call(this)}function Nw(){Hb.call(this)}function Rw(){wc.call(this)}function Pw(){wc.call(this)}function Lw(){Rw.call(this)}function Dw(){Ou.call(this)}function Fw(e){S_.call(this,e)}function Uw(e){Fw.call(this,e)}function jw(e){S_.call(this,e)}function Bw(){Bw=S,PLe=new s}function zw(){zw=S,$Le=new Zv}function $w(){$w=S,HLe=new Qv}function Hw(){this.a=new Om}function Gw(){this.a=new $b}function Vw(){this.j=new $b}function Ww(){this.a=new Hb}function qw(){this.a=new iS}function Xw(){this.a=new Vo}function Yw(){this.a=new YE}function Kw(){this.a=new hc}function Zw(){Zw=S,YLe=new BM}function Qw(e){Fw.call(this,e)}function Jw(e){Fw.call(this,e)}function ev(e){sq.call(this,e)}function tv(e){sq.call(this,e)}function nv(e){fP.call(this,e)}function rv(e){M_.call(this,e)}function iv(e){I_.call(this,e)}function av(e){I_.call(this,e)}function ov(e){Eoe.call(this,e)}function sv(e){VU.call(this,e)}function cv(e){sv.call(this,e)}function lv(){uh.call(this,{})}function uv(){uv=S,pDe=new E}function fv(){fv=S,tDe=new a}function hv(){hv=S,aDe=new h}function dv(){dv=S,cDe=new w}function pv(e,t,n){e.a[t.g]=n}function gv(e,t){(function(e){return SL(e.c,(L3(),V4e)),iJ(e.a,Mv(NN(Mee((u9(),hQe)))))?new Vs:new Fg(e)})(e).td(t)}function bv(e){II(),this.a=e}function mv(e){U0(),this.a=e}function wv(e){pP(),this.a=e}function vv(e){gF(),this.f=e}function yv(e){gF(),this.f=e}function Ev(e){e.b=null,e.c=0}function _v(e){sv.call(this,e)}function Sv(e){sv.call(this,e)}function xv(e){sv.call(this,e)}function Tv(e){VU.call(this,e)}function Av(e){return sB(e),e}function kv(e){return new lh(e)}function Cv(e){return new lj(e)}function Mv(e){return sB(e),e}function Iv(e){return sB(e),e}function Ov(e,t){return e.g-t.g}function Nv(e){sv.call(this,e)}function Rv(e){sv.call(this,e)}function Pv(e){sv.call(this,e)}function Lv(e){sv.call(this,e)}function Dv(e){sv.call(this,e)}function Fv(e){sv.call(this,e)}function Uv(e){sB(e),this.a=e}function jv(e){KU(e,e.length)}function Bv(e){return e.b==e.c}function zv(e){return!!e&&e.b}function $v(e){return sB(e),e}function Hv(e){return T4(e),e}function Gv(e){sv.call(this,e)}function Vv(e){sv.call(this,e)}function Wv(e){sv.call(this,e)}function qv(e){sv.call(this,e)}function Xv(e){sv.call(this,e)}function Yv(e){xO.call(this,e,0)}function Kv(){FG.call(this,12,3)}function Zv(){qf.call(this,null)}function Qv(){qf.call(this,null)}function Jv(){throw Jb(new _m)}function ey(){throw Jb(new _m)}function ty(){this.a=RN(cj(rye))}function ny(e){bP(),this.a=cj(e)}function ry(e){u1(e),am(e.a,e.a)}function iy(e,t){e.Td(t),t.Sd(e)}function ay(e,t){return VH(e,t)}function oy(e){Sv.call(this,e)}function sy(e){Sv.call(this,e)}function cy(e){Rv.call(this,e)}function ly(){jh.call(this,"")}function uy(){jh.call(this,"")}function fy(){jh.call(this,"")}function hy(){jh.call(this,"")}function dy(e){Qh.call(this,e)}function py(e){dy.call(this,e)}function gy(e){GI.call(this,e)}function by(e,t){return EK(e,t)}function my(e){return e.a?e.b:0}function wy(e){return e.a?e.b:0}function vy(e,t){return e.c=t,e}function yy(e,t){return e.f=t,e}function Ey(e,t){return e.a=t,e}function _y(e,t){return e.f=t,e}function Sy(e,t){return e.k=t,e}function xy(e,t){return e.a=t,e}function Ty(e,t){e.b=!0,e.d=t}function Ay(e,t){return e.e=t,e}function ky(e,t){return e?0:t-1}function Cy(e){xz.call(this,e)}function My(e){xz.call(this,e)}function Iy(e){J8.call(this,e)}function Oy(){DM.call(this,"")}function Ny(){Ny=S,xFe=typeof Map===Qve&&Map.prototype.entries&&function(){try{return(new Map).entries().next().done}catch(e){return!1}}()?Map:function(){function e(){this.obj=this.createObject()}return e.prototype.createObject=function(e){return Object.create(null)},e.prototype.get=function(e){return this.obj[e]},e.prototype.set=function(e,t){this.obj[e]=t},e.prototype[y_e]=function(e){delete this.obj[e]},e.prototype.keys=function(){return Object.getOwnPropertyNames(this.obj)},e.prototype.entries=function(){var e=this.keys(),t=this,n=0;return{next:function(){if(n>=e.length)return{done:!0};var r=e[n++];return{value:[r,t.get(r)],done:!1}}}},function(){if(!Object.create||!Object.getOwnPropertyNames)return!1;var e="__proto__",t=Object.create(null);return void 0===t[e]&&0==Object.getOwnPropertyNames(t).length&&(t[e]=42,42===t[e]&&0!=Object.getOwnPropertyNames(t).length)}()||(e.prototype.createObject=function(){return{}},e.prototype.get=function(e){return this.obj[":"+e]},e.prototype.set=function(e,t){this.obj[":"+e]=t},e.prototype[y_e]=function(e){delete this.obj[":"+e]},e.prototype.keys=function(){var e=[];for(var t in this.obj)58==t.charCodeAt(0)&&e.push(t.substring(1));return e}),e}()}function Ry(){Ry=S,b$()}function Py(){throw Jb(new _m)}function Ly(){throw Jb(new _m)}function Dy(){throw Jb(new _m)}function Fy(){throw Jb(new _m)}function Uy(){throw Jb(new _m)}function jy(){this.b=0,this.a=0}function By(e,t){return e.b=t,e}function zy(e,t){return e.a=t,e}function $y(e,t){return e.a=t,e}function Hy(e,t){return e.c=t,e}function Gy(e,t){return e.c=t,e}function Vy(e,t){return e.d=t,e}function Wy(e,t){return e.e=t,e}function qy(e,t){return e.f=t,e}function Xy(e,t){return e.b=t,e}function Yy(e,t){return e.b=t,e}function Ky(e,t){return e.c=t,e}function Zy(e,t){return e.d=t,e}function Qy(e,t){return e.e=t,e}function Jy(e,t){return e.g=t,e}function eE(e,t){return e.a=t,e}function tE(e,t){return e.i=t,e}function nE(e,t){return e.j=t,e}function rE(e,t){return e.k=t,e}function iE(e,t,n){!function(e,t,n){ZU(e,new vx(t.a,n.a))}(e.a,t,n)}function aE(e){TP.call(this,e)}function oE(e){yQ.call(this,e)}function sE(e){Wz.call(this,e)}function cE(e){Wz.call(this,e)}function lE(){this.a=0,this.b=0}function uE(){throw Jb(new _m)}function fE(){throw Jb(new _m)}function hE(){throw Jb(new _m)}function dE(){throw Jb(new _m)}function pE(){throw Jb(new _m)}function gE(){throw Jb(new _m)}function bE(){throw Jb(new _m)}function mE(){throw Jb(new _m)}function wE(){throw Jb(new _m)}function vE(){throw Jb(new _m)}function yE(){yE=S,ret=function(){var e,t;gbe();try{if(t=xL(lie((WS(),Ptt),TOe),1983))return t}catch(t){if(!RM(t=H2(t),102))throw Jb(t);e=t,uU((cM(),e))}return new rc}()}function EE(){var e;EE=S,iet=Fet?xL(Pue((WS(),Ptt),TOe),1985):(e=xL(RM(fH((WS(),Ptt),TOe),549)?fH(Ptt,TOe):new zle,549),Fet=!0,function(e){e.q||(e.q=!0,e.p=T2(e,0),e.a=T2(e,1),u0(e.a,0),e.f=T2(e,2),u0(e.f,1),l0(e.f,2),e.n=T2(e,3),l0(e.n,3),l0(e.n,4),l0(e.n,5),l0(e.n,6),e.g=T2(e,4),u0(e.g,7),l0(e.g,8),e.c=T2(e,5),u0(e.c,7),u0(e.c,8),e.i=T2(e,6),u0(e.i,9),u0(e.i,10),u0(e.i,11),u0(e.i,12),l0(e.i,13),e.j=T2(e,7),u0(e.j,9),e.d=T2(e,8),u0(e.d,3),u0(e.d,4),u0(e.d,5),u0(e.d,6),l0(e.d,7),l0(e.d,8),l0(e.d,9),l0(e.d,10),e.b=T2(e,9),l0(e.b,0),l0(e.b,1),e.e=T2(e,10),l0(e.e,1),l0(e.e,2),l0(e.e,3),l0(e.e,4),u0(e.e,5),u0(e.e,6),u0(e.e,7),u0(e.e,8),u0(e.e,9),u0(e.e,10),l0(e.e,11),e.k=T2(e,11),l0(e.k,0),l0(e.k,1),e.o=A2(e,12),e.s=A2(e,13))}(e),function(e){var t,n,r,i,a,o,s;e.r||(e.r=!0,o0(e,"graph"),s0(e,"graph"),c0(e,TOe),r3(e.o,"T"),cK(D$(e.a),e.p),cK(D$(e.f),e.a),cK(D$(e.n),e.f),cK(D$(e.g),e.n),cK(D$(e.c),e.n),cK(D$(e.i),e.c),cK(D$(e.j),e.c),cK(D$(e.d),e.f),cK(D$(e.e),e.a),SV(e.p,Kje,qSe,!0,!0,!1),s=d3(o=z4(e.p,e.p,"setProperty")),t=Az(e.o),n=new Wb,cK((!t.d&&(t.d=new iI(Utt,t,1)),t.d),n),xie(n,r=kz(s)),cie(o,t,AOe),cie(o,t=kz(s),kOe),s=d3(o=z4(e.p,null,"getProperty")),t=Az(e.o),n=kz(s),cK((!t.d&&(t.d=new iI(Utt,t,1)),t.d),n),cie(o,t,AOe),!!(a=mae(o,t=kz(s),null))&&a.Ai(),o=z4(e.p,e.wb.e,"hasProperty"),t=Az(e.o),n=new Wb,cK((!t.d&&(t.d=new iI(Utt,t,1)),t.d),n),cie(o,t,AOe),Xne(o=z4(e.p,e.p,"copyProperties"),e.p,COe),o=z4(e.p,null,"getAllProperties"),t=Az(e.wb.P),n=Az(e.o),cK((!t.d&&(t.d=new iI(Utt,t,1)),t.d),n),r=new Wb,cK((!n.d&&(n.d=new iI(Utt,n,1)),n.d),r),n=Az(e.wb.M),cK((!t.d&&(t.d=new iI(Utt,t,1)),t.d),n),!!(i=mae(o,t,null))&&i.Ai(),SV(e.a,Set,KIe,!0,!1,!0),Gne(xL(FQ(u$(e.a),0),17),e.k,null,MOe,0,-1,Set,!1,!1,!0,!0,!1,!1,!1),SV(e.f,Tet,QIe,!0,!1,!0),Gne(xL(FQ(u$(e.f),0),17),e.g,xL(FQ(u$(e.g),0),17),"labels",0,-1,Tet,!1,!1,!0,!0,!1,!1,!1),v0(xL(FQ(u$(e.f),1),32),e.wb._,IOe,null,0,1,Tet,!1,!1,!0,!1,!0,!1),SV(e.n,Aet,"ElkShape",!0,!1,!0),v0(xL(FQ(u$(e.n),0),32),e.wb.t,OOe,f_e,1,1,Aet,!1,!1,!0,!1,!0,!1),v0(xL(FQ(u$(e.n),1),32),e.wb.t,NOe,f_e,1,1,Aet,!1,!1,!0,!1,!0,!1),v0(xL(FQ(u$(e.n),2),32),e.wb.t,"x",f_e,1,1,Aet,!1,!1,!0,!1,!0,!1),v0(xL(FQ(u$(e.n),3),32),e.wb.t,"y",f_e,1,1,Aet,!1,!1,!0,!1,!0,!1),Xne(o=z4(e.n,null,"setDimensions"),e.wb.t,NOe),Xne(o,e.wb.t,OOe),Xne(o=z4(e.n,null,"setLocation"),e.wb.t,"x"),Xne(o,e.wb.t,"y"),SV(e.g,Pet,iOe,!1,!1,!0),Gne(xL(FQ(u$(e.g),0),17),e.f,xL(FQ(u$(e.f),0),17),ROe,0,1,Pet,!1,!1,!0,!1,!1,!1,!1),v0(xL(FQ(u$(e.g),1),32),e.wb._,POe,"",0,1,Pet,!1,!1,!0,!1,!0,!1),SV(e.c,ket,JIe,!0,!1,!0),Gne(xL(FQ(u$(e.c),0),17),e.d,xL(FQ(u$(e.d),1),17),"outgoingEdges",0,-1,ket,!1,!1,!0,!1,!0,!1,!1),Gne(xL(FQ(u$(e.c),1),17),e.d,xL(FQ(u$(e.d),2),17),"incomingEdges",0,-1,ket,!1,!1,!0,!1,!0,!1,!1),SV(e.i,Let,aOe,!1,!1,!0),Gne(xL(FQ(u$(e.i),0),17),e.j,xL(FQ(u$(e.j),0),17),"ports",0,-1,Let,!1,!1,!0,!0,!1,!1,!1),Gne(xL(FQ(u$(e.i),1),17),e.i,xL(FQ(u$(e.i),2),17),LOe,0,-1,Let,!1,!1,!0,!0,!1,!1,!1),Gne(xL(FQ(u$(e.i),2),17),e.i,xL(FQ(u$(e.i),1),17),ROe,0,1,Let,!1,!1,!0,!1,!1,!1,!1),Gne(xL(FQ(u$(e.i),3),17),e.d,xL(FQ(u$(e.d),0),17),"containedEdges",0,-1,Let,!1,!1,!0,!0,!1,!1,!1),v0(xL(FQ(u$(e.i),4),32),e.wb.e,DOe,null,0,1,Let,!0,!0,!1,!1,!0,!0),SV(e.j,Det,oOe,!1,!1,!0),Gne(xL(FQ(u$(e.j),0),17),e.i,xL(FQ(u$(e.i),0),17),ROe,0,1,Det,!1,!1,!0,!1,!1,!1,!1),SV(e.d,Cet,eOe,!1,!1,!0),Gne(xL(FQ(u$(e.d),0),17),e.i,xL(FQ(u$(e.i),3),17),"containingNode",0,1,Cet,!1,!1,!0,!1,!1,!1,!1),Gne(xL(FQ(u$(e.d),1),17),e.c,xL(FQ(u$(e.c),0),17),FOe,0,-1,Cet,!1,!1,!0,!1,!0,!1,!1),Gne(xL(FQ(u$(e.d),2),17),e.c,xL(FQ(u$(e.c),1),17),UOe,0,-1,Cet,!1,!1,!0,!1,!0,!1,!1),Gne(xL(FQ(u$(e.d),3),17),e.e,xL(FQ(u$(e.e),5),17),jOe,0,-1,Cet,!1,!1,!0,!0,!1,!1,!1),v0(xL(FQ(u$(e.d),4),32),e.wb.e,"hyperedge",null,0,1,Cet,!0,!0,!1,!1,!0,!0),v0(xL(FQ(u$(e.d),5),32),e.wb.e,DOe,null,0,1,Cet,!0,!0,!1,!1,!0,!0),v0(xL(FQ(u$(e.d),6),32),e.wb.e,"selfloop",null,0,1,Cet,!0,!0,!1,!1,!0,!0),v0(xL(FQ(u$(e.d),7),32),e.wb.e,"connected",null,0,1,Cet,!0,!0,!1,!1,!0,!0),SV(e.b,xet,ZIe,!1,!1,!0),v0(xL(FQ(u$(e.b),0),32),e.wb.t,"x",f_e,1,1,xet,!1,!1,!0,!1,!0,!1),v0(xL(FQ(u$(e.b),1),32),e.wb.t,"y",f_e,1,1,xet,!1,!1,!0,!1,!0,!1),Xne(o=z4(e.b,null,"set"),e.wb.t,"x"),Xne(o,e.wb.t,"y"),SV(e.e,Met,tOe,!1,!1,!0),v0(xL(FQ(u$(e.e),0),32),e.wb.t,"startX",null,0,1,Met,!1,!1,!0,!1,!0,!1),v0(xL(FQ(u$(e.e),1),32),e.wb.t,"startY",null,0,1,Met,!1,!1,!0,!1,!0,!1),v0(xL(FQ(u$(e.e),2),32),e.wb.t,"endX",null,0,1,Met,!1,!1,!0,!1,!0,!1),v0(xL(FQ(u$(e.e),3),32),e.wb.t,"endY",null,0,1,Met,!1,!1,!0,!1,!0,!1),Gne(xL(FQ(u$(e.e),4),17),e.b,null,BOe,0,-1,Met,!1,!1,!0,!0,!1,!1,!1),Gne(xL(FQ(u$(e.e),5),17),e.d,xL(FQ(u$(e.d),3),17),ROe,0,1,Met,!1,!1,!0,!1,!1,!1,!1),Gne(xL(FQ(u$(e.e),6),17),e.c,null,zOe,0,1,Met,!1,!1,!0,!1,!0,!1,!1),Gne(xL(FQ(u$(e.e),7),17),e.c,null,$Oe,0,1,Met,!1,!1,!0,!1,!0,!1,!1),Gne(xL(FQ(u$(e.e),8),17),e.e,xL(FQ(u$(e.e),9),17),HOe,0,-1,Met,!1,!1,!0,!1,!0,!1,!1),Gne(xL(FQ(u$(e.e),9),17),e.e,xL(FQ(u$(e.e),8),17),GOe,0,-1,Met,!1,!1,!0,!1,!0,!1,!1),v0(xL(FQ(u$(e.e),10),32),e.wb._,IOe,null,0,1,Met,!1,!1,!0,!1,!0,!1),Xne(o=z4(e.e,null,"setStartLocation"),e.wb.t,"x"),Xne(o,e.wb.t,"y"),Xne(o=z4(e.e,null,"setEndLocation"),e.wb.t,"x"),Xne(o,e.wb.t,"y"),SV(e.k,WLe,"ElkPropertyToValueMapEntry",!1,!1,!1),t=Az(e.o),n=new Wb,cK((!t.d&&(t.d=new iI(Utt,t,1)),t.d),n),xle(xL(FQ(u$(e.k),0),32),t,"key",WLe,!1,!1,!0,!1),v0(xL(FQ(u$(e.k),1),32),e.s,kOe,null,0,1,WLe,!1,!1,!0,!1,!0,!1),iz(e.o,i5e,"IProperty",!0),iz(e.s,LLe,"PropertyValue",!0),$5(e,TOe))}(e),Hne(e),rG(Ptt,TOe,e),e)}function _E(){_E=S,Htt=function(){var e,t;gbe();try{if(t=xL(lie((WS(),Ptt),JRe),1913))return t}catch(t){if(!RM(t=H2(t),102))throw Jb(t);e=t,uU((cM(),e))}return new Uc}()}function SE(){SE=S,irt=function(){var e,t;OK();try{if(t=xL(lie((WS(),Ptt),IPe),1993))return t}catch(t){if(!RM(t=H2(t),102))throw Jb(t);e=t,uU((cM(),e))}return new Ol}()}function xE(){var e;xE=S,art=$rt?xL(Pue((WS(),Ptt),IPe),1917):(cC(rrt,new Gl),cC(Prt,new tu),cC(Lrt,new hu),cC(Drt,new Su),cC(eFe,new ku),cC(ay(xit,1),new Cu),cC(TDe,new Mu),cC(CDe,new Iu),cC(eFe,new Il),cC(eFe,new Ll),cC(eFe,new Dl),cC(ODe,new Fl),cC(eFe,new Ul),cC(zLe,new jl),cC(zLe,new Bl),cC(eFe,new zl),cC(NDe,new $l),cC(eFe,new Hl),cC(eFe,new Vl),cC(eFe,new Wl),cC(eFe,new ql),cC(eFe,new Xl),cC(ay(xit,1),new Yl),cC(eFe,new Kl),cC(eFe,new Zl),cC(zLe,new Ql),cC(zLe,new Jl),cC(eFe,new eu),cC(LDe,new nu),cC(eFe,new ru),cC(zDe,new iu),cC(eFe,new au),cC(eFe,new ou),cC(eFe,new su),cC(eFe,new cu),cC(zLe,new lu),cC(zLe,new uu),cC(eFe,new fu),cC(eFe,new du),cC(eFe,new pu),cC(eFe,new gu),cC(eFe,new bu),cC(eFe,new mu),cC(HDe,new wu),cC(eFe,new vu),cC(eFe,new yu),cC(eFe,new Eu),cC(HDe,new _u),cC(zDe,new xu),cC(eFe,new Tu),cC(LDe,new Au),e=xL(RM(fH((WS(),Ptt),IPe),577)?fH(Ptt,IPe):new RB,577),$rt=!0,function(e){e.N||(e.N=!0,e.b=T2(e,0),l0(e.b,0),l0(e.b,1),l0(e.b,2),e.bb=T2(e,1),l0(e.bb,0),l0(e.bb,1),e.fb=T2(e,2),l0(e.fb,3),l0(e.fb,4),u0(e.fb,5),e.qb=T2(e,3),l0(e.qb,0),u0(e.qb,1),u0(e.qb,2),l0(e.qb,3),l0(e.qb,4),u0(e.qb,5),l0(e.qb,6),e.a=A2(e,4),e.c=A2(e,5),e.d=A2(e,6),e.e=A2(e,7),e.f=A2(e,8),e.g=A2(e,9),e.i=A2(e,10),e.j=A2(e,11),e.k=A2(e,12),e.n=A2(e,13),e.o=A2(e,14),e.p=A2(e,15),e.q=A2(e,16),e.s=A2(e,17),e.r=A2(e,18),e.t=A2(e,19),e.u=A2(e,20),e.v=A2(e,21),e.w=A2(e,22),e.B=A2(e,23),e.A=A2(e,24),e.C=A2(e,25),e.D=A2(e,26),e.F=A2(e,27),e.G=A2(e,28),e.H=A2(e,29),e.J=A2(e,30),e.I=A2(e,31),e.K=A2(e,32),e.M=A2(e,33),e.L=A2(e,34),e.P=A2(e,35),e.Q=A2(e,36),e.R=A2(e,37),e.S=A2(e,38),e.T=A2(e,39),e.U=A2(e,40),e.V=A2(e,41),e.X=A2(e,42),e.W=A2(e,43),e.Y=A2(e,44),e.Z=A2(e,45),e.$=A2(e,46),e._=A2(e,47),e.ab=A2(e,48),e.cb=A2(e,49),e.db=A2(e,50),e.eb=A2(e,51),e.gb=A2(e,52),e.hb=A2(e,53),e.ib=A2(e,54),e.jb=A2(e,55),e.kb=A2(e,56),e.lb=A2(e,57),e.mb=A2(e,58),e.nb=A2(e,59),e.ob=A2(e,60),e.pb=A2(e,61))}(e),function(e){var t;e.O||(e.O=!0,o0(e,"type"),s0(e,"ecore.xml.type"),c0(e,IPe),t=xL(Pue((WS(),Ptt),IPe),1917),cK(D$(e.fb),e.b),SV(e.b,rrt,"AnyType",!1,!1,!0),v0(xL(FQ(u$(e.b),0),32),e.wb.D,$Re,null,0,-1,rrt,!1,!1,!0,!1,!1,!1),v0(xL(FQ(u$(e.b),1),32),e.wb.D,"any",null,0,-1,rrt,!0,!0,!0,!1,!1,!0),v0(xL(FQ(u$(e.b),2),32),e.wb.D,"anyAttribute",null,0,-1,rrt,!1,!1,!0,!1,!1,!1),SV(e.bb,Prt,LPe,!1,!1,!0),v0(xL(FQ(u$(e.bb),0),32),e.gb,"data",null,0,1,Prt,!1,!1,!0,!1,!0,!1),v0(xL(FQ(u$(e.bb),1),32),e.gb,tNe,null,1,1,Prt,!1,!1,!0,!1,!0,!1),SV(e.fb,Lrt,DPe,!1,!1,!0),v0(xL(FQ(u$(e.fb),0),32),t.gb,"rawValue",null,0,1,Lrt,!0,!0,!0,!1,!0,!0),v0(xL(FQ(u$(e.fb),1),32),t.a,kOe,null,0,1,Lrt,!0,!0,!0,!1,!0,!0),Gne(xL(FQ(u$(e.fb),2),17),e.wb.q,null,"instanceType",1,1,Lrt,!1,!1,!0,!1,!1,!1,!1),SV(e.qb,Drt,FPe,!1,!1,!0),v0(xL(FQ(u$(e.qb),0),32),e.wb.D,$Re,null,0,-1,null,!1,!1,!0,!1,!1,!1),Gne(xL(FQ(u$(e.qb),1),17),e.wb.ab,null,"xMLNSPrefixMap",0,-1,null,!0,!1,!0,!0,!1,!1,!1),Gne(xL(FQ(u$(e.qb),2),17),e.wb.ab,null,"xSISchemaLocation",0,-1,null,!0,!1,!0,!0,!1,!1,!1),v0(xL(FQ(u$(e.qb),3),32),e.gb,"cDATA",null,0,-2,null,!0,!0,!0,!1,!1,!0),v0(xL(FQ(u$(e.qb),4),32),e.gb,"comment",null,0,-2,null,!0,!0,!0,!1,!1,!0),Gne(xL(FQ(u$(e.qb),5),17),e.bb,null,lLe,0,-2,null,!0,!0,!0,!0,!1,!1,!0),v0(xL(FQ(u$(e.qb),6),32),e.gb,POe,null,0,-2,null,!0,!0,!0,!1,!1,!0),iz(e.a,LLe,"AnySimpleType",!0),iz(e.c,eFe,"AnyURI",!0),iz(e.d,ay(xit,1),"Base64Binary",!0),iz(e.e,_it,"Boolean",!0),iz(e.f,TDe,"BooleanObject",!0),iz(e.g,xit,"Byte",!0),iz(e.i,CDe,"ByteObject",!0),iz(e.j,eFe,"Date",!0),iz(e.k,eFe,"DateTime",!0),iz(e.n,sFe,"Decimal",!0),iz(e.o,Tit,"Double",!0),iz(e.p,ODe,"DoubleObject",!0),iz(e.q,eFe,"Duration",!0),iz(e.s,zLe,"ENTITIES",!0),iz(e.r,zLe,"ENTITIESBase",!0),iz(e.t,eFe,HPe,!0),iz(e.u,Ait,"Float",!0),iz(e.v,NDe,"FloatObject",!0),iz(e.w,eFe,"GDay",!0),iz(e.B,eFe,"GMonth",!0),iz(e.A,eFe,"GMonthDay",!0),iz(e.C,eFe,"GYear",!0),iz(e.D,eFe,"GYearMonth",!0),iz(e.F,ay(xit,1),"HexBinary",!0),iz(e.G,eFe,"ID",!0),iz(e.H,eFe,"IDREF",!0),iz(e.J,zLe,"IDREFS",!0),iz(e.I,zLe,"IDREFSBase",!0),iz(e.K,Eit,"Int",!0),iz(e.M,hFe,"Integer",!0),iz(e.L,LDe,"IntObject",!0),iz(e.P,eFe,"Language",!0),iz(e.Q,Sit,"Long",!0),iz(e.R,zDe,"LongObject",!0),iz(e.S,eFe,"Name",!0),iz(e.T,eFe,GPe,!0),iz(e.U,hFe,"NegativeInteger",!0),iz(e.V,eFe,eLe,!0),iz(e.X,zLe,"NMTOKENS",!0),iz(e.W,zLe,"NMTOKENSBase",!0),iz(e.Y,hFe,"NonNegativeInteger",!0),iz(e.Z,hFe,"NonPositiveInteger",!0),iz(e.$,eFe,"NormalizedString",!0),iz(e._,eFe,"NOTATION",!0),iz(e.ab,eFe,"PositiveInteger",!0),iz(e.cb,eFe,"QName",!0),iz(e.db,kit,"Short",!0),iz(e.eb,HDe,"ShortObject",!0),iz(e.gb,eFe,cEe,!0),iz(e.hb,eFe,"Time",!0),iz(e.ib,eFe,"Token",!0),iz(e.jb,kit,"UnsignedByte",!0),iz(e.kb,HDe,"UnsignedByteObject",!0),iz(e.lb,Sit,"UnsignedInt",!0),iz(e.mb,zDe,"UnsignedIntObject",!0),iz(e.nb,hFe,"UnsignedLong",!0),iz(e.ob,Eit,"UnsignedShort",!0),iz(e.pb,LDe,"UnsignedShortObject",!0),$5(e,IPe),function(e){Hue(e.a,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"anySimpleType"])),Hue(e.b,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"anyType",GRe,$Re])),Hue(xL(FQ(u$(e.b),0),32),HRe,m3(ay(eFe,1),kye,2,6,[GRe,SPe,aNe,":mixed"])),Hue(xL(FQ(u$(e.b),1),32),HRe,m3(ay(eFe,1),kye,2,6,[GRe,SPe,MPe,OPe,aNe,":1",BPe,"lax"])),Hue(xL(FQ(u$(e.b),2),32),HRe,m3(ay(eFe,1),kye,2,6,[GRe,EPe,MPe,OPe,aNe,":2",BPe,"lax"])),Hue(e.c,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"anyURI",CPe,xPe])),Hue(e.d,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"base64Binary",CPe,xPe])),Hue(e.e,HRe,m3(ay(eFe,1),kye,2,6,[aNe,Yve,CPe,xPe])),Hue(e.f,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"boolean:Object",nPe,Yve])),Hue(e.g,HRe,m3(ay(eFe,1),kye,2,6,[aNe,IRe])),Hue(e.i,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"byte:Object",nPe,IRe])),Hue(e.j,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"date",CPe,xPe])),Hue(e.k,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"dateTime",CPe,xPe])),Hue(e.n,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"decimal",CPe,xPe])),Hue(e.o,HRe,m3(ay(eFe,1),kye,2,6,[aNe,NRe,CPe,xPe])),Hue(e.p,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"double:Object",nPe,NRe])),Hue(e.q,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"duration",CPe,xPe])),Hue(e.s,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"ENTITIES",nPe,zPe,$Pe,"1"])),Hue(e.r,HRe,m3(ay(eFe,1),kye,2,6,[aNe,zPe,TPe,HPe])),Hue(e.t,HRe,m3(ay(eFe,1),kye,2,6,[aNe,HPe,nPe,GPe])),Hue(e.u,HRe,m3(ay(eFe,1),kye,2,6,[aNe,RRe,CPe,xPe])),Hue(e.v,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"float:Object",nPe,RRe])),Hue(e.w,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"gDay",CPe,xPe])),Hue(e.B,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"gMonth",CPe,xPe])),Hue(e.A,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"gMonthDay",CPe,xPe])),Hue(e.C,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"gYear",CPe,xPe])),Hue(e.D,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"gYearMonth",CPe,xPe])),Hue(e.F,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"hexBinary",CPe,xPe])),Hue(e.G,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"ID",nPe,GPe])),Hue(e.H,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"IDREF",nPe,GPe])),Hue(e.J,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"IDREFS",nPe,VPe,$Pe,"1"])),Hue(e.I,HRe,m3(ay(eFe,1),kye,2,6,[aNe,VPe,TPe,"IDREF"])),Hue(e.K,HRe,m3(ay(eFe,1),kye,2,6,[aNe,PRe])),Hue(e.M,HRe,m3(ay(eFe,1),kye,2,6,[aNe,WPe])),Hue(e.L,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"int:Object",nPe,PRe])),Hue(e.P,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"language",nPe,qPe,XPe,YPe])),Hue(e.Q,HRe,m3(ay(eFe,1),kye,2,6,[aNe,LRe])),Hue(e.R,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"long:Object",nPe,LRe])),Hue(e.S,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"Name",nPe,qPe,XPe,KPe])),Hue(e.T,HRe,m3(ay(eFe,1),kye,2,6,[aNe,GPe,nPe,"Name",XPe,ZPe])),Hue(e.U,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"negativeInteger",nPe,QPe,JPe,"-1"])),Hue(e.V,HRe,m3(ay(eFe,1),kye,2,6,[aNe,eLe,nPe,qPe,XPe,"\\c+"])),Hue(e.X,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"NMTOKENS",nPe,tLe,$Pe,"1"])),Hue(e.W,HRe,m3(ay(eFe,1),kye,2,6,[aNe,tLe,TPe,eLe])),Hue(e.Y,HRe,m3(ay(eFe,1),kye,2,6,[aNe,nLe,nPe,WPe,rLe,"0"])),Hue(e.Z,HRe,m3(ay(eFe,1),kye,2,6,[aNe,QPe,nPe,WPe,JPe,"0"])),Hue(e.$,HRe,m3(ay(eFe,1),kye,2,6,[aNe,iLe,nPe,Zve,CPe,"replace"])),Hue(e._,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"NOTATION",CPe,xPe])),Hue(e.ab,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"positiveInteger",nPe,nLe,rLe,"1"])),Hue(e.bb,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"processingInstruction_._type",GRe,"empty"])),Hue(xL(FQ(u$(e.bb),0),32),HRe,m3(ay(eFe,1),kye,2,6,[GRe,yPe,aNe,"data"])),Hue(xL(FQ(u$(e.bb),1),32),HRe,m3(ay(eFe,1),kye,2,6,[GRe,yPe,aNe,tNe])),Hue(e.cb,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"QName",CPe,xPe])),Hue(e.db,HRe,m3(ay(eFe,1),kye,2,6,[aNe,DRe])),Hue(e.eb,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"short:Object",nPe,DRe])),Hue(e.fb,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"simpleAnyType",GRe,vPe])),Hue(xL(FQ(u$(e.fb),0),32),HRe,m3(ay(eFe,1),kye,2,6,[aNe,":3",GRe,vPe])),Hue(xL(FQ(u$(e.fb),1),32),HRe,m3(ay(eFe,1),kye,2,6,[aNe,":4",GRe,vPe])),Hue(xL(FQ(u$(e.fb),2),17),HRe,m3(ay(eFe,1),kye,2,6,[aNe,":5",GRe,vPe])),Hue(e.gb,HRe,m3(ay(eFe,1),kye,2,6,[aNe,Zve,CPe,"preserve"])),Hue(e.hb,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"time",CPe,xPe])),Hue(e.ib,HRe,m3(ay(eFe,1),kye,2,6,[aNe,qPe,nPe,iLe,CPe,xPe])),Hue(e.jb,HRe,m3(ay(eFe,1),kye,2,6,[aNe,aLe,JPe,"255",rLe,"0"])),Hue(e.kb,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"unsignedByte:Object",nPe,aLe])),Hue(e.lb,HRe,m3(ay(eFe,1),kye,2,6,[aNe,oLe,JPe,"4294967295",rLe,"0"])),Hue(e.mb,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"unsignedInt:Object",nPe,oLe])),Hue(e.nb,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"unsignedLong",nPe,nLe,JPe,sLe,rLe,"0"])),Hue(e.ob,HRe,m3(ay(eFe,1),kye,2,6,[aNe,cLe,JPe,"65535",rLe,"0"])),Hue(e.pb,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"unsignedShort:Object",nPe,cLe])),Hue(e.qb,HRe,m3(ay(eFe,1),kye,2,6,[aNe,"",GRe,$Re])),Hue(xL(FQ(u$(e.qb),0),32),HRe,m3(ay(eFe,1),kye,2,6,[GRe,SPe,aNe,":mixed"])),Hue(xL(FQ(u$(e.qb),1),17),HRe,m3(ay(eFe,1),kye,2,6,[GRe,yPe,aNe,"xmlns:prefix"])),Hue(xL(FQ(u$(e.qb),2),17),HRe,m3(ay(eFe,1),kye,2,6,[GRe,yPe,aNe,"xsi:schemaLocation"])),Hue(xL(FQ(u$(e.qb),3),32),HRe,m3(ay(eFe,1),kye,2,6,[GRe,_Pe,aNe,"cDATA",APe,kPe])),Hue(xL(FQ(u$(e.qb),4),32),HRe,m3(ay(eFe,1),kye,2,6,[GRe,_Pe,aNe,"comment",APe,kPe])),Hue(xL(FQ(u$(e.qb),5),17),HRe,m3(ay(eFe,1),kye,2,6,[GRe,_Pe,aNe,lLe,APe,kPe])),Hue(xL(FQ(u$(e.qb),6),32),HRe,m3(ay(eFe,1),kye,2,6,[GRe,_Pe,aNe,POe,APe,kPe]))}(e))}(e),zB((qS(),$tt),e,new Pl),Hne(e),rG(Ptt,IPe,e),e)}function TE(){TE=S,ttt=e1()}function AE(e,t){e.b=0,IJ(e,t)}function kE(e,t){for(;e.sd(t););}function CE(e,t){return q5(e.b,t)}function ME(e,t){return K4(e,t)>0}function IE(e,t){return K4(e,t)<0}function OE(e){return e.l|e.m<<22}function NE(e){return e.e&&e.e()}function RE(e){return e?e.d:null}function PE(e){return e.b!=e.d.c}function LE(e){return CN(e),e.o}function DE(e){return SB(e),e.a}function FE(e,t){return e.a+=t,e}function UE(e,t){return e.a+=t,e}function jE(e,t){return e.a+=t,e}function BE(e,t){return e.a+=t,e}function zE(e,t,n){e.splice(t,n)}function $E(e,t){for(;e.ye(t););}function HE(e,t){return e.d[t.p]}function GE(e){this.a=new nS(e)}function VE(e){this.a=new cU(e)}function WE(){this.a=new Ife(s2e)}function qE(){this.b=new Ife(J1e)}function XE(){this.b=new Ife(B3e)}function YE(){this.b=new Ife(B3e)}function KE(e){this.a=new JE(e)}function ZE(e){this.a=0,this.b=e}function QE(e){Owe(),function(e,t){var n,r,i,a,o,s,c,l;if(n=0,o=0,a=t.length,s=null,l=new hy,o1?uH(uD(t.a[1],32),lH(t.a[0],l_e)):lH(t.a[0],l_e),kV(A6(t.e,n))))}(e,new XC(c));for(e.d=l.a.length,i=0;i0}(xL(e,34))?QI(r,(kee(),t5e))||QI(r,n5e):QI(r,(kee(),t5e));if(RM(e,349))return QI(r,(kee(),J4e));if(RM(e,199))return QI(r,(kee(),r5e));if(RM(e,351))return QI(r,(kee(),e5e))}return!0}(e,t)}function n_(e,t){mI.call(this,e,t)}function r_(e,t){n_.call(this,e,t)}function i_(e,t){this.b=e,this.c=t}function a_(e,t){this.e=e,this.d=t}function o_(e,t){this.a=e,this.b=t}function s_(e,t){this.a=e,this.b=t}function c_(e,t){this.a=e,this.b=t}function l_(e,t){this.a=e,this.b=t}function u_(e,t){this.a=e,this.b=t}function f_(e,t){this.a=e,this.b=t}function h_(e,t){this.a=e,this.b=t}function d_(e,t){this.b=e,this.a=t}function p_(e,t){this.b=e,this.a=t}function g_(e,t){this.b=e,this.a=t}function b_(e,t){this.b=e,this.a=t}function m_(e,t){this.b=e,this.a=t}function w_(e,t){this.a=e,this.b=t}function v_(e,t){this.g=e,this.i=t}function y_(e,t){this.f=e,this.g=t}function E_(e,t){this.a=e,this.b=t}function __(e,t){this.a=e,this.f=t}function S_(e){$M(e.dc()),this.c=e}function x_(e){e.c?Zhe(e):Qhe(e)}function T_(){null==Gve&&(Gve=[])}function A_(e){this.b=xL(cj(e),84)}function k_(e){this.a=xL(cj(e),84)}function C_(e){this.a=xL(cj(e),14)}function M_(e){this.a=xL(cj(e),14)}function I_(e){this.b=xL(cj(e),49)}function O_(e,t){this.b=e,this.c=t}function N_(e,t){this.a=e,this.b=t}function R_(e,t){this.a=e,this.b=t}function P_(e,t){this.a=e,this.b=t}function L_(e,t){return UU(e.b,t)}function D_(e,t){return 0==K4(e,t)}function F_(e,t){return 0!=K4(e,t)}function U_(e,t){return e>t&&t0)){if(a=-1,32==ez(f.c,0)){if(h=u[0],wZ(t,u),u[0]>h)continue}else if(z$(t,f.c,u[0])){u[0]+=f.c.length;continue}return 0}if(a<0&&f.a&&(a=l,o=u[0],i=0),a>=0){if(c=f.b,l==a&&0==(c-=i++))return 0;if(!Bwe(t,u,f,c,s)){l=a-1,u[0]=o;continue}}else if(a=-1,!Bwe(t,u,f,0,s))return 0}return function(e,t){var n,i,a,o,s,c;if(0==e.e&&e.p>0&&(e.p=-(e.p-1)),e.p>iEe&&WW(t,e.p-Tye),s=t.q.getDate(),xH(t,1),e.k>=0&&function(e,t){var n;n=e.q.getHours(),e.q.setMonth(t),Kge(e,n)}(t,e.k),e.c>=0?xH(t,e.c):e.k>=0?(i=35-new Q3(t.q.getFullYear()-Tye,t.q.getMonth(),35).q.getDate(),xH(t,r.Math.min(i,s))):xH(t,s),e.f<0&&(e.f=t.q.getHours()),e.b>0&&e.f<12&&(e.f+=12),function(e,t){e.q.setHours(t),Kge(e,t)}(t,24==e.f&&e.g?0:e.f),e.j>=0&&function(e,t){var n;n=e.q.getHours()+(t/60|0),e.q.setMinutes(t),Kge(e,n)}(t,e.j),e.n>=0&&function(e,t){var n;n=e.q.getHours()+(t/3600|0),e.q.setSeconds(t),Kge(e,n)}(t,e.n),e.i>=0&&Yk(t,T6(A6(_re(e2(t.q.getTime()),Jye),Jye),e.i)),e.a&&(WW(a=new JS,a.q.getFullYear()-Tye-80),IE(e2(t.q.getTime()),e2(a.q.getTime()))&&WW(t,a.q.getFullYear()-Tye+100)),e.d>=0)if(-1==e.c)(n=(7+e.d-t.q.getDay())%7)>3&&(n-=7),c=t.q.getMonth(),xH(t,t.q.getDate()+n),t.q.getMonth()!=c&&xH(t,t.q.getDate()+(n>0?-7:7));else if(t.q.getDay()!=e.d)return!1;return e.o>iEe&&(o=t.q.getTimezoneOffset(),Yk(t,T6(e2(t.q.getTime()),60*(e.o-o)*Jye))),!0}(s,n)?u[0]:0}(e,t,a=new Q3((i=new JS).q.getFullYear()-Tye,i.q.getMonth(),i.q.getDate())),0==n||n0?e:t}function ZC(e){return e.b&&ybe(e),e.a}function QC(e){return e.b&&ybe(e),e.c}function JC(e){e.a=HY(LLe,aye,1,8,5,1)}function eM(e){e.c=HY(LLe,aye,1,0,5,1)}function tM(e){nF.call(this,e,e,e,e)}function nM(e){this.a=e.a,this.b=e.b}function rM(e){return function(e,t){return cj(e),cj(t),new m_(e,t)}(e.b.Ic(),e.a)}function iM(e,t){$N.call(this,e.b,t)}function aM(e,t,n){Gj(e.c[t.g],t.g,n)}function oM(e,t,n){return Gj(e,t,n),n}function sM(){sM=S,nw(),sDe=new Hb}function cM(){cM=S,new lM,new $b}function lM(){new Hb,new Hb,new Hb}function uM(){uM=S,v1e=new B8(Q8e)}function fM(){fM=S,HS(),Ant=met}function hM(){hM=S,r.Math.log(2)}function dM(e){e.j=HY(GDe,kye,308,0,0,1)}function pM(e){this.a=e,bL.call(this,e)}function gM(e){this.a=e,A_.call(this,e)}function bM(e){this.a=e,A_.call(this,e)}function mM(e){Lve(),jb.call(this,e)}function wM(e,t){bF(e.c,e.c.length,t)}function vM(e){return e.at?1:0}function SM(e,t,n){return{l:e,m:t,h:n}}function xM(e,t,n){return l7(t,n,e.c)}function TM(e){vG(e,null),yG(e,null)}function AM(e,t){null!=e.a&&YT(t,e.a)}function kM(e){return new HA(e.a,e.b)}function CM(e){return new HA(e.c,e.d)}function MM(e){return new HA(e.c,e.d)}function IM(e,t){return function(e,t,n){var r,i,a,o,s,c,l,u,f;for(!n&&(n=function(e){var t;return(t=new v).a=e,t.b=function(e){var t;return 0==e?"Etc/GMT":(e<0?(e=-e,t="Etc/GMT-"):t="Etc/GMT+",t+FZ(e))}(e),t.c=HY(eFe,kye,2,2,6,1),t.c[0]=A0(e),t.c[1]=A0(e),t}(t.q.getTimezoneOffset())),i=6e4*(t.q.getTimezoneOffset()-n.a),c=s=new JN(T6(e2(t.q.getTime()),i)),s.q.getTimezoneOffset()!=t.q.getTimezoneOffset()&&(i>0?i-=864e5:i+=864e5,c=new JN(T6(e2(t.q.getTime()),i))),u=new hy,l=e.a.length,a=0;a=97&&r<=122||r>=65&&r<=90){for(o=a+1;o=l)throw Jb(new Rv("Missing trailing '"));o+11)throw Jb(new Rv(RPe));for(u=Kfe(e.e.Og(),t),r=xL(e.g,118),o=0;o8?0:e+1}function ON(e){return XL(null==e||kk(e)),e}function NN(e){return XL(null==e||Ck(e)),e}function RN(e){return XL(null==e||Mk(e)),e}function PN(e,t){return oB(t,xSe),e.f=t,e}function LN(e,t){return xL(LZ(e.b,t),149)}function DN(e,t){return xL(LZ(e.c,t),227)}function FN(e){return xL($D(e.a,e.b),286)}function UN(e){return new HA(e.c,e.d+e.a)}function jN(e){return lG(),CC(xL(e,196))}function BN(e,t,n){++e.j,e.Ci(t,e.ji(t,n))}function zN(e,t,n){++e.j,e.Fi(),zY(e,t,n)}function $N(e,t){mb.call(this,e),this.a=t}function HN(e){n7.call(this,0,0),this.f=e}function GN(e,t,n){return Fpe(e,t,3,n)}function VN(e,t,n){return Fpe(e,t,6,n)}function WN(e,t,n){return Fpe(e,t,9,n)}function qN(e,t,n){e.Xc(t).Rb(n)}function XN(e,t,n){return Sbe(e.c,e.b,t,n)}function YN(e,t){return(t&Jve)%e.d.length}function KN(e,t){this.c=e,yQ.call(this,t)}function ZN(e,t){this.a=e,Cb.call(this,t)}function QN(e,t){this.a=e,Cb.call(this,t)}function JN(e){this.q=new r.Date(kV(e))}function eR(e){this.a=(JJ(e,Yye),new dY(e))}function tR(e){this.a=(JJ(e,Yye),new dY(e))}function nR(e){return s2(function(e){return SM(~e.l&HEe,~e.m&HEe,~e.h&GEe)}(Ik(e)?I2(e):e))}function rR(e){return String.fromCharCode(e)}function iR(e,t,n){return wF(e,xL(t,22),n)}function aR(e,t,n){return e.a+=A7(t,0,n),e}function oR(e,t){var n;return n=e.e,e.e=t,n}function sR(e,t){e[y_e].call(e,t)}function cR(e,t){e.a.Tc(e.b,t),++e.b,e.c=-1}function lR(e,t){return by(new Array(t),e)}function uR(){uR=S,Lje=T8((x7(),C7e))}function fR(e){N2.call(this,e,(CK(),FFe))}function hR(e,t){Mb.call(this,e),this.a=t}function dR(e,t){Mb.call(this,e),this.a=t}function pR(){ER.call(this),this.a=new lE}function gR(){this.d=new lE,this.e=new lE}function bR(){this.n=new lE,this.o=new lE}function mR(){this.b=new lE,this.c=new $b}function wR(){this.a=new $b,this.b=new $b}function vR(){this.a=new ut,this.b=new Im}function yR(){this.a=new Gm,this.c=new Nt}function ER(){this.n=new sw,this.i=new HC}function _R(){this.a=new Yu,this.b=new ra}function SR(){this.b=new Om,this.a=new Om}function xR(){this.a=new $b,this.d=new $b}function TR(){this.b=new qE,this.a=new fo}function AR(){this.b=new Hb,this.a=new Hb}function kR(){kR=S,oUe=new a,sUe=new a}function CR(e){return!e.a&&(e.a=new y),e.a}function MR(e,t){return e.a+=t.a,e.b+=t.b,e}function IR(e,t){return e.a-=t.a,e.b-=t.b,e}function OR(e,t,n){return Fpe(e,t,11,n)}function NR(e,t,n,r){nF.call(this,e,t,n,r)}function RR(e,t,n,r){AU.call(this,e,t,n,r)}function PR(e,t){Sv.call(this,aRe+e+uNe+t)}function LR(e,t){return null==zB(e.a,t,"")}function DR(e){zU(e.e),e.d.b=e.d,e.d.a=e.d}function FR(e){e.b?FR(e.b):e.f.c.xc(e.e,e.d)}function UR(e,t,n,r){AU.call(this,e,t,n,r)}function jR(e,t,n,r){UR.call(this,e,t,n,r)}function BR(e,t,n,r){CU.call(this,e,t,n,r)}function zR(e,t,n,r){CU.call(this,e,t,n,r)}function $R(e,t,n,r){CU.call(this,e,t,n,r)}function HR(e,t,n,r){zR.call(this,e,t,n,r)}function GR(e,t,n,r){zR.call(this,e,t,n,r)}function VR(e,t,n,r){$R.call(this,e,t,n,r)}function WR(e,t,n,r){GR.call(this,e,t,n,r)}function qR(e,t,n,r){MU.call(this,e,t,n,r)}function XR(e,t,n){this.a=e,xO.call(this,t,n)}function YR(e,t,n){this.c=t,this.b=n,this.a=e}function KR(e,t,n){return e.lastIndexOf(t,n)}function ZR(e,t){return e.vj().Ih().Dh(e,t)}function QR(e,t){return e.vj().Ih().Fh(e,t)}function JR(e,t){return sB(e),Ak(e)===Ak(t)}function eP(e,t){return sB(e),Ak(e)===Ak(t)}function tP(e,t){return RE(h7(e.a,t,!1))}function nP(e,t){return RE(d7(e.a,t,!1))}function rP(e,t){return e.b.sd(new wx(e,t))}function iP(e){return e.c?YK(e.c.a,e,0):-1}function aP(e){return e==D9e||e==U9e||e==F9e}function oP(e){this.a=e,Y_(),e2(Date.now())}function sP(e){this.c=e,Xk.call(this,Oye,0)}function cP(e,t){this.c=e,fj.call(this,e,t)}function lP(e,t){vL.call(this,e,e.length,t)}function uP(e,t){if(!e)throw Jb(new Rv(t))}function fP(e){bP(),this.a=(i$(),new dy(e))}function hP(e){YP(),this.d=e,this.a=new zb}function dP(){dP=S,pnt=HY(LLe,aye,1,0,5,1)}function pP(){pP=S,rtt=HY(LLe,aye,1,0,5,1)}function gP(){gP=S,gnt=HY(LLe,aye,1,0,5,1)}function bP(){bP=S,new sm((i$(),i$(),dFe))}function mP(e,t){return!!M4(e,t)}function wP(e,t){return RM(t,14)&&lde(e.c,t)}function vP(e,t,n){return xL(e.c,67).hk(t,n)}function yP(e,t,n){return function(e,t,n){return t.Mk(e.e,e.c,n)}(e,xL(t,330),n)}function EP(e,t,n){return function(e,t,n){var r,i,a;return r=t.Xj(),a=t.bd(),i=r.Vj()?K$(e,4,r,a,null,ebe(e,r,a,RM(r,97)&&0!=(xL(r,17).Bb&i_e)),!0):K$(e,r.Fj()?2:1,r,a,r.uj(),-1,!0),n?n.zi(i):n=i,n}(e,xL(t,330),n)}function _P(e,t){return null==t?null:_5(e.b,t)}function SP(e){return Ck(e)?(sB(e),e):e.ke()}function xP(e){return!isNaN(e)&&!isFinite(e)}function TP(e){VM(this),qz(this),w0(this,e)}function AP(e){eM(this),_L(this.c,0,e.Nc())}function kP(e){HB(e.a),VY(e.c,e.b),e.b=null}function CP(){CP=S,kFe=new $,CFe=new H}function MP(e,t){if(!e)throw Jb(new Rv(t))}function IP(e,t){if(!e)throw Jb(new xv(t))}function OP(e){var t;return(t=new qm).b=e,t}function NP(e){var t;return(t=new Te).e=e,t}function RP(e,t,n){this.d=e,this.b=n,this.a=t}function PP(e,t,n){this.a=e,this.b=t,this.c=n}function LP(e,t,n){this.a=e,this.b=t,this.c=n}function DP(e,t,n){this.a=e,this.b=t,this.c=n}function FP(e,t,n){this.a=e,this.b=t,this.c=n}function UP(e,t,n){this.a=e,this.b=t,this.c=n}function jP(e,t,n){this.a=e,this.b=t,this.c=n}function BP(e,t,n){this.b=e,this.a=t,this.c=n}function zP(e,t,n){this.b=e,this.a=t,this.c=n}function $P(e,t,n){this.b=e,this.c=t,this.a=n}function HP(e,t,n){this.e=t,this.b=e,this.d=n}function GP(e){nF.call(this,e.d,e.c,e.a,e.b)}function VP(e){nF.call(this,e.d,e.c,e.a,e.b)}function WP(e){return!e.e&&(e.e=new $b),e.e}function qP(){qP=S,tGe=new pi,nGe=new gi}function XP(){XP=S,N$e=new In,R$e=new On}function YP(){YP=S,Lwe(),qJe=m7e,XJe=Z9e}function KP(e,t,n){this.a=e,this.b=t,this.c=n}function ZP(e,t,n){this.a=e,this.b=t,this.c=n}function QP(e,t,n){this.a=e,this.b=t,this.c=n}function JP(e,t,n){this.a=e,this.b=t,this.c=n}function eL(e,t,n){this.a=e,this.b=t,this.c=n}function tL(e,t,n){this.e=e,this.a=t,this.c=n}function nL(e,t){this.c=e,this.a=t,this.b=t-e}function rL(e,t,n){fM(),rH.call(this,e,t,n)}function iL(e,t,n){fM(),mB.call(this,e,t,n)}function aL(e,t,n){fM(),iL.call(this,e,t,n)}function oL(e,t,n){fM(),iL.call(this,e,t,n)}function sL(e,t,n){fM(),oL.call(this,e,t,n)}function cL(e,t,n){fM(),mB.call(this,e,t,n)}function lL(e,t,n){fM(),mB.call(this,e,t,n)}function uL(e,t,n){fM(),cL.call(this,e,t,n)}function fL(e,t,n){fM(),lL.call(this,e,t,n)}function hL(e,t){return cj(e),cj(t),new eD(e,t)}function dL(e,t){return cj(e),cj(t),new s_(e,t)}function pL(e){return wO(0!=e.b),UQ(e,e.a.a)}function gL(e){return wO(0!=e.b),UQ(e,e.c.b)}function bL(e){this.d=e,Lh(this),this.b=function(e){return RM(e,14)?xL(e,14).Wc():e.Ic()}(e.d)}function mL(e,t){this.c=e,this.b=t,this.a=!1}function wL(){this.a=";,;",this.b="",this.c=""}function vL(e,t,n){oU.call(this,t,n),this.a=e}function yL(e,t,n){this.b=e,Wk.call(this,t,n)}function EL(e,t,n){this.c=e,tx.call(this,t,n)}function _L(e,t,n){pce(n,0,e,t,n.length,!1)}function SL(e,t){return e.c[e.c.length]=t,!0}function xL(e,t){return XL(null==e||rte(e,t)),e}function TL(e){var t;return PZ(t=new $b,e),t}function AL(e){var t;return d0(t=new iS,e),t}function kL(e){var t;return d0(t=new jm,e),t}function CL(e){var t,n;t=e.b,n=e.c,e.b=n,e.c=t}function ML(e){var t,n;n=e.d,t=e.a,e.d=t,e.a=n}function IL(e,t,n,r,i){e.b=t,e.c=n,e.d=r,e.a=i}function OL(e,t,n,r,i){e.d=t,e.c=n,e.a=r,e.b=i}function NL(e,t,n,r,i){e.c=t,e.d=n,e.b=r,e.a=i}function RL(e,t){return function(e){var t;(t=r.Math.sqrt(e.a*e.a+e.b*e.b))>0&&(e.a/=t,e.b/=t)}(e),e.a*=t,e.b*=t,e}function PL(e){return new HA(e.c+e.b,e.d+e.a)}function LL(e){return null!=e&&!i9(e,_tt,Stt)}function DL(e){return wS(),HY(LLe,aye,1,e,5,1)}function FL(e,t){return(n8(e)<<4|n8(t))&pEe}function UL(e,t){var n;e.n&&(n=t,SL(e.f,n))}function jL(e,t,n){GZ(e,t,new lj(n))}function BL(e,t,n){this.a=e,aC.call(this,t,n)}function zL(e,t,n){this.a=e,aC.call(this,t,n)}function $L(e,t,n){Bx.call(this,e,t),this.b=n}function HL(e,t,n){wk.call(this,e,t),this.c=n}function GL(e,t,n){wk.call(this,e,t),this.c=n}function VL(e){gP(),wc.call(this),this.oh(e)}function WL(){cY(),MB.call(this,(WS(),Ptt))}function qL(){qL=S,i$(),Knt=new Zh(OPe)}function XL(e){if(!e)throw Jb(new Nv(null))}function YL(e){if(e.c.e!=e.a)throw Jb(new Sm)}function KL(e){if(e.e.c!=e.b)throw Jb(new Sm)}function ZL(e){return Lve(),new sF(0,e)}function QL(e){bve(),this.a=new Kv,S2(this,e)}function JL(e){this.b=e,this.a=ZF(this.b.a).Ed()}function eD(e,t){this.b=e,this.a=t,Pu.call(this)}function tD(e,t){this.a=e,this.b=t,Pu.call(this)}function nD(){this.b=Mv(NN(Mee((ehe(),ize))))}function rD(){rD=S,new fte(($w(),HLe),(zw(),$Le))}function iD(){iD=S,RDe=HY(LDe,kye,20,256,0,1)}function aD(e){e.a.b=e.b,e.b.a=e.a,e.a=e.b=null}function oD(e,t){return mq(e,t,e.c.b,e.c),!0}function sD(e,t){return e.g=t<0?-1:t,e}function cD(e,t){oU.call(this,t,1040),this.a=e}function lD(e,t){return s2(Zle(Ik(e)?I2(e):e,t))}function uD(e,t){return s2(_oe(Ik(e)?I2(e):e,t))}function fD(e,t){return s2(function(e,t){var n,r,i,a;return t&=63,n=e.h&GEe,t<22?(a=n>>>t,i=e.m>>t|n<<22-t,r=e.l>>t|e.m<<22-t):t<44?(a=0,i=n>>>t-22,r=e.m>>t-22|e.h<<44-t):(a=0,i=0,r=n>>>t-44),SM(r&HEe,i&HEe,a&GEe)}(Ik(e)?I2(e):e,t))}function hD(e,t){return die(e,new Bx(t.a,t.b))}function dD(e){return 0==e||isNaN(e)?e:e<0?-1:1}function pD(e){return e.b.c.length-e.e.c.length}function gD(e){return e.e.c.length-e.g.c.length}function bD(e){return e.e.c.length+e.g.c.length}function mD(e){var t;return t=e.n,e.a.b+t.d+t.a}function wD(e){var t;return t=e.n,e.e.b+t.d+t.a}function vD(e){var t;return t=e.n,e.e.a+t.b+t.c}function yD(e,t,n){!function(e,t,n,r,i){var a,o,s,c,l,u,f,h,d,p,g,b;null==(p=qj(e.e,r))&&(l=xL(p=new lv,185),c=new lj(t+"_s"+i),GZ(l,qOe,c)),uB(n,d=xL(p,185)),s$(b=new lv,"x",r.j),s$(b,"y",r.k),GZ(d,KOe,b),s$(f=new lv,"x",r.b),s$(f,"y",r.c),GZ(d,"endPoint",f),!e_((!r.a&&(r.a=new iI(xet,r,5)),r.a))&&(a=new ib(u=new dh),Jq((!r.a&&(r.a=new iI(xet,r,5)),r.a),a),GZ(d,BOe,u)),!!Mte(r)&&Tae(e.a,d,$Oe,xse(e,Mte(r))),!!Ite(r)&&Tae(e.a,d,zOe,xse(e,Ite(r))),!(0==(!r.e&&(r.e=new VR(Met,r,10,9)),r.e).i)&&(o=new rk(e,h=new dh),Jq((!r.e&&(r.e=new VR(Met,r,10,9)),r.e),o),GZ(d,GOe,h)),!(0==(!r.g&&(r.g=new VR(Met,r,9,10)),r.g).i)&&(s=new ik(e,g=new dh),Jq((!r.g&&(r.g=new VR(Met,r,9,10)),r.g),s),GZ(d,HOe,g))}(e.a,e.b,e.c,xL(t,201),n)}function ED(e,t,n,r){T1.call(this,e,t,n,r,0,0)}function _D(e,t){Ek.call(this,e,t),this.a=this}function SD(e){gP(),VL.call(this,e),this.a=-1}function xD(e,t){return++e.j,e.Oi(t)}function TD(e,t){var n;return(n=Hj(e,t)).i=2,n}function AD(e,t,n){return e.a=-1,yO(e,t.g,n),e}function kD(e,t,n,r,i,a){return fie(e,t,n,r,i,0,a)}function CD(e,t,n){return new YR(function(e){return 0>=e?new tS:function(e){return 0>e?new tS:new AN(null,new Yq(e+1,e))}(e-1)}(e).Ie(),n,t)}function MD(e){return e.e.Hd().gc()*e.c.Hd().gc()}function ID(e){this.c=e,this.b=this.c.d.tc().Ic()}function OD(e){for(cj(e);e.Ob();)e.Pb(),e.Qb()}function ND(e){kB(),this.a=(i$(),new Zh(cj(e)))}function RD(){IL(this,!1,!1,!1,!1)}function PD(){PD=S,ADe=HY(CDe,kye,215,256,0,1)}function LD(){LD=S,MDe=HY(IDe,kye,172,128,0,1)}function DD(){DD=S,DDe=HY(zDe,kye,162,256,0,1)}function FD(){FD=S,$De=HY(HDe,kye,186,256,0,1)}function UD(e){this.a=new nS(e.gc()),w0(this,e)}function jD(e){cd.call(this,new wq),w0(this,e)}function BD(e){this.c=e,this.a=new rS(this.c.a)}function zD(e){return Ik(e)?0|e:OE(e)}function $D(e,t){return dG(t,e.c.length),e.c[t]}function HD(e,t){return dG(t,e.a.length),e.a[t]}function GD(e,t){return e.a+=A7(t,0,t.length),e}function VD(e,t){return function(e,t){return D7(T6(D7(e.a).a,t.a))}(xL(e,162),xL(t,162))}function WD(e){return e.c-xL($D(e.a,e.b),286).b}function qD(e){return e.q?e.q:(i$(),i$(),pFe)}function XD(e,t){return e?0:r.Math.max(0,t-1)}function YD(e){return e.c?e.c.f:e.e.b}function KD(e){return e.c?e.c.g:e.e.a}function ZD(e,t){return null==e.a&&_de(e),e.a[t]}function QD(e){var t;return(t=wie(e))?QD(t):e}function JD(e,t){wS(),KY.call(this,e),this.a=t}function eF(e,t){fM(),Ib.call(this,t),this.a=e}function tF(e,t,n){this.a=e,iI.call(this,t,n,2)}function nF(e,t,n,r){OL(this,e,t,n,r)}function rF(e){yQ.call(this,e.gc()),Bj(this,e)}function iF(e){this.a=e,this.c=new Hb,function(e){var t,n,r,i;for(r=0,i=(n=e.a).length;r=t)throw Jb(new rw)}function UF(e,t){return function(e){var t;return e.b||function(e,t){e.c=t,e.b=!0}(e,(t=function(e,t){return t.Ch(e.a)}(e.e,e.a),!t||!eP(fIe,G9((!t.b&&(t.b=new rN((Fve(),unt),Dnt,t)),t.b),"qualified")))),e.c}(pZ(e,t))?t.Lh():null}function jF(e,t,n){return Fpe(e,xL(t,48),7,n)}function BF(e,t,n){return Fpe(e,xL(t,48),3,n)}function zF(e,t,n){return e.a=-1,yO(e,t.g+1,n),e}function $F(e,t,n){this.a=e,aI.call(this,t,n,22)}function HF(e,t,n){this.a=e,aI.call(this,t,n,14)}function GF(e,t,n,r){fM(),vV.call(this,e,t,n,r)}function VF(e,t,n,r){fM(),vV.call(this,e,t,n,r)}function WF(e,t,n,r){this.a=e,QX.call(this,e,t,n,r)}function qF(e){QS(),this.a=0,this.b=e-1,this.c=1}function XF(e){return Lve(),new nH(10,e,0)}function YF(e){return e.i||(e.i=e.bc())}function KF(e){return e.c||(e.c=e.Dd())}function ZF(e){return e.c?e.c:e.c=e.Id()}function QF(e){return e.d?e.d:e.d=e.Jd()}function JF(e,t){return cj(t),e.a.Ad(t)&&!e.b.Ad(t)}function eU(e){return null!=e&&BU(e)&&!(e.dm===_)}function tU(e){return!Array.isArray(e)&&e.dm===_}function nU(e){return e.Oc(HY(LLe,aye,1,e.gc(),5,1))}function rU(e,t){return r8((sB(e),e),(sB(t),t))}function iU(e,t){return K4(e,t)<0?-1:K4(e,t)>0?1:0}function aU(e,t){this.e=e,this.d=0!=(64&t)?t|Cye:t}function oU(e,t){this.c=0,this.d=e,this.b=64|t|Cye}function sU(e){this.b=new dY(11),this.a=(a$(),e)}function cU(e){this.b=null,this.a=(a$(),e||mFe)}function lU(e){this.a=(pF(),qLe),this.d=xL(cj(e),49)}function uU(e){e?Ene(e,(Y_(),VDe),""):Y_()}function fU(e){return B0(),0!=xL(e,11).e.c.length}function hU(e){return B0(),0!=xL(e,11).g.c.length}function dU(e,t){return x6(e,(sB(t),new dd(t)))}function pU(e,t){return x6(e,(sB(t),new pd(t)))}function gU(e,t){if(null==e)throw Jb(new Dv(t))}function bU(e){if(!e)throw Jb(new mm);return e.d}function mU(e){return e.e?YX(e.e):null}function wU(e,t,n){return zhe(),X0(e,t)&&X0(e,n)}function vU(e){return lae(),!e.Fc(V9e)&&!e.Fc(q9e)}function yU(e){return new HA(e.c+e.b/2,e.d+e.a/2)}function EU(e){this.a=ute(e.a),this.b=new AP(e.b)}function _U(e){this.b=e,AO.call(this,e),UI(this)}function SU(e){this.b=e,CO.call(this,e),jI(this)}function xU(e,t,n,r,i){aK.call(this,e,t,n,r,i,-1)}function TU(e,t,n,r,i){oK.call(this,e,t,n,r,i,-1)}function AU(e,t,n,r){iI.call(this,e,t,n),this.b=r}function kU(e){ak.call(this,e,!1),this.a=!1}function CU(e,t,n,r){HL.call(this,e,t,n),this.b=r}function MU(e,t,n,r){this.b=e,iI.call(this,t,n,r)}function IU(e,t,n){this.a=e,RR.call(this,t,n,5,6)}function OU(e){e.d||(e.d=e.b.Ic(),e.c=e.b.gc())}function NU(e,t){for(sB(t);e.Ob();)t.td(e.Pb())}function RU(e){var t;for(t=e;t.f;)t=t.f;return t}function PU(e,t){var n;return vX(t,n=e.a.gc()),n-t}function LU(e,t,n,r){var i;(i=e.i).i=t,i.a=n,i.b=r}function DU(e,t){return t.fh()?Q5(e.b,xL(t,48)):t}function FU(e,t){return eP(e.substr(0,t.length),t)}function UU(e,t){return Mk(t)?p$(e,t):!!H$(e.f,t)}function jU(e){return new lU(new xI(e.a.length,e.a))}function BU(e){return typeof e===Xve||typeof e===Qve}function zU(e){e.f=new vC(e),e.g=new yC(e),B$(e)}function $U(e){mO(-1!=e.b),RX(e.c,e.a=e.b),e.b=-1}function HU(e,t){this.b=e,fh.call(this,e.b),this.a=t}function GU(e,t,n){Ghe(),this.e=e,this.d=t,this.a=n}function VU(e){dM(this),this.g=e,Yz(this),this._d()}function WU(e,t){kB(),N_.call(this,e,s6(new Uv(t)))}function qU(e,t){return Lve(),new wB(e,t,0)}function XU(e,t){return Lve(),new wB(6,e,t)}function YU(e,t,n,r){f5(t,n,e.length),function(e,t,n,r){var i;for(i=t;ie||e>t)throw Jb(new oy("fromIndex: 0, toIndex: "+e+k_e+t))}(t,e.length),new cD(e,t)}(e,e.length))}function sj(e){e.a=null,e.e=null,zU(e.b),e.d=0,++e.c}function cj(e){if(null==e)throw Jb(new Em);return e}function lj(e){if(null==e)throw Jb(new Em);this.a=e}function uj(e,t){jb.call(this,1),this.a=e,this.b=t}function fj(e,t){this.d=e,gI.call(this,e),this.e=t}function hj(e,t,n){this.c=e,this.a=t,i$(),this.b=n}function dj(e){this.d=(sB(e),e),this.a=0,this.c=Oye}function pj(e,t){mq(e.d,t,e.b.b,e.b),++e.a,e.c=null}function gj(e,t){return null==t4(e.a,t,(pO(),EDe))}function bj(e,t){OM(e,RM(t,152)?t:xL(t,1909).bl())}function mj(e,t){aS(uz(e.Mc(),new Pi),new jp(t))}function wj(e,t){return e.c?wj(e.c,t):SL(e.b,t),e}function vj(e,t,n){var r;return r=jZ(e,t),KW(e,t,n),r}function yj(e,t){return EK(e.slice(0,t),e)}function Ej(e,t,n){var r;for(r=0;r=14&&n<=16);case 11:return null!=t&&typeof t===Qve;case 12:return null!=t&&(typeof t===Xve||typeof t==Qve);case 0:return rte(t,e.__elementTypeId$);case 2:return BU(t)&&!(t.dm===_);case 1:return BU(t)&&!(t.dm===_)||rte(t,e.__elementTypeId$);default:return!0}}(e,n)),e[t]=n}function Vj(e,t){return e.a+=String.fromCharCode(t),e}function Wj(e,t){return e.a+=String.fromCharCode(t),e}function qj(e,t){return Mk(t)?fH(e,t):Tk(H$(e.f,t))}function Xj(e,t){for(sB(t);e.c=e.g}function Jj(e,t,n){return Rde(e,Q1(e,t,n))}function eB(e){gR.call(this),this.a=new lE,this.c=e}function tB(e){this.b=new $b,this.a=new $b,this.c=e}function nB(e){this.a=new $b,this.c=new $b,this.e=e}function rB(e){this.c=new lE,this.a=new $b,this.b=e}function iB(e){this.c=e,this.a=new iS,this.b=new iS}function aB(e){nw(),this.b=new $b,this.a=e,function(e,t){var n,r,i,a,o;for(n=new hy,o=!1,a=0;a0?(Gee(e,n,0),n.a+=String.fromCharCode(r),Gee(e,n,i=j7(t,a)),a+=i-1):39==r?a+10;)e=e<<1|(e<0?1:0);return e}function ZB(e,t){return Ak(e)===Ak(t)||null!=e&&C6(e,t)}function QB(e,t){return TF(e.a,t)?e.b[xL(t,22).g]:null}function JB(e){return String.fromCharCode.apply(null,e)}function ez(e,t){return pG(t,e.length),e.charCodeAt(t)}function tz(e,t){e.t.Fc((lae(),V9e))&&function(e,t){var n,i,a,o;for(n=(o=xL(QB(e.b,t),121)).a,a=xL(xL(MX(e.r,t),21),81).Ic();a.Ob();)(i=xL(a.Pb(),110)).c&&(n.a=r.Math.max(n.a,vD(i.c)));if(n.a>0)switch(t.g){case 2:o.n.c=e.s;break;case 4:o.n.b=e.s}}(e,t),function(e,t){var n;e.B&&((n=xL(QB(e.b,t),121).n).d=e.B.d,n.a=e.B.a)}(e,t)}function nz(e){return!e.n&&(e.n=new AU(Pet,e,1,7)),e.n}function rz(e){return!e.c&&(e.c=new AU(Det,e,9,9)),e.c}function iz(e,t,n,r){return W0(e,t,n,!1),j6(e,r),e}function az(e,t){M8(e,Mv(PJ(t,"x")),Mv(PJ(t,"y")))}function oz(e,t){M8(e,Mv(PJ(t,"x")),Mv(PJ(t,"y")))}function sz(e){return i$(),e?e.ve():(a$(),a$(),vFe)}function cz(){cz=S,VLe=new ov(m3(ay(WLe,1),jye,43,0,[]))}function lz(e,t){return l8(e),new JD(e,new _K(t,e.a))}function uz(e,t){return l8(e),new JD(e,new HX(t,e.a))}function fz(e,t){return l8(e),new TN(e,new $X(t,e.a))}function hz(e,t){return l8(e),new AN(e,new zX(t,e.a))}function dz(e,t,n){!function(e,t){var n,r,i,a,o,s;a=!e.A.Fc((Tpe(),O7e)),o=e.A.Fc(P7e),e.a=new t7(o,a,e.c),!!e.n&&Xz(e.a.n,e.n),pv(e.g,(NQ(),XUe),e.a),t||((r=new tee(1,a,e.c)).n.a=e.k,wF(e.p,(Lwe(),Q9e),r),(i=new tee(1,a,e.c)).n.d=e.k,wF(e.p,g7e,i),(s=new tee(0,a,e.c)).n.c=e.k,wF(e.p,m7e,s),(n=new tee(0,a,e.c)).n.b=e.k,wF(e.p,Z9e,n))}(e,t),jQ(e.e.uf(),new $P(e,t,n))}function pz(e,t){this.b=e,this.c=t,this.a=new rS(this.b)}function gz(e,t,n){this.a=hEe,this.d=e,this.b=t,this.c=n}function bz(e,t){this.d=(sB(e),e),this.a=16449,this.c=t}function mz(e,t,n,r){y_.call(this,e,t),this.a=n,this.b=r}function wz(e,t,n,r){this.a=e,this.e=t,this.d=n,this.c=r}function vz(e,t,n,r){this.a=e,this.c=t,this.b=n,this.d=r}function yz(e,t,n,r){this.c=e,this.b=t,this.a=n,this.d=r}function Ez(e,t,n,r){this.c=e,this.b=t,this.d=n,this.a=r}function _z(e,t,n,r){this.a=e,this.d=t,this.c=n,this.b=r}function Sz(e,t,n,r){this.c=e,this.d=t,this.b=n,this.a=r}function xz(e){this.a=new $b,this.e=HY(Eit,kye,47,e,0,2)}function Tz(e){var t;for(t=e.Ic();t.Ob();)t.Pb(),t.Qb()}function Az(e){var t;return XQ(t=new Wb,e),t}function kz(e){var t;return Qae(t=new Wb,e),t}function Cz(e){var t;return t=function(e){var t;return RM(t=Hae(e,(Nve(),QWe)),160)?T9(xL(t,160)):null}(e),t||null}function Mz(e,t){var n,r;return(n=e/t)>(r=dH(n))&&++r,r}function Iz(e,t,n){var r;return r=jwe(e),t.Fh(n,r)}function Oz(e){return e.e==NPe&&function(e,t){e.e=t}(e,function(e,t){var n,r;return(n=t.Ch(e.a))&&null!=(r=RN(G9((!n.b&&(n.b=new rN((Fve(),unt),Dnt,n)),n.b),aNe)))?r:t.ne()}(e.g,e.b)),e.e}function Nz(e){return e.f==NPe&&function(e,t){e.f=t}(e,function(e,t){var n,r;return(n=t.Ch(e.a))?(r=RN(G9((!n.b&&(n.b=new rN((Fve(),unt),Dnt,n)),n.b),APe)),eP(kPe,r)?UF(e,WQ(t.Cj())):r):null}(e.g,e.b)),e.f}function Rz(e){return!e.b&&(e.b=new AU(Cet,e,12,3)),e.b}function Pz(e){if(e9(e.d),e.d.d!=e.c)throw Jb(new Sm)}function Lz(e){return XL(null==e||BU(e)&&!(e.dm===_)),e}function Dz(e,t){if(null==e)throw Jb(new Dv(t));return e}function Fz(e,t){this.a=e,xN.call(this,e,xL(e.d,14).Xc(t))}function Uz(e,t,n,r){this.a=e,this.c=t,this.d=n,this.b=r}function jz(e,t,n,r){this.a=e,this.c=t,this.d=n,this.b=r}function Bz(e,t,n,r){this.a=e,this.b=t,this.c=n,this.d=r}function zz(e,t,n,r){this.a=e,this.b=t,this.c=n,this.d=r}function $z(e,t,n,r){this.e=e,this.a=t,this.c=n,this.d=r}function Hz(e,t,n,r){fM(),TX.call(this,t,n,r),this.a=e}function Gz(e,t,n,r){fM(),TX.call(this,t,n,r),this.a=e}function Vz(e,t,n,r){this.b=e,this.c=r,Xk.call(this,t,n)}function Wz(e){this.f=e,this.c=this.f.e,e.f>0&&$re(this)}function qz(e){e.a.a=e.c,e.c.b=e.a,e.a.b=e.c.a=null,e.b=0}function Xz(e,t){return e.b=t.b,e.c=t.c,e.d=t.d,e.a=t.a,e}function Yz(e){return e.n&&(e.e!==aEe&&e._d(),e.j=null),e}function Kz(e){return wO(e.b0?(r.Error.stackTraceLimit=Error.stackTraceLimit=64,1):"stack"in new Error),e=new f,oDe=t?new d:e}function m$(e){Ry(),r.setTimeout((function(){throw e}),0)}function w$(e){this.b=e,this.c=e,e.e=null,e.c=null,this.a=1}function v$(e){this.b=e,this.a=new VE(xL(cj(new Qe),62))}function y$(e){this.c=e,this.b=new VE(xL(cj(new ge),62))}function E$(e){this.c=e,this.b=new VE(xL(cj(new Tt),62))}function _$(){this.a=new mw,this.b=(JJ(3,Yye),new dY(3))}function S$(e){return e&&e.hashCode?e.hashCode():eO(e)}function x$(e,t){var n;return(n=YM(e.a,t))&&(t.d=null),n}function T$(e,t){return e.a=OO(e.a,0,t)+""+Pk(e.a,t+1),e}function A$(e,t,n){return!!e.f&&e.f.Ne(t,n)}function k$(e,t,n,r,i,a){oK.call(this,e,t,n,r,i,a?-2:-1)}function C$(e,t,n,r){wk.call(this,t,n),this.b=e,this.a=r}function M$(e,t){Uw.call(this,new cU(e)),this.a=e,this.b=t}function I$(e){this.c=e.c,this.d=e.d,this.b=e.b,this.a=e.a}function O$(e,t){this.g=e,this.d=m3(ay(b$e,1),gTe,10,0,[t])}function N$(e,t,n,r,i,a){this.a=e,o1.call(this,t,n,r,i,a)}function R$(e,t,n,r,i,a){this.a=e,o1.call(this,t,n,r,i,a)}function P$(e,t){this.e=e,this.a=LLe,this.b=Ode(t),this.c=t}function L$(){this.b=new Om,this.d=new iS,this.e=new iw}function D$(e){return e.u||(yX(e),e.u=new ZN(e,e)),e.u}function F$(e){return xL(k2(e,16),26)||e.uh()}function U$(e,t){var n;return n=LE(e.bm),null==t?n:n+": "+t}function j$(e,t){var n;return fq(n=e.b.Oc(t),e.b.gc()),n}function B$(e){var t,n;t=0|(n=e).$modCount,n.$modCount=t+1}function z$(e,t,n){return n>=0&&eP(e.substr(n,t.length),t)}function $$(e,t){return RM(t,146)&&eP(e.b,xL(t,146).og())}function H$(e,t){return T5(e,t,function(e,t){var n;return null==(n=e.a.get(t))?new Array:n}(e,null==t?0:e.b.se(t)))}function G$(e,t){Dbe(e,xL(gue(t,(wN(),J0e)),34))}function V$(e,t){!function(e,t){e.a=t}(this,new HA(e.a,e.b)),function(e,t){e.b=t}(this,AL(t))}function W$(){W$=S,H1e=new QT(_Se,0),G1e=new QT(SSe,1)}function q$(){q$=S,f1e=new VT(SSe,0),u1e=new VT(_Se,1)}function X$(e,t,n,r){Gj(e.c[t.g],n.g,r),Gj(e.c[n.g],t.g,r)}function Y$(e,t,n,r){Gj(e.c[t.g],t.g,n),Gj(e.b[t.g],t.g,r)}function K$(e,t,n,r,i,a,o){return new oq(e.e,t,n,r,i,a,o)}function Z$(e,t,n,r){return n>=0?e.eh(t,n,r):e.Ng(null,n,r)}function Q$(e){return 0==e.b.b?e.a._e():pL(e.b)}function J$(e){return Ak(e.a)===Ak((z0(),wnt))&&function(e){var t,n,r,i,a,o,s,c,l,u;for(t=new yc,n=new yc,l=eP($Re,(i=$pe(e.b,HRe))?RN(G9((!i.b&&(i.b=new rN((Fve(),unt),Dnt,i)),i.b),GRe)):null),c=0;c=0?e.nh(r,n):tfe(e,t,n)}function wH(e,t,n,r){var i;i=new pR,t.a[n.g]=i,wF(e.b,r,i)}function vH(e,t,n){this.c=new $b,this.e=e,this.f=t,this.b=n}function yH(e,t,n){this.i=new $b,this.b=e,this.g=t,this.a=n}function EH(e){ER.call(this),ZQ(this),this.a=e,this.c=!0}function _H(e,t,n){hG(),e&&zB(ett,e,t),e&&zB(Jet,e,n)}function SH(e,t){var n;for(cj(t),n=e.a;n;n=n.c)t.Od(n.g,n.i)}function xH(e,t){var n;n=e.q.getHours(),e.q.setDate(t),Kge(e,n)}function TH(e){var t;return e4(t=new GE(vQ(e.length)),e),t}function AH(e){return e.Db>>16!=3?null:xL(e.Cb,34)}function kH(e){return e.Db>>16!=9?null:xL(e.Cb,34)}function CH(e){return e.Db>>16!=6?null:xL(e.Cb,80)}function MH(e,t){if(e<0||e>t)throw Jb(new Sv(j_e+e+B_e+t))}function IH(e,t){return s2(function(e,t){return SM(e.l^t.l,e.m^t.m,e.h^t.h)}(Ik(e)?I2(e):e,Ik(t)?I2(t):t))}function OH(e,t){return r.Math.abs(e)=0?e.gh(n):Vce(e,t)}function jH(e){return e.Db>>16!=7?null:xL(e.Cb,234)}function BH(e){return e.Db>>16!=7?null:xL(e.Cb,160)}function zH(e){return e.Db>>16!=3?null:xL(e.Cb,147)}function $H(e){return e.Db>>16!=11?null:xL(e.Cb,34)}function HH(e){return e.Db>>16!=17?null:xL(e.Cb,26)}function GH(e){return e.Db>>16!=6?null:xL(e.Cb,234)}function VH(e,t){var n=e.a=e.a||[];return n[t]||(n[t]=e.le(t))}function WH(e,t,n,r,i,a){return new fZ(e.e,t,e.Xi(),n,r,i,a)}function qH(e){this.a=e,this.b=HY(YJe,kye,1916,e.e.length,0,2)}function XH(){this.a=new zC,this.e=new Om,this.g=0,this.i=0}function YH(e,t){dM(this),this.f=t,this.g=e,Yz(this),this._d()}function KH(e){return GM(e.c),e.e=e.a=e.c,e.c=e.c.c,++e.d,e.a.f}function ZH(e){return GM(e.e),e.c=e.a=e.e,e.e=e.e.e,--e.d,e.a.f}function QH(e,t,n){return e.a=OO(e.a,0,t)+""+n+Pk(e.a,t),e}function JH(e,t,n){return SL(e.a,(cz(),hte(t,n),new v_(t,n))),e}function eG(e,t,n){this.a=t,this.c=e,this.b=(cj(n),new AP(n))}function tG(e,t){this.a=e,this.c=kM(this.a),this.b=new I$(t)}function nG(e,t,n){this.a=t,this.c=e,this.b=(cj(n),new AP(n))}function rG(e,t,n){return null==t?tce(e.f,null,n):O8(e.g,t,n)}function iG(e,t){return AF(e.a,t)?QU(e,xL(t,22).g,null):null}function aG(){aG=S,ZLe=E5((Zw(),m3(ay(QLe,1),Kye,532,0,[YLe])))}function oG(){oG=S,MJe=zF(new nW,(Gae(),Pze),(Pve(),MHe))}function sG(){sG=S,IJe=zF(new nW,(Gae(),Pze),(Pve(),MHe))}function cG(){cG=S,t1e=AD(new nW,(Gae(),Pze),(Pve(),tHe))}function lG(){lG=S,o1e=AD(new nW,(Gae(),Pze),(Pve(),tHe))}function uG(){uG=S,l1e=AD(new nW,(Gae(),Pze),(Pve(),tHe))}function fG(){fG=S,w1e=AD(new nW,(Gae(),Pze),(Pve(),tHe))}function hG(){var e,t;hG=S,ett=new Hb,Jet=new Hb,e=SFe,t=new lc,e&&zB(Jet,e,t)}function dG(e,t){if(e<0||e>=t)throw Jb(new Sv(j_e+e+B_e+t))}function pG(e,t){if(e<0||e>=t)throw Jb(new sy(j_e+e+B_e+t))}function gG(e,t){e.d&&KK(e.d.e,e),e.d=t,e.d&&SL(e.d.e,e)}function bG(e,t){e.c&&KK(e.c.g,e),e.c=t,e.c&&SL(e.c.g,e)}function mG(e,t){e.c&&KK(e.c.a,e),e.c=t,e.c&&SL(e.c.a,e)}function wG(e,t){e.i&&KK(e.i.j,e),e.i=t,e.i&&SL(e.i.j,e)}function vG(e,t){e.a&&KK(e.a.k,e),e.a=t,e.a&&SL(e.a.k,e)}function yG(e,t){e.b&&KK(e.b.f,e),e.b=t,e.b&&SL(e.b.f,e)}function EG(e,t){!function(e,t,n){xL(t.b,63),jQ(t.a,new ZP(e,n,t))}(e,e.b,e.c),xL(e.b.b,63),t&&xL(t.b,63).b}function _G(e,t){var n;return n=new rB(e),t.c[t.c.length]=n,n}function SG(e){this.c=new iS,this.b=e.b,this.d=e.c,this.a=e.a}function xG(e){this.a=r.Math.cos(e),this.b=r.Math.sin(e)}function TG(e,t,n,r){this.c=e,this.d=r,vG(this,t),yG(this,n)}function AG(e,t){RM(e.Cb,87)&&cce(yX(xL(e.Cb,87)),4),o0(e,t)}function kG(e,t){RM(e.Cb,179)&&(xL(e.Cb,179).tb=null),o0(e,t)}function CG(e){var t;return _E(),XQ(t=new Wb,e),t}function MG(e){var t;return _E(),XQ(t=new Wb,e),t}function IG(e){for(var t;;)if(t=e.Pb(),!e.Ob())return t}function OG(){OG=S,Y0e=zF(new nW,(rre(),K1e),(kse(),t0e))}function NG(e){return l8(e),a$(),a$(),MQ(e,wFe)}function RG(e,t,n){var r;i6(t,n,e.c.length),r=n-t,zE(e.c,t,r)}function PG(e,t,n){i6(t,n,e.gc()),this.c=e,this.a=t,this.b=n-t}function LG(e,t){this.b=(sB(e),e),this.a=0==(t&n_e)?64|t|Cye:t}function DG(e,t){if(ZU(e.a,t),t.d)throw Jb(new sv(W_e));t.d=e}function FG(e,t){jw.call(this,new nS(vQ(e))),JJ(t,Aye),this.a=t}function UG(e,t){return YS(),RZ(t)?new _D(t,e):new Ek(t,e)}function jG(e){return u4(m3(ay(v5e,1),kye,8,0,[e.i.n,e.n,e.a]))}function BG(e,t,n){var r;(r=new to).b=t,r.a=n,++t.b,SL(e.d,r)}function zG(e){return e.d==(cY(),Vnt)&&function(e,t){e.d=t}(e,function(e,t){var n,r,i,a,o,s;if((n=t.Ch(e.a))&&null!=(s=RN(G9((!n.b&&(n.b=new rN((Fve(),unt),Dnt,n)),n.b),iNe))))switch(i=KI(s,_ae(35)),r=t.Cj(),-1==i?(o=UF(e,WQ(r)),a=s):0==i?(o=null,a=s.substr(1)):(o=s.substr(0,i),a=s.substr(i+1)),UB(gZ(e,t))){case 2:case 3:return function(e,t,n,r){var i;return(i=xue(e,t,n,r))||(i=function(e,t,n){var r,i;return(i=Pue(e.b,t))&&(r=xL(Wbe(pZ(e,i),""),26))?xue(e,r,t,n):null}(e,n,r),!i||_me(e,t,i))?i:null}(e,r,o,a);case 0:case 4:case 5:case 6:return function(e,t,n,r){var i;return(i=Tue(e,t,n,r))||!(i=X6(e,n,r))||_me(e,t,i)?i:null}(e,r,o,a)}return null}(e.g,e.b)),e.d}function $G(e){return e.a==(cY(),Vnt)&&function(e,t){e.a=t}(e,function(e,t){var n,r,i;return(n=t.Ch(e.a))&&null!=(i=RN(G9((!n.b&&(n.b=new rN((Fve(),unt),Dnt,n)),n.b),"affiliation")))?-1==(r=KI(i,_ae(35)))?X6(e,UF(e,WQ(t.Cj())),i):0==r?X6(e,null,i.substr(1)):X6(e,i.substr(0,r),i.substr(r+1)):null}(e.g,e.b)),e.a}function HG(e,t){SL(e.a,t),e.b=r.Math.max(e.b,t.d),e.d+=t.r}function GG(e){JC(this),Mm(this.a,H3(r.Math.max(8,e))<<1)}function VG(e){Lve(),jb.call(this,e),this.c=!1,this.a=!1}function WG(e,t,n){jb.call(this,25),this.b=e,this.a=t,this.c=n}function qG(e,t){var n,r;return r=PU(e,t),n=e.a.Xc(r),new O_(e,n)}function XG(e,t){e.b=e.b|t.b,e.c=e.c|t.c,e.d=e.d|t.d,e.a=e.a|t.a}function YG(e){return cj(e),RM(e,15)?new AP(xL(e,15)):TL(e.Ic())}function KG(e,t){return e&&e.equals?e.equals(t):Ak(e)===Ak(t)}function ZG(e){return new dY((JJ(e,Qye),UZ(T6(T6(5,e),e/10|0))))}function QG(e){return null==e.c||0==e.c.length?"n_"+e.b:"n_"+e.c}function JG(e){return null==e.c||0==e.c.length?"n_"+e.g:"n_"+e.c}function eV(e,t){var n;for(n=e+"";n.length=t)throw Jb(new Sv(function(e,t){if(e<0)return Nde(iye,m3(ay(LLe,1),aye,1,5,["index",G6(e)]));if(t<0)throw Jb(new Rv(oye+t));return Nde("%s (%s) must be less than size (%s)",m3(ay(LLe,1),aye,1,5,["index",G6(e),G6(t)]))}(e,t)));return e}function AV(e,t,n){if(e<0||tn)throw Jb(new Sv(function(e,t,n){return e<0||e>n?Vse(e,n,"start index"):t<0||t>n?Vse(t,n,"end index"):Nde("end index (%s) must not be less than start index (%s)",m3(ay(LLe,1),aye,1,5,[G6(t),G6(e)]))}(e,t,n)))}function kV(e){var t;return Ik(e)?-0==(t=e)?0:t:function(e){return Cre(e,(RQ(),yDe))<0?-function(e){return e.l+e.m*WEe+e.h*qEe}(G3(e)):e.l+e.m*WEe+e.h*qEe}(e)}function CV(e){return wO(e.b.b!=e.d.a),e.c=e.b=e.b.b,--e.a,e.c.c}function MV(e,t){var n;return n=1-t,e.a[n]=z1(e.a[n],n),z1(e,t)}function IV(e,t,n){cj(e),function(e){var t,n,r;for(i$(),wM(e.c,e.a),r=new td(e.c);r.a0&&0==e.a[--e.d];);0==e.a[e.d++]&&(e.e=0)}function FV(e,t){this.a=e,Dh.call(this,e),MH(t,e.gc()),this.b=t}function UV(e,t){var n;e.e=new Xw,wM(n=jhe(t),e.c),qhe(e,n,0)}function jV(e,t,n,r){var i;(i=new gs).a=t,i.b=n,i.c=r,oD(e.a,i)}function BV(e,t,n,r){var i;(i=new gs).a=t,i.b=n,i.c=r,oD(e.b,i)}function zV(e){return kS(),RM(e.g,10)?xL(e.g,10):null}function $V(e,t){return!!RM(t,43)&&lne(e.a,xL(t,43))}function HV(e,t){return!!RM(t,43)&&lne(e.a,xL(t,43))}function GV(e,t){return!!RM(t,43)&&lne(e.a,xL(t,43))}function VV(e){var t;return SB(e),t=new C,$E(e.a,new xd(t)),t}function WV(e){var t,n;return n=Ape(t=new Cj,e),function(e){var t,n,r,i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v,y,E,_;for(f=new yB(new ld(e));f.b!=f.c.a.d;)for(s=xL((u=eK(f)).d,55),t=xL(u.e,55),g=0,y=(null==(o=s.Og()).i&&Oge(o),o.i).length;g=0&&g0}function pW(e){return RM(e,15)?xL(e,15).dc():!e.Ic().Ob()}function gW(e){var t;for(t=0;e.Ob();)e.Pb(),t=T6(t,1);return UZ(t)}function bW(e){var t;t=e.Rg(),this.a=RM(t,67)?xL(t,67).Uh():t.Ic()}function mW(e){return new LG(e.g||(e.g=new Ff(e)),17)}function wW(e,t,n,r){return RM(n,53)?new MO(e,t,n,r):new WF(e,t,n,r)}function vW(e){rae(),QM(this,zD(lH(lD(e,24),A_e)),zD(lH(e,A_e)))}function yW(e,t){sB(t),e.b=e.b-1&e.a.length-1,Gj(e.a,e.b,t),Dne(e)}function EW(e,t){sB(t),Gj(e.a,e.c,t),e.c=e.c+1&e.a.length-1,Dne(e)}function _W(e){return wO(e.b!=e.d.c),e.c=e.b,e.b=e.b.a,++e.a,e.c.c}function SW(e){return kS(),RM(e.g,145)?xL(e.g,145):null}function xW(e,t){return xL(nO(dU(xL(MX(e.k,t),14).Mc(),DGe)),112)}function TW(e,t){return xL(nO(pU(xL(MX(e.k,t),14).Mc(),DGe)),112)}function AW(e,t,n,r){var i;return i=r[t.g][n.g],Mv(NN(Hae(e.a,i)))}function kW(e,t){var n;for(n=e.j.c.length;n0&&Abe(e.g,0,t,0,e.i),t}function zW(e,t,n){var r;return r=S7(n),zB(e.b,r,t),zB(e.c,t,n),t}function $W(e,t){var n;for(n=t;n;)XO(e,n.i,n.j),n=$H(n);return e}function HW(e,t){var n;return n=new hy,e.xd(n),n.a+="..",t.yd(n),n.a}function GW(e,t){var n;return YS(),function(e,t){var n;if(null!=t&&!e.c.Tj().rj(t))throw n=RM(t,55)?xL(t,55).Og().zb:LE(D4(t)),Jb(new Nv(lOe+e.c.ne()+"'s type '"+e.c.Tj().ne()+"' does not permit a value of type '"+n+"'"))}(n=xL(e,65).Hj(),t),n.Jk(t)}function VW(e,t,n){e.i=0,e.e=0,t!=n&&(O4(e,t,n),I4(e,t,n))}function WW(e,t){var n;n=e.q.getHours(),e.q.setFullYear(t+Tye),Kge(e,n)}function qW(e,t){var n;return n=g$(TL(new XK(e,t))),OD(new XK(e,t)),n}function XW(e){return e.n||(yX(e),e.n=new $F(e,Utt,e),D$(e)),e.n}function YW(e){if(e<0)throw Jb(new Lv("Negative array size: "+e))}function KW(e,t,n){if(n){var r=n.ee();n=r(n)}else n=void 0;e.a[t]=n}function ZW(e,t){var n;return d4(),0!=(n=e.j.g-t.j.g)?n:0}function QW(e){return wO(e.a"+QG(e.d):"e_"+eO(e)}function gq(e,t){return e==(yoe(),p$e)&&t==p$e?4:e==p$e||t==p$e?8:32}function bq(e,t){return t.b.Kb(hZ(e,t.c.Ee(),new Md(t)))}function mq(e,t,n,r){var i;(i=new z).c=t,i.b=n,i.a=r,r.b=n.a=i,++e.b}function wq(){Hb.call(this),QO(this),this.d.b=this.d,this.d.a=this.d}function vq(e){this.d=e,this.b=this.d.a.entries(),this.a=this.b.next()}function yq(e){if(!e.c.Sb())throw Jb(new mm);return e.a=!0,e.c.Ub()}function Eq(e,t){return sB(t),null!=e.a?function(e){return null==e?MFe:new bv(sB(e))}(t.Kb(e.a)):MFe}function _q(){_q=S,KGe=new dT("LAYER_SWEEP",0),YGe=new dT(ZTe,1)}function Sq(){Sq=S,QGe=E5((_q(),m3(ay(nVe,1),Kye,333,0,[KGe,YGe])))}function xq(){xq=S,hVe=E5((pQ(),m3(ay(bVe,1),Kye,413,0,[lVe,uVe])))}function Tq(){Tq=S,dJe=E5((aY(),m3(ay(mJe,1),Kye,374,0,[fJe,uJe])))}function Aq(){Aq=S,JQe=E5((cZ(),m3(ay(rJe,1),Kye,415,0,[KQe,ZQe])))}function kq(){kq=S,mWe=E5((RW(),m3(ay(Tqe,1),Kye,414,0,[pWe,gWe])))}function Cq(){Cq=S,XGe=E5((jY(),m3(ay(ZGe,1),Kye,417,0,[VGe,WGe])))}function Mq(){Mq=S,MVe=E5((jK(),m3(ay(DVe,1),Kye,473,0,[kVe,AVe])))}function Iq(){Iq=S,F1e=E5((iY(),m3(ay(V1e,1),Kye,513,0,[L1e,P1e])))}function Oq(){Oq=S,e1e=E5((NW(),m3(ay(a1e,1),Kye,516,0,[QJe,ZJe])))}function Nq(){Nq=S,d1e=E5((q$(),m3(ay(b1e,1),Kye,509,0,[f1e,u1e])))}function Rq(){Rq=S,m1e=E5((PH(),m3(ay(D1e,1),Kye,508,0,[p1e,g1e])))}function Pq(){Pq=S,W1e=E5((W$(),m3(ay(Z1e,1),Kye,448,0,[H1e,G1e])))}function Lq(){Lq=S,G0e=E5((LH(),m3(ay(q0e,1),Kye,474,0,[z0e,$0e])))}function Dq(){Dq=S,X0e=E5((NV(),m3(ay(n2e,1),Kye,419,0,[W0e,V0e])))}function Fq(){Fq=S,r2e=E5((X1(),m3(ay(s2e,1),Kye,487,0,[e2e,t2e])))}function Uq(){Uq=S,$4e=E5((K2(),m3(ay(H4e,1),Kye,423,0,[B4e,j4e])))}function jq(){jq=S,h2e=E5((kK(),m3(ay(b2e,1),Kye,420,0,[l2e,u2e])))}function Bq(){Bq=S,X3e=E5((oY(),m3(ay(e4e,1),Kye,424,0,[W3e,V3e])))}function zq(){zq=S,yUe=E5((Oee(),m3(ay(SUe,1),Kye,422,0,[wUe,mUe])))}function $q(){$q=S,xUe=E5((hQ(),m3(ay(zUe,1),Kye,421,0,[EUe,_Ue])))}function Hq(){Hq=S,$Be=E5((dQ(),m3(ay(Tze,1),Kye,418,0,[jBe,BBe])))}function Gq(){Gq=S,O$e=E5((Y1(),m3(ay(P$e,1),Kye,504,0,[M$e,C$e])))}function Vq(){Vq=S,JFe=!0,ZFe=!1,QFe=!1,tUe=!1,eUe=!1}function Wq(e){e.i=0,ux(e.b,null),ux(e.c,null),e.a=null,e.e=null,++e.g}function qq(e){if(Wle(e))return e.c=e.a,e.a.Pb();throw Jb(new mm)}function Xq(e){Vq(),JFe||(this.c=e,this.e=!0,this.a=new $b)}function Yq(e,t){this.c=0,this.b=t,qk.call(this,e,17493),this.a=this.c}function Kq(e,t,n){var r;return dG(t,e.c.length),r=e.c[t],e.c[t]=n,r}function Zq(e,t){var n,r;for(n=t,r=0;n>0;)r+=e.a[n],n-=n&-n;return r}function Qq(e,t){var n;for(n=t;n;)XO(e,-n.i,-n.j),n=$H(n);return e}function Jq(e,t){var n,r;for(sB(t),r=e.Ic();r.Ob();)n=r.Pb(),t.td(n)}function eX(e,t){var n;return new v_(n=t.ad(),e.e.nc(n,xL(t.bd(),15)))}function tX(e,t){return(l8(e),DE(new JD(e,new _K(t,e.a)))).sd(iUe)}function nX(){eM(this),this.b=new HA(e_e,e_e),this.a=new HA(t_e,t_e)}function rX(e){this.b=e,gI.call(this,e),this.a=xL(k2(this.b.a,4),124)}function iX(e){this.b=e,kO.call(this,e),this.a=xL(k2(this.b.a,4),124)}function aX(e,t,n,r,i){AX.call(this,t,r,i),this.c=e,this.b=n}function oX(e,t,n,r,i){AX.call(this,t,r,i),this.c=e,this.a=n}function sX(e,t,n,r,i){lV.call(this,t,r,i),this.c=e,this.a=n}function cX(e,t,n,r,i){uV.call(this,t,r,i),this.c=e,this.a=n}function lX(e){nx.call(this,null==e?cye:K8(e),RM(e,78)?xL(e,78):null)}function uX(e){var t;return e.c||RM(t=e.r,87)&&(e.c=xL(t,26)),e.c}function fX(e,t){var n;return n=0,e&&(n+=e.f.a/2),t&&(n+=t.f.a/2),n}function hX(e,t){return xL(LZ(e.d,t),23)||xL(LZ(e.e,t),23)}function dX(e){return SM(e&HEe,e>>22&HEe,e<0?GEe:0)}function pX(e,t){var n;return!!(n=M4(e,t.ad()))&&ZB(n.e,t.bd())}function gX(e){return!(!e.c||!e.d||!e.c.i||e.c.i!=e.d.i)}function bX(e,t){return 0==t||0==e.e?e:t>0?m7(e,t):hhe(e,-t)}function mX(e,t){return 0==t||0==e.e?e:t>0?hhe(e,t):m7(e,-t)}function wX(e,t){return!!RM(t,149)&&eP(e.c,xL(t,149).c)}function vX(e,t){if(e<0||e>t)throw Jb(new Sv(Vse(e,t,"index")));return e}function yX(e){return e.t||(e.t=new Sb(e),v6(new wv(e),0,e.t)),e.t}function EX(e){var t;return L2(t=new _$,e),q3(t,(mve(),FKe),null),t}function _X(e){var t,n;return t=e.c.i,n=e.d.i,t.k==(yoe(),f$e)&&n.k==f$e}function SX(e){var t,n;++e.j,t=e.g,n=e.i,e.g=null,e.i=0,e.$h(n,t),e.Zh()}function xX(e,t){e.li(e.i+1),rI(e,e.i,e.ji(e.i,t)),e.Yh(e.i++,t),e.Zh()}function TX(e,t,n){Ib.call(this,n),this.b=e,this.c=t,this.d=(Y9(),Pnt)}function AX(e,t,n){this.d=e,this.k=t?1:0,this.f=n?1:0,this.o=-1,this.p=0}function kX(e,t,n){var r;$0(r=new pI(e.a),e.a.a),tce(r.f,t,n),e.a.a=r}function CX(e,t,n){var r;return(r=e.Tg(t))>=0?e.Wg(r,n,!0):Jce(e,t,n)}function MX(e,t){var n;return!(n=xL(e.c.vc(t),15))&&(n=e.ic(t)),e.nc(t,n)}function IX(e,t){var n,r;return sB(e),n=e,sB(t),n==(r=t)?0:nn||t=0,"Initial capacity must not be negative")}function pY(){pY=S,Aze=E5((sZ(),m3(ay(Lze,1),Kye,376,0,[Sze,_ze,xze])))}function gY(){gY=S,ZUe=E5((NQ(),m3(ay(QUe,1),Kye,230,0,[qUe,XUe,YUe])))}function bY(){bY=S,ije=E5((IK(),m3(ay(aje,1),Kye,455,0,[eje,JUe,tje])))}function mY(){mY=S,uje=E5((CZ(),m3(ay(Rje,1),Kye,456,0,[cje,sje,oje])))}function wY(){wY=S,nUe=E5((o5(),m3(ay(rUe,1),Kye,132,0,[XFe,YFe,KFe])))}function vY(){vY=S,YQe=E5((p4(),m3(ay(QQe,1),Kye,372,0,[WQe,VQe,qQe])))}function yY(){yY=S,lJe=E5((p2(),m3(ay(hJe,1),Kye,373,0,[aJe,oJe,sJe])))}function EY(){EY=S,iJe=E5((t1(),m3(ay(cJe,1),Kye,446,0,[nJe,eJe,tJe])))}function _Y(){_Y=S,wJe=E5((P5(),m3(ay(_Je,1),Kye,334,0,[pJe,gJe,bJe])))}function SY(){SY=S,SJe=E5((j0(),m3(ay(kJe,1),Kye,336,0,[EJe,vJe,yJe])))}function xY(){xY=S,CJe=E5((Y2(),m3(ay(FJe,1),Kye,375,0,[TJe,AJe,xJe])))}function TY(){TY=S,rVe=E5((n1(),m3(ay(sVe,1),Kye,335,0,[JGe,tVe,eVe])))}function AY(){AY=S,cVe=E5((OQ(),m3(ay(fVe,1),Kye,416,0,[aVe,iVe,oVe])))}function kY(){kY=S,mVe=E5((D3(),m3(ay(xVe,1),Kye,444,0,[pVe,dVe,gVe])))}function CY(){CY=S,VJe=E5((r1(),m3(ay(WJe,1),Kye,447,0,[zJe,$Je,HJe])))}function MY(){MY=S,c2e=E5((c9(),m3(ay(f2e,1),Kye,436,0,[o2e,i2e,a2e])))}function IY(){IY=S,U3e=E5((Q6(),m3(ay(B3e,1),Kye,430,0,[P3e,L3e,D3e])))}function OY(){OY=S,dWe=E5((MZ(),m3(ay(bWe,1),Kye,301,0,[uWe,fWe,lWe])))}function NY(){NY=S,cWe=E5((d2(),m3(ay(hWe,1),Kye,292,0,[aWe,oWe,iWe])))}function RY(){RY=S,X2e=E5((h2(),m3(ay(Y2e,1),Kye,293,0,[V2e,W2e,G2e])))}function PY(){PY=S,m2e=E5((s5(),m3(ay($2e,1),Kye,377,0,[d2e,p2e,g2e])))}function LY(){LY=S,e3e=E5((l9(),m3(ay(A3e,1),Kye,378,0,[Z2e,Q2e,K2e])))}function DY(){DY=S,TGe=E5((K1(),m3(ay(PGe,1),Kye,358,0,[SGe,_Ge,EGe])))}function FY(){FY=S,j8e=E5((mJ(),m3(ay(G8e,1),Kye,271,0,[L8e,D8e,F8e])))}function UY(){UY=S,f9e=E5((Z6(),m3(ay(b9e,1),Kye,332,0,[c9e,s9e,l9e])))}function jY(){jY=S,VGe=new hT("QUADRATIC",0),WGe=new hT("SCANLINE",1)}function BY(e){return!e.g&&(e.g=new nc),!e.g.c&&(e.g.c=new _b(e)),e.g.c}function zY(e,t,n){var r,i;if(null!=n)for(r=0;r=i){for(o=1;o=0?e.Wg(n,!0,!0):Jce(e,t,!0)}function bK(e,t){return ax(e.e,t)||Eee(e.e,t,new Lee(t)),xL(LZ(e.e,t),112)}function mK(e){for(;!e.a;)if(!rP(e.c,new Ad(e)))return!1;return!0}function wK(e){return cj(e),RM(e,197)?xL(e,197):new Zf(e)}function vK(e,t){if(null==e.g||t>=e.i)throw Jb(new iC(t,e.i));return e.g[t]}function yK(e,t,n){if(C4(e,n),null!=n&&!e.rj(n))throw Jb(new bm);return n}function EK(e,t){return 10!=KZ(t)&&m3(D4(t),t.cm,t.__elementTypeId$,KZ(t),e),e}function _K(e,t){Xk.call(this,t.rd(),-16449&t.qd()),sB(e),this.a=e,this.c=t}function SK(e,t){if(t.a)throw Jb(new sv(W_e));ZU(e.a,t),t.a=e,!e.j&&(e.j=t)}function xK(e){e.a=HY(Eit,kEe,24,e.b+1,15,1),e.c=HY(Eit,kEe,24,e.b,15,1),e.d=0}function TK(){TK=S,K0e=B7(B7(Ux(new nW,(rre(),X1e)),(kse(),o0e)),n0e)}function AK(){var e,t,n,r;AK=S,q4e=new us,Y4e=new fs,Ove(),e=t8e,t=q4e,n=L6e,r=Y4e,cz(),X4e=new ov(m3(ay(WLe,1),jye,43,0,[(hte(e,t),new v_(e,t)),(hte(n,r),new v_(n,r))]))}function kK(){kK=S,l2e=new oA("LEAF_NUMBER",0),u2e=new oA("NODE_SIZE",1)}function CK(){CK=S,FFe=new fx("All",0),UFe=new WC,jFe=new FM,BFe=new qC}function MK(){MK=S,$Fe=E5((CK(),m3(ay(HFe,1),Kye,297,0,[FFe,UFe,jFe,BFe])))}function IK(){IK=S,eje=new Ax(_Se,0),JUe=new Ax(vSe,1),tje=new Ax(SSe,2)}function OK(){OK=S,gbe(),Ort=e_e,Irt=t_e,Rrt=new $h(e_e),Nrt=new $h(t_e)}function NK(){NK=S,$je=E5((F2(),m3(ay(qje,1),Kye,401,0,[Bje,Fje,Uje,jje])))}function RK(){RK=S,Xje=E5((Jee(),m3(ay(Yje,1),Kye,322,0,[Gje,Hje,Vje,Wje])))}function PK(){PK=S,oBe=E5((ete(),m3(ay(cBe,1),Kye,390,0,[nBe,tBe,rBe,iBe])))}function LK(){LK=S,Zze=E5((U3(),m3(ay(o$e,1),Kye,400,0,[Wze,Yze,qze,Xze])))}function DK(){DK=S,XHe=E5((F3(),m3(ay(rGe,1),Kye,357,0,[WHe,GHe,VHe,HHe])))}function FK(){FK=S,lGe=E5((X2(),m3(ay(gGe,1),Kye,406,0,[iGe,aGe,oGe,sGe])))}function UK(){UK=S,kQe=E5((bte(),m3(ay(RQe,1),Kye,196,0,[xQe,TQe,SQe,_Qe])))}function jK(){jK=S,kVe=new vT(FTe,0),AVe=new vT("IMPROVE_STRAIGHTNESS",1)}function BK(e,t){var n,r;return r=t/e.c.Hd().gc()|0,n=t%e.c.Hd().gc(),eY(e,r,n)}function zK(e,t){var n;return YW(t),(n=EK(e.slice(0,t),e)).length=t,n}function $K(e,t,n,r){a$(),r=r||mFe,Jse(e.slice(t,n),e,t,n,-t,r)}function HK(e,t,n,r,i){return t<0?Jce(e,n,r):xL(n,65).Ij().Kj(e,e.th(),t,r,i)}function GK(e,t){if(t<0)throw Jb(new Sv(iIe+t));return kW(e,t+1),$D(e.j,t)}function VK(e){var t;if(!C1(e))throw Jb(new mm);return e.e=1,t=e.d,e.d=null,t}function WK(e){var t,n;if(!e.b)return null;for(n=e.b;t=n.a[0];)n=t;return n}function qK(e){var t;null!=(t=e.vi())&&-1!=e.d&&xL(t,91).Ig(e),e.i&&e.i.Ai()}function XK(e,t){var n;this.f=e,this.b=t,n=xL(qj(e.b,t),282),this.c=n?n.b:null}function YK(e,t,n){for(;n=0;)++t[0]}function vZ(e,t){Qje=new et,aBe=t,xL((Zje=e).b,63),qY(Zje,Qje,null),cme(Zje)}function yZ(e,t){return ZB(t,$D(e.f,0))||ZB(t,$D(e.f,1))||ZB(t,$D(e.f,2))}function EZ(e,t){var n,r;return kS(),n=SW(e),r=SW(t),!!n&&!!r&&!Hee(n.k,r.k)}function _Z(e,t,n){var r,i;for(r=10,i=0;i=0?ate(e,n,!0,!0):Jce(e,t,!0)}function xZ(e){var t;for(t=e.p+1;t0?(e.f[l.p]=h/(l.e.c.length+l.g.c.length),e.c=r.Math.min(e.c,e.f[l.p]),e.b=r.Math.max(e.b,e.f[l.p])):s&&(e.f[l.p]=h)}}(e,t,n),0==e.a.c.length||function(e,t){var n,r,i,a,o,s,c,l,u,f;for(l=e.e[t.c.p][t.p]+1,c=t.c.a.c.length+1,s=new td(e.a);s.a=0&&(e.Yc(n),!0)}function RZ(e){var t;return e.d!=e.r&&(t=Ere(e),e.e=!!t&&t.xj()==kRe,e.d=t),e.e}function PZ(e,t){var n;for(cj(e),cj(t),n=!1;t.Ob();)n|=e.Dc(t.Pb());return n}function LZ(e,t){var n;return(n=xL(qj(e.e,t),382))?(ZM(e,n),n.e):null}function DZ(e,t){return l8(e),new JD(e,new sP(new HX(t,e.a)))}function FZ(e){var t,n;return t=e/60|0,0==(n=e%60)?""+t:t+":"+n}function UZ(e){return K4(e,Jve)>0?Jve:K4(e,iEe)<0?iEe:zD(e)}function jZ(e,t){var n=e.a[t],r=(z3(),gDe)[typeof n];return r?r(n):a6(typeof n)}function BZ(e,t){var n;for(++e.d,++e.c[t],n=t+1;ne.a[r]&&(r=n);return r}function QZ(e){var t;for(++e.a,t=e.c.a.length;e.a=0&&t=-.01&&e.a<=CSe&&(e.a=0),e.b>=-.01&&e.b<=CSe&&(e.b=0),e}function CQ(e){var t;mO(!!e.c),t=e.c.a,UQ(e.d,e.c),e.b==e.c?e.b=t:--e.a,e.c=null}function MQ(e,t){var n;return l8(e),n=new Vz(e,e.a.rd(),4|e.a.qd(),t),new JD(e,n)}function IQ(e,t,n,r,i,a){var o;bG(o=EX(r),i),gG(o,a),Xce(e.a,r,new BP(o,t,n.f))}function OQ(){OQ=S,aVe=new gT("GREEDY",0),iVe=new gT(QTe,1),oVe=new gT(ZTe,2)}function NQ(){NQ=S,qUe=new Tx("BEGIN",0),XUe=new Tx(vSe,1),YUe=new Tx("END",2)}function RQ(){RQ=S,mDe=SM(HEe,HEe,524287),wDe=SM(0,0,VEe),vDe=dX(1),dX(2),yDe=dX(0)}function PQ(e){var t;return(t=Mv(NN(Hae(e,(mve(),AKe)))))<0&&q3(e,AKe,t=0),t}function LQ(e,t){var n;for(n=e.Ic();n.Ob();)q3(xL(n.Pb(),69),(Nve(),GWe),t)}function DQ(e,t){var n;for(n=e;$H(n);)if((n=$H(n))==t)return!0;return!1}function FQ(e,t){if(null==e.g||t>=e.i)throw Jb(new iC(t,e.i));return e.gi(t,e.g[t])}function UQ(e,t){var n;return n=t.c,t.a.b=t.b,t.b.a=t.a,t.a=t.b=null,t.c=null,--e.b,n}function jQ(e,t){var n,r,i,a;for(sB(t),i=0,a=(r=e.c).length;i>16!=6?null:xL(Fle(e),234)}(e),t&&!t.fh()&&(e.w=t),t)}function qQ(e,t,n){if(C4(e,n),!e.wk()&&null!=n&&!e.rj(n))throw Jb(new bm);return n}function XQ(e,t){var n,r;r=e.a,n=function(e,t,n){var r,i;return i=e.a,e.a=t,0!=(4&e.Db)&&0==(1&e.Db)&&(r=new xU(e,1,5,i,e.a),n?Rie(n,r):n=r),n}(e,t,null),r!=t&&!e.e&&(n=rwe(e,t,n)),n&&n.Ai()}function YQ(e,t,n){var r=function(){return e.apply(r,arguments)};return t.apply(r,n),r}function KQ(e){var t;return XL(null==e||Array.isArray(e)&&!((t=KZ(e))>=14&&t<=16)),e}function ZQ(e){e.b=(IK(),JUe),e.f=(CZ(),sje),e.d=(JJ(2,Yye),new dY(2)),e.e=new lE}function QQ(e){this.b=(cj(e),new AP(e)),this.a=new $b,this.d=new $b,this.e=new lE}function JQ(e){var t;return rV(e.e,e),wO(e.b),e.c=e.a,t=xL(e.a.Pb(),43),e.b=u3(e),t}function eJ(e){if(!(e>=0))throw Jb(new Rv("tolerance ("+e+") must be >= 0"));return e}function tJ(e,t,n){var r,i;return i=t>>5,r=31&t,lH(fD(e.n[n][i],zD(uD(r,1))),3)}function nJ(e,t){return function(e){return e?e.g:null}(T0(e.a,t,zD(A6(Gye,KB(zD(A6(null==t?0:L4(t),Vye)),15)))))}function rJ(e,t){return hM(),eJ(rEe),r.Math.abs(e-t)<=rEe||e==t||isNaN(e)&&isNaN(t)}function iJ(e,t){return hM(),eJ(rEe),r.Math.abs(e-t)<=rEe||e==t||isNaN(e)&&isNaN(t)}function aJ(){aJ=S,TVe=E5((Soe(),m3(ay(CVe,1),Kye,274,0,[vVe,wVe,EVe,yVe,SVe,_Ve])))}function oJ(){oJ=S,FVe=E5((aie(),m3(ay(GVe,1),Kye,272,0,[RVe,NVe,LVe,OVe,PVe,IVe])))}function sJ(){sJ=S,VVe=E5((foe(),m3(ay(nWe,1),Kye,273,0,[$Ve,jVe,HVe,zVe,BVe,UVe])))}function cJ(){cJ=S,GGe=E5((Sse(),m3(ay(qGe,1),Kye,225,0,[jGe,zGe,UGe,BGe,$Ge,FGe])))}function lJ(){lJ=S,c0e=E5((kse(),m3(ay(H0e,1),Kye,325,0,[o0e,n0e,i0e,r0e,a0e,t0e])))}function uJ(){uJ=S,J8e=E5((xae(),m3(ay(u9e,1),Kye,310,0,[K8e,X8e,Z8e,W8e,Y8e,q8e])))}function fJ(){fJ=S,EQe=E5((sae(),m3(ay(AQe,1),Kye,311,0,[wQe,bQe,pQe,gQe,vQe,mQe])))}function hJ(){hJ=S,k5e=E5((mte(),m3(ay(W5e,1),Kye,247,0,[y5e,S5e,x5e,T5e,E5e,_5e])))}function dJ(){dJ=S,q5e=E5((Eie(),m3(ay(R8e,1),Kye,290,0,[V5e,G5e,H5e,z5e,B5e,$5e])))}function pJ(){pJ=S,H9e=E5((Hie(),m3(ay(Y9e,1),Kye,100,0,[z9e,B9e,j9e,D9e,U9e,F9e])))}function gJ(){gJ=S,m$e=E5((yoe(),m3(ay(w$e,1),Kye,266,0,[p$e,d$e,f$e,g$e,h$e,u$e])))}function bJ(){bJ=S,rje=(NQ(),m3(ay(QUe,1),Kye,230,0,[qUe,XUe,YUe])).length,nje=rje}function mJ(){mJ=S,L8e=new yA(vSe,0),D8e=new yA("HEAD",1),F8e=new yA("TAIL",2)}function wJ(e,t){return e.n=t,e.n?(e.f=new $b,e.e=new $b):(e.f=null,e.e=null),e}function vJ(e,t){var n;n=e.f,e.f=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new rq(e,3,n,e.f))}function yJ(e,t){var n;n=e.g,e.g=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new rq(e,4,n,e.g))}function EJ(e,t){var n;n=e.i,e.i=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new rq(e,5,n,e.i))}function _J(e,t){var n;n=e.j,e.j=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new rq(e,6,n,e.j))}function SJ(e,t){var n;n=e.j,e.j=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new rq(e,1,n,e.j))}function xJ(e,t){var n;n=e.b,e.b=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new rq(e,1,n,e.b))}function TJ(e,t){var n;n=e.b,e.b=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new rq(e,3,n,e.b))}function AJ(e,t){var n;n=e.c,e.c=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new rq(e,4,n,e.c))}function kJ(e,t){var n;n=e.k,e.k=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new rq(e,2,n,e.k))}function CJ(e,t){var n;n=e.a,e.a=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new rq(e,0,n,e.a))}function MJ(e,t){var n;n=e.s,e.s=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new iq(e,4,n,e.s))}function IJ(e,t){var n;n=e.t,e.t=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new iq(e,5,n,e.t))}function OJ(e,t){var n;n=e.d,e.d=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new iq(e,2,n,e.d))}function NJ(e,t){var n;n=e.F,e.F=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,5,n,t))}function RJ(e,t){var n;if(n=e.gc(),t<0||t>n)throw Jb(new PR(t,n));return new cP(e,t)}function PJ(e,t){var n;return t in e.a&&(n=sH(e,t).he())?n.a:null}function LJ(e,t){var n,r;return yE(),r=new ic,!!t&&Ofe(r,t),b1(n=r,e),n}function DJ(e,t){var n;return(n=xL(qj((KS(),ctt),e),54))?n.sj(t):HY(LLe,aye,1,t,5,1)}function FJ(e){var t,n,r;for(n=0,r=(t=e).length;n=0),function(e,t){var n,r,i;return r=e.a.length-1,n=t-e.b&r,i=e.c-t&r,gO(n<(e.c-e.b&r)),n>=i?(function(e,t){var n,r;for(n=e.a.length-1,e.c=e.c-1&n;t!=e.c;)r=t+1&n,Gj(e.a,t,e.a[r]),t=r;Gj(e.a,e.c,null)}(e,t),-1):(function(e,t){var n,r;for(n=e.a.length-1;t!=e.b;)r=t-1&n,Gj(e.a,t,e.a[r]),t=r;Gj(e.a,e.b,null),e.b=e.b+1&n}(e,t),1)}(e.d,e.c)<0&&(e.a=e.a-1&e.d.a.length-1,e.b=e.d.c),e.c=-1}function KJ(e){return e.a<54?e.f<0?-1:e.f>0?1:0:(!e.c&&(e.c=o6(e.f)),e.c).e}function ZJ(e,t){var n;return RM(t,43)?e.c.Kc(t):(n=U9(e,t),k7(e,t),n)}function QJ(e,t,n){return D5(e,t),o0(e,n),MJ(e,0),IJ(e,1),D6(e,!0),B6(e,!0),e}function JJ(e,t){if(e<0)throw Jb(new Rv(t+" cannot be negative but was: "+e));return e}function e1(){return Z4e||H4(Z4e=new Ide,m3(ay($Ue,1),aye,130,0,[new Af])),Z4e}function t1(){t1=S,nJe=new RT(kSe,0),eJe=new RT("INPUT",1),tJe=new RT("OUTPUT",2)}function n1(){n1=S,JGe=new pT("ARD",0),tVe=new pT("MSD",1),eVe=new pT("MANUAL",2)}function r1(){r1=S,zJe=new jT("BARYCENTER",0),$Je=new jT(NTe,1),HJe=new jT(RTe,2)}function i1(){i1=S,PDe=m3(ay(Eit,1),kEe,24,15,[0,8,4,12,2,10,6,14,1,9,5,13,3,11,7,15])}function a1(e,t,n,r){this.mj(),this.a=t,this.b=e,this.c=null,this.c=new qR(this,t,n,r)}function o1(e,t,n,r,i){this.d=e,this.n=t,this.g=n,this.o=r,this.p=-1,i||(this.o=-2-r-1)}function s1(){kI.call(this),this.n=-1,this.g=null,this.i=null,this.j=null,this.Bb|=uRe}function c1(e){_S(),this.g=new Hb,this.f=new Hb,this.b=new Hb,this.c=new aH,this.i=e}function l1(){this.f=new lE,this.d=new lw,this.c=new lE,this.a=new $b,this.b=new $b}function u1(e){var t;for(t=e.c.Ac().Ic();t.Ob();)xL(t.Pb(),15).$b();e.c.$b(),e.d=0}function f1(e,t){var n,r;for(n=0,r=e.gc();n0?xL($D(n.a,r-1),10):null}function d1(e,t){var n;n=e.k,e.k=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,2,n,e.k))}function p1(e,t){var n;n=e.f,e.f=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,8,n,e.f))}function g1(e,t){var n;n=e.i,e.i=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,7,n,e.i))}function b1(e,t){var n;n=e.a,e.a=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,8,n,e.a))}function m1(e,t){var n;n=e.b,e.b=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,0,n,e.b))}function w1(e,t){var n;n=e.c,e.c=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,1,n,e.c))}function v1(e,t){var n;n=e.d,e.d=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,1,n,e.d))}function y1(e,t){var n;n=e.D,e.D=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,2,n,e.D))}function E1(e,t){var n;n=e.c,e.c=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,4,n,e.c))}function _1(e,t){var n;n=e.b,e.b=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,0,n,e.b))}function S1(e,t){var n;n=e.c,e.c=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,1,n,e.c))}function x1(e,t){e.r>0&&e.c0&&0!=e.g&&x1(e.i,t/e.r*e.i.d))}function T1(e,t,n,i,a,o){this.c=e,this.e=t,this.d=n,this.i=i,this.f=a,this.g=o,function(e){e.e>0&&e.d>0&&(e.a=e.e*e.d,e.b=e.e/e.d,e.j=function(e,t,n){return r.Math.min(n/e,1/t)}(e.e,e.d,e.c))}(this)}function A1(e){var t,n;if(0==e)return 32;for(n=0,t=1;0==(t&e);t<<=1)++n;return n}function k1(e){var t;return(e=r.Math.max(e,2))>(t=H3(e))?(t<<=1)>0?t:Xye:t}function C1(e){switch(HM(3!=e.e),e.e){case 2:return!1;case 0:return!0}return function(e){return e.e=3,e.d=e.Yb(),2!=e.e&&(e.e=0,!0)}(e)}function M1(e,t){return phe(e.e,t)?(YS(),RZ(t)?new _D(t,e):new Ek(t,e)):new bk(t,e)}function I1(e,t){var n;n=e.d,e.d=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,11,n,e.d))}function O1(e,t){var n,r;for(r=t.tc().Ic();r.Ob();)Xre(e,(n=xL(r.Pb(),43)).ad(),n.bd())}function N1(e,t){var n;n=e.j,e.j=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,13,n,e.j))}function R1(e,t){var n;return!!RM(t,8)&&(n=xL(t,8),e.a==n.a&&e.b==n.b)}function P1(e){return null==e.b?($S(),$S(),xnt):e.Gk()?e.Fk():e.Ek()}function L1(e,t){var n;n=e.b,e.b=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,21,n,e.b))}function D1(e,t){var n=e.a,r=0;for(var i in n)n.hasOwnProperty(i)&&(t[r++]=i);return t}function F1(e,t,n){var r,i,a;for(a=e.a.length-1,i=e.b,r=0;r0?t-1:t,rE(function(e,t){return e.j=t,e}(wJ(sD(new qw,n),e.n),e.j),e.k)}(e,e.g),oD(e.a,n),n.i=e,e.d=t,n)}function L0(e,t){var n;return Hce(new HA((n=pae(e)).c,n.d),new HA(n.b,n.a),e.pf(),t,e.Ef())}function D0(e){if(sB(e),0==e.length)throw Jb(new cy("Zero length BigInteger"));!function(e,t){var n,r,i,a,o,s,c,l,u,f,h,d,p,g,b;for(c=d=t.length,pG(0,t.length),45==t.charCodeAt(0)?(f=-1,h=1,--d):(f=1,h=0),i=d/(a=(Cbe(),lFe)[10])|0,0!=(b=d%a)&&++i,s=HY(Eit,kEe,24,i,15,1),n=cFe[8],o=0,p=h+(0==b?a:b),g=h;gi&&t.aa&&t.b0&&(this.g=this.mi(this.i+(this.i/8|0)+1),e.Oc(this.g))}function e2(e){return YEe=0x8000000000000000?(RQ(),mDe):(r=!1,e<0&&(r=!0,e=-e),n=0,e>=qEe&&(e-=(n=dH(e/qEe))*qEe),t=0,e>=WEe&&(e-=(t=dH(e/WEe))*WEe),i=SM(dH(e),t,n),r&&c4(i),i)}(e))}function t2(e){return RM(e,151)?OX(xL(e,151)):RM(e,131)?xL(e,131).a:RM(e,53)?new rv(e):new M_(e)}function n2(e,t){return QK(new md(e),new wd(t),new vd(t),new Y,m3(ay(rUe,1),Kye,132,0,[]))}function r2(e,t){var n;for(n=0;n1||e.Ob())return++e.a,e.g=0,t=e.i,e.Ob(),t;throw Jb(new mm)}function M2(e){var t;null==e.d?(++e.e,e.f=0,h6(null)):(++e.e,t=e.d,e.d=null,e.f=0,h6(t))}function I2(e){var t,n,r;return n=0,(r=e)<0&&(r+=qEe,n=GEe),t=dH(r/WEe),SM(dH(r-t*WEe),t,n)}function O2(e){var t,n,r;for(r=0,n=new rS(e.a);n.a=128)&&F_(e<64?lH(uD(1,e),n):lH(uD(1,e-64),t),0)}function n3(e,t,n,r){return 1==n?(!e.n&&(e.n=new AU(Pet,e,1,7)),Yee(e.n,t,r)):boe(e,t,n,r)}function r3(e,t){var n;return o0(n=new Fc,t),cK((!e.A&&(e.A=new lI(vnt,e,7)),e.A),n),n}function i3(e,t){var n,r;if(r=0,e<64&&e<=t)for(t=t<64?t:63,n=e;n<=t;n++)r=uH(r,uD(1,n));return r}function a3(e,t){var n;return 0!=(n=t.Nc()).length&&(_L(e.c,e.c.length,n),!0)}function o3(e,t){var n,r;for(sB(t),r=t.Ic();r.Ob();)if(n=r.Pb(),!e.Fc(n))return!1;return!0}function s3(e,t){var n;for(n=new td(e.b);n.a>22),i=e.h-t.h+(r>>22),SM(n&HEe,r&HEe,i&GEe)}function x3(e,t,n){var r;zU(e.a),jQ(n.i,new Og(e)),Y7(e,r=new PM(xL(qj(e.a,t.b),63)),t),n.f=r}function T3(e,t,n){var r;if(t>(r=e.gc()))throw Jb(new PR(t,r));return e.ci()&&(n=DH(e,n)),e.Qh(t,n)}function A3(e,t){if(0===t)return!e.o&&(e.o=new iK((uve(),pet),qet,e,0)),void e.o.c.$b();ase(e,t)}function k3(e){switch(e.g){case 1:return d9e;case 2:return h9e;case 3:return p9e;default:return g9e}}function C3(e){switch(xL(Hae(e,(mve(),BKe)),165).g){case 2:case 4:return!0;default:return!1}}function M3(e){var t;return yE(),t=new Zs,e&&cK((!e.a&&(e.a=new AU(Met,e,6,6)),e.a),t),t}function I3(e){var t,n,r;for(i$(),r=0,n=e.Ic();n.Ob();)r+=null!=(t=n.Pb())?L4(t):0,r|=0;return r}function O3(e){var t,n,r;return n=e.n,r=e.o,t=e.d,new Sz(n.a-t.b,n.b-t.d,r.a+(t.b+t.c),r.b+(t.d+t.a))}function N3(e,t){return!(!e||!t||e==t)&&h9(e.b.c,t.b.c+t.b.b)<0&&h9(t.b.c,e.b.c+e.b.b)<0}function R3(e,t,n){switch(n.g){case 2:e.b=t;break;case 1:e.c=t;break;case 4:e.d=t;break;case 3:e.a=t}}function P3(e,t,n,r,i){var a,o;for(o=n;o<=i;o++)for(a=t;a<=r;a++)Ete(e,a,o)||Sde(e,a,o,!0,!1)}function L3(){L3=S,new mb("org.eclipse.elk.addLayoutConfig"),V4e=new ns,G4e=new Jo,new rs}function D3(){D3=S,pVe=new mT(FTe,0),dVe=new mT("INCOMING_ONLY",1),gVe=new mT("OUTGOING_ONLY",2)}function F3(){F3=S,WHe=new qx(FTe,0),GHe=new qx(UTe,1),VHe=new qx(jTe,2),HHe=new qx("BOTH",3)}function U3(){U3=S,Wze=new Hx("Q1",0),Yze=new Hx("Q4",1),qze=new Hx("Q2",2),Xze=new Hx("Q3",3)}function j3(){j3=S,Z0e=AD(B7(B7(Ux(AD(new nW,(rre(),X1e),(kse(),o0e)),Y1e),r0e),i0e),K1e,a0e)}function B3(){B3=S,rWe=E5((Uhe(),m3(ay(sWe,1),Kye,255,0,[qVe,YVe,KVe,ZVe,QVe,JVe,tWe,WVe,XVe,eWe])))}function z3(){z3=S,gDe={boolean:X_,number:kv,string:Cv,object:rce,function:rce,undefined:tm}}function $3(e,t){MP(e>=0,"Negative initial capacity"),MP(t>=0,"Non-positive load factor"),zU(this)}function H3(e){var t;if(e<0)return iEe;if(0==e)return 0;for(t=Xye;0==(t&e);t>>=1);return t}function G3(e){var t,n;return SM(t=1+~e.l&HEe,n=~e.m+(0==t?1:0)&HEe,~e.h+(0==t&&0==n?1:0)&GEe)}function V3(e){var t,n;return t=e.t-e.k[e.o.p]*e.d+e.j[e.o.p]>e.f,n=e.u+e.e[e.o.p]*e.d>e.f*e.s*e.d,t||n}function W3(e){var t,n;return L2(n=new VX,e),q3(n,(q1(),sze),e),function(e,t,n){var i,a,o,s,c;for(i=0,o=new gI((!e.a&&(e.a=new AU(Let,e,10,11)),e.a));o.e!=o.i.gc();)s="",0==(!(a=xL(aee(o),34)).n&&(a.n=new AU(Pet,a,1,7)),a.n).i||(s=xL(FQ((!a.n&&(a.n=new AU(Pet,a,1,7)),a.n),0),137).a),L2(c=new eB(s),a),q3(c,(q1(),sze),a),c.b=i++,c.d.a=a.i+a.g/2,c.d.b=a.j+a.f/2,c.e.a=r.Math.max(a.g,1),c.e.b=r.Math.max(a.f,1),SL(t.e,c),tce(n.f,a,c),xL(gue(a,(ehe(),KBe)),100),Hie()}(e,n,t=new Hb),function(e,t,n){var i,a,o,s,c,l,u,f;for(l=new gI((!e.a&&(e.a=new AU(Let,e,10,11)),e.a));l.e!=l.i.gc();)for(a=new lU(NI(efe(c=xL(aee(l),34)).a.Ic(),new p));Wle(a);){if(!(i=xL(qq(a),80)).b&&(i.b=new VR(ket,i,4,7)),!(i.b.i<=1&&(!i.c&&(i.c=new VR(ket,i,5,8)),i.c.i<=1)))throw Jb(new Vv("Graph must not contain hyperedges."));if(!Ple(i)&&c!=Jie(xL(FQ((!i.c&&(i.c=new VR(ket,i,5,8)),i.c),0),93)))for(L2(u=new wR,i),q3(u,(q1(),sze),i),bh(u,xL(Tk(H$(n.f,c)),144)),mh(u,xL(qj(n,Jie(xL(FQ((!i.c&&(i.c=new VR(ket,i,5,8)),i.c),0),93))),144)),SL(t.c,u),s=new gI((!i.n&&(i.n=new AU(Pet,i,1,7)),i.n));s.e!=s.i.gc();)L2(f=new tq(u,(o=xL(aee(s),137)).a),o),q3(f,sze,o),f.e.a=r.Math.max(o.g,1),f.e.b=r.Math.max(o.f,1),dbe(f),SL(t.d,f)}}(e,n,t),n}function q3(e,t,n){return null==n?(!e.q&&(e.q=new Hb),BX(e.q,t)):(!e.q&&(e.q=new Hb),zB(e.q,t,n)),e}function X3(e,t,n){return null==n?(!e.q&&(e.q=new Hb),BX(e.q,t)):(!e.q&&(e.q=new Hb),zB(e.q,t,n)),e}function Y3(e,t){this.b=e,aC.call(this,(xL(FQ(u$((Ij(),Gtt).o),10),17),t.i),t.g),this.a=(z0(),wnt)}function K3(e,t){this.c=e,this.d=t,this.b=this.d/this.c.c.Hd().gc()|0,this.a=this.d%this.c.c.Hd().gc()}function Z3(){this.o=null,this.k=null,this.j=null,this.d=null,this.b=null,this.n=null,this.a=null}function Q3(e,t,n){this.q=new r.Date,this.q.setFullYear(e+Tye,t,n),this.q.setHours(0,0,0,0),Kge(this,0)}function J3(e,t){var n,r,i;for(n=!1,r=e.a[t].length,i=0;in&&(n=e[t]);return n}function h4(e,t,n){var r,i;return i=lW(t,"labels"),function(e,t,n){var r,i,a,o;if(n)for(i=((r=new qF(n.a.length)).b-r.a)*r.c<0?(QS(),pit):new bI(r);i.Ob();)(a=fW(n,xL(i.Pb(),20).a))&&(o=LJ(hW(a,POe),t),zB(e.f,o,a),qOe in a.a&&d1(o,hW(a,qOe)),uae(a,o),sce(a,o))}((r=new tk(e,n)).a,r.b,i),i}function d4(){d4=S,QHe=new wr,JHe=new vr,ZHe=new yr,KHe=new Er,sB(new _r),YHe=new A}function p4(){p4=S,WQe=new OT(FTe,0),VQe=new OT("NODES_AND_EDGES",1),qQe=new OT("PREFER_EDGES",2)}function g4(e){if(0===e.g)return new ts;throw Jb(new Rv(UMe+(null!=e.f?e.f:""+e.g)))}function b4(e){if(0===e.g)return new is;throw Jb(new Rv(UMe+(null!=e.f?e.f:""+e.g)))}function m4(e,t){switch(t){case 7:return!!e.e&&0!=e.e.i;case 8:return!!e.d&&0!=e.d.i}return R9(e,t)}function w4(e,t){var n;return n=T6(e,t),IE(IH(e,t),0)|function(e,t){return K4(e,0)>=0}(IH(e,n))?n:T6(Oye,IH(fD(n,63),1))}function v4(e,t){var n;for(n=0;n1||t>=0&&e.b<3)}function _4(e){var t,n,r;for(i$(),r=1,n=e.Ic();n.Ob();)r=31*r+(null!=(t=n.Pb())?L4(t):0),r|=0;return r}function S4(e,t,n){var r,i;return RM(t,144)&&n?(r=xL(t,144),i=n,e.a[r.b][i.b]+e.a[i.b][r.b]):0}function x4(e,t,n){var r;for(r=n-1;r>=0&&e[r]===t[r];r--);return r<0?0:IE(lH(e[r],l_e),lH(t[r],l_e))?-1:1}function T4(e){var t;for(t=new td(e.a.b);t.a=e.b.c.length||(G4(e,2*t+1),(n=2*t+2)0)return FF(t-1,e.a.c.length),RX(e.a,t-1);throw Jb(new xm)}function e5(e,t,n){var r,i;for(i=n.Ic();i.Ob();)if(r=xL(i.Pb(),43),e.re(t,r.bd()))return!0;return!1}function t5(e,t,n){return e.d[t.p][n.p]||(function(e,t,n){if(e.e)switch(e.b){case 1:!function(e,t,n){e.i=0,e.e=0,t!=n&&I4(e,t,n)}(e.c,t,n);break;case 0:!function(e,t,n){e.i=0,e.e=0,t!=n&&O4(e,t,n)}(e.c,t,n)}else VW(e.c,t,n);e.a[t.p][n.p]=e.c.i,e.a[n.p][t.p]=e.c.e}(e,t,n),e.d[t.p][n.p]=!0,e.d[n.p][t.p]=!0),e.a[t.p][n.p]}function n5(e,t){return!(!e||e==t||!HO(t,(Nve(),zWe)))&&xL(Hae(t,(Nve(),zWe)),10)!=e}function r5(e,t){var n;if(0!=t.c.length){for(;Kae(e,t);)Aue(e,t,!1);n=E3(t),e.a&&(e.a.gg(n),r5(e,n))}}function i5(e,t){null==e.D&&null!=e.B&&(e.D=e.B,e.B=null),y1(e,null==t?null:(sB(t),t)),e.C&&e.tk(null)}function a5(){a5=S,K7e=new ok("ELK",0),Z7e=new ok("JSON",1),Y7e=new ok("DOT",2),Q7e=new ok("SVG",3)}function o5(){o5=S,XFe=new hx("CONCURRENT",0),YFe=new hx("IDENTITY_FINISH",1),KFe=new hx("UNORDERED",2)}function s5(){s5=S,d2e=new sA(FTe,0),p2e=new sA("RADIAL_COMPACTION",1),g2e=new sA("WEDGE_COMPACTION",2)}function c5(){c5=S,a9e=new tM(15),i9e=new iM((Ove(),U6e),a9e),o9e=s8e,e9e=Q5e,t9e=I6e,r9e=R6e,n9e=N6e}function l5(){l5=S,Ove(),R2e=s8e,D2e=S8e,oue(),M2e=w2e,I2e=v2e,O2e=E2e,N2e=S2e,P2e=x2e,L2e=T2e,F2e=k2e}function u5(){u5=S,ES(),fBe=new rC(ixe,hBe=sBe),uBe=new mb(axe),dBe=new mb(oxe),pBe=new mb(sxe)}function f5(e,t,n){if(e>t)throw Jb(new Rv(D_e+e+F_e+t));if(e<0||t>n)throw Jb(new oy(D_e+e+U_e+t+k_e+n))}function h5(e,t,n,i,a){i?function(e,t){var n,r;for(r=new td(t);r.a1&&(i$(),wM(t,e.b),function(e,t){e.c&&(Spe(e,t,!0),aS(new JD(null,new LG(t,16)),new Zp(e))),Spe(e,t,!1)}(e.c,t))}function d5(e,t,n){var r,i;for(r=new iS,i=xee(n,0);i.b!=i.d.c;)oD(r,new nM(xL(_W(i),8)));Y4(e,t,r)}function p5(e){var t;return!e.a&&(e.a=new AU(Ftt,e,9,5)),0!=(t=e.a).i?function(e){return e.b?e.b:e.a}(xL(FQ(t,0),666)):null}function g5(e,t){var n,r;if(0!=(r=e.c[t]))for(e.c[t]=0,e.d-=r,n=t+1;nHCe?e-n>HCe:n-e>HCe)}function M5(e){if(!e.a||0==(8&e.a.i))throw Jb(new Pv("Enumeration class expected for layout option "+e.f))}function I5(e){YH.call(this,"The given string does not match the expected format for individual spacings.",e)}function O5(){Qw.call(this,new XY(vQ(16))),JJ(2,Aye),this.b=2,this.a=new DB(null,null,0,null),am(this.a,this.a)}function N5(e){fv(),dM(this),Yz(this),this.e=e,fhe(this,e),this.g=null==e?cye:K8(e),this.a="",this.b=e,this.a=""}function R5(){this.a=new Zo,this.f=new xg(this),this.b=new Tg(this),this.i=new Ag(this),this.e=new kg(this)}function P5(){P5=S,pJe=new DT("CONSERVATIVE",0),gJe=new DT("CONSERVATIVE_SOFT",1),bJe=new DT("SLOPPY",2)}function L5(){L5=S,Bze=TH(m3(ay(U8e,1),Kye,108,0,[(K6(),M8e),I8e])),zze=TH(m3(ay(U8e,1),Kye,108,0,[N8e,C8e]))}function D5(e,t){var n,r;n=e.ik(t,null),r=null,t&&(_E(),XQ(r=new Wb,e.r)),(n=mae(e,r,n))&&n.Ai()}function F5(e,t){var n;for(n=0;ni&&(Sie(t.q,i),r=n!=t.q.c)),r}function z5(e,t){var n,i,a,o,s;return o=t.i,s=t.j,i=o-(n=e.f).i,a=s-n.j,r.Math.sqrt(i*i+a*a)}function $5(e,t){var n;return(n=U7(e))||(!Eet&&(Eet=new Tc),zbe(),cK((n=new Lb(Use(t))).Qk(),e)),n}function H5(e){var t;if(0!=e.c)return e.c;for(t=0;tn)throw Jb(new Sv(D_e+e+U_e+t+", size: "+n));if(e>t)throw Jb(new Rv(D_e+e+F_e+t))}function a6(e){throw z3(),Jb(new cv("Unexpected typeof result '"+e+"'; please report this bug to the GWT team"))}function o6(e){return Ghe(),e<0?-1!=e?new Qee(-1,-e):tFe:e<=10?rFe[dH(e)]:new Qee(1,e)}function s6(e){switch(e.gc()){case 0:return GLe;case 1:return new ND(cj(e.Xb(0)));default:return new eH(e)}}function c6(e){switch(bP(),e.gc()){case 0:return CB(),JLe;case 1:return new ny(e.Ic().Pb());default:return new rx(e)}}function l6(e){switch(bP(),e.c){case 0:return CB(),JLe;case 1:return new ny(wce(new rS(e)));default:return new nv(e)}}function u6(e,t){switch(t){case 1:return!e.n&&(e.n=new AU(Pet,e,1,7)),void lme(e.n);case 2:return void d1(e,null)}A3(e,t)}function f6(e,t){var n,r,i;for(i=1,n=e,r=t>=0?t:-t;r>0;)r%2==0?(n*=n,r=r/2|0):(i*=n,r-=1);return t<0?1/i:i}function h6(e){var t,n,r,i;if(null!=e)for(n=0;nn);)i>=t&&++r;return r}function b6(e){var t;return(t=xL(LZ(e.c.c,""),227))||(t=new SG(Gy(Xy(new ps,""),"Other")),Eee(e.c.c,"",t)),t}function m6(e){var t;return 0!=(64&e.Db)?Iue(e):((t=new BI(Iue(e))).a+=" (name: ",Fk(t,e.zb),t.a+=")",t.a)}function w6(e,t,n){var r,i;return i=e.sb,e.sb=t,0!=(4&e.Db)&&0==(1&e.Db)&&(r=new xU(e,1,4,i,t),n?n.zi(r):n=r),n}function v6(e,t,n){var r;if(t>(r=e.gc()))throw Jb(new PR(t,r));if(e.ci()&&e.Fc(n))throw Jb(new Rv(cNe));e.Sh(t,n)}function y6(e,t,n){if(t<0)Ece(e,n);else{if(!n.Dj())throw Jb(new Rv(lOe+n.ne()+uOe));xL(n,65).Ij().Qj(e,e.th(),t)}}function E6(e,t,n){var r;e.li(e.i+1),r=e.ji(t,n),t!=e.i&&Abe(e.g,t,e.g,t+1,e.i-t),Gj(e.g,t,r),++e.i,e.Yh(t,n),e.Zh()}function _6(e,t,n){var r,i;return i=e.r,e.r=t,0!=(4&e.Db)&&0==(1&e.Db)&&(r=new xU(e,1,8,i,e.r),n?n.zi(r):n=r),n}function S6(e,t){var n,r;return!(r=(n=xL(t,664)).qk())&&n.rk(r=RM(t,87)?new vk(e,xL(t,26)):new yV(e,xL(t,148))),r}function x6(e,t){var n;return n=new ee,e.a.sd(n)?(II(),new bv(sB(hZ(e,n.a,t)))):(SB(e),II(),II(),MFe)}function T6(e,t){var n;return Ik(e)&&Ik(t)&&YEe<(n=e+t)&&n>22),i=e.h+t.h+(r>>22),SM(n&HEe,r&HEe,i&GEe)}(Ik(e)?I2(e):e,Ik(t)?I2(t):t))}function A6(e,t){var n;return Ik(e)&&Ik(t)&&YEe<(n=e*t)&&n>13|(15&e.m)<<9,i=e.m>>4&8191,a=e.m>>17|(255&e.h)<<5,o=(1048320&e.h)>>8,b=r*(s=8191&t.l),m=i*s,w=a*s,v=o*s,0!=(c=t.l>>13|(15&t.m)<<9)&&(b+=n*c,m+=r*c,w+=i*c,v+=a*c),0!=(l=t.m>>4&8191)&&(m+=n*l,w+=r*l,v+=i*l),0!=(u=t.m>>17|(255&t.h)<<5)&&(w+=n*u,v+=r*u),0!=(f=(1048320&t.h)>>8)&&(v+=n*f),d=((g=n*s)>>22)+(b>>9)+((262143&m)<<4)+((31&w)<<17),p=(m>>18)+(w>>5)+((4095&v)<<8),p+=(d+=(h=(g&HEe)+((511&b)<<13))>>22)>>22,SM(h&=HEe,d&=HEe,p&=GEe)}(Ik(e)?I2(e):e,Ik(t)?I2(t):t))}function k6(e,t){var n;return Ik(e)&&Ik(t)&&YEe<(n=e-t)&&n-129&&e<128?(t=e+128,!(n=(FD(),$De)[t])&&(n=$De[t]=new Kh(e)),n):new Kh(e)}function G6(e){var t,n;return e>-129&&e<128?(t=e+128,!(n=(iD(),RDe)[t])&&(n=RDe[t]=new Xh(e)),n):new Xh(e)}function V6(e){var t;return e.k==(yoe(),f$e)&&((t=xL(Hae(e,(Nve(),RWe)),61))==(Lwe(),Q9e)||t==g7e)}function W6(e){var t;e.g&&(bhe((t=e.c.Of()?e.f:e.a).a,e.o,!0),bhe(t.a,e.o,!1),q3(e.o,(mve(),yZe),(Hie(),D9e)))}function q6(e){var t;if(!e.a)throw Jb(new Pv("Cannot offset an unassigned cut."));t=e.c-e.b,e.b+=t,Qz(e,t),Jz(e,t)}function X6(e,t,n){var r,i;return(i=Pue(e.b,t))&&(r=xL(Wbe(pZ(e,i),""),26))?Tue(e,r,t,n):null}function Y6(e,t){var n,r;for(r=new gI(e);r.e!=r.i.gc();)if(n=xL(aee(r),138),Ak(t)===Ak(n))return!0;return!1}function K6(){K6=S,O8e=new vA(kSe,0),I8e=new vA(SSe,1),M8e=new vA(_Se,2),C8e=new vA(PSe,3),N8e=new vA("UP",4)}function Z6(){Z6=S,c9e=new SA("INHERIT",0),s9e=new SA("INCLUDE_CHILDREN",1),l9e=new SA("SEPARATE_CHILDREN",2)}function Q6(){Q6=S,P3e=new dA("P1_STRUCTURE",0),L3e=new dA("P2_PROCESSING_ORDER",1),D3e=new dA("P3_EXECUTION",2)}function J6(e){return e=((e=((e-=e>>1&1431655765)>>2&858993459)+(858993459&e))>>4)+e&252645135,63&(e+=e>>8)+(e>>16)}function e8(e){var t,n,r;for(t=new $b,r=new td(e.b);r.a=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e>=48&&e<=57?e-48:0}function r8(e,t){return et?1:e==t?0==e?r8(1/e,1/t):0:isNaN(e)?isNaN(t)?0:1:-1}function i8(e){switch(e.g){case 2:return I8e;case 1:return M8e;case 4:return C8e;case 3:return N8e;default:return O8e}}function a8(e){switch(e.g){case 1:return m7e;case 2:return Q9e;case 3:return Z9e;case 4:return g7e;default:return b7e}}function o8(e){switch(e.g){case 1:return g7e;case 2:return m7e;case 3:return Q9e;case 4:return Z9e;default:return b7e}}function s8(e){switch(e.g){case 1:return Z9e;case 2:return g7e;case 3:return m7e;case 4:return Q9e;default:return b7e}}function c8(e,t){switch(e.b.g){case 0:case 1:return t;case 2:case 3:return new Sz(t.d,0,t.a,t.b);default:return null}}function l8(e){if(e.c)l8(e.c);else if(e.d)throw Jb(new Pv("Stream already terminated, can't be modified or used"))}function u8(e,t){var n;n=0!=(e.Bb&n_e),t?e.Bb|=n_e:e.Bb&=-4097,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new aX(e,1,12,n,t))}function f8(e,t){var n;n=0!=(e.Bb&uRe),t?e.Bb|=uRe:e.Bb&=-1025,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new aX(e,1,10,n,t))}function h8(e,t){var n;n=0!=(e.Bb&MRe),t?e.Bb|=MRe:e.Bb&=-2049,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new aX(e,1,11,n,t))}function d8(e,t){var n;n=0!=(e.Bb&CRe),t?e.Bb|=CRe:e.Bb&=-8193,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new aX(e,1,15,n,t))}function p8(e,t){var n,r,i;null==e.d?(++e.e,--e.f):(i=t.ad(),function(e,t,n){++e.e,--e.f,xL(e.d[t].Yc(n),133).bd()}(e,r=((n=t.Nh())&Jve)%e.d.length,Rue(e,r,n,i)))}function g8(e,t,n){var r,i;return e._i()?(i=e.aj(),r=qce(e,t,n),e.Vi(e.Ui(7,G6(n),r,t,i)),r):qce(e,t,n)}function b8(e,t){var n;for(n=new td(e.a);n.a=1?I8e:C8e:t}function k8(e){switch(xL(Hae(e,(Nve(),BWe)),301).g){case 1:q3(e,BWe,(MZ(),lWe));break;case 2:q3(e,BWe,(MZ(),fWe))}}function C8(e,t,n){var r,i;for(i=e.a.ec().Ic();i.Ob();)if(r=xL(i.Pb(),10),o3(n,xL($D(t,r.p),15)))return r;return null}function M8(e,t,n){var r;return yE(),CJ(r=new ec,t),xJ(r,n),e&&cK((!e.a&&(e.a=new iI(xet,e,5)),e.a),r),r}function I8(e,t,n,r){var i,a;return sB(r),sB(n),null==(a=null==(i=e.vc(t))?n:oS(xL(i,14),xL(n,15)))?e.zc(t):e.xc(t,a),a}function O8(e,t,n){var r;return r=e.a.get(t),e.a.set(t,void 0===n?null:n),void 0===r?(++e.c,B$(e.b)):++e.d,r}function N8(e){var t;return 0!=(64&e.Db)?Iue(e):((t=new BI(Iue(e))).a+=" (identifier: ",Fk(t,e.k),t.a+=")",t.a)}function R8(e){var t,n;for(t=new $b,n=new td(e.j);n.a>10)+a_e&pEe,t[1]=56320+(1023&e)&pEe,A7(t,0,t.length)}function F8(e){var t,n,r;for(t=new tR(e.Hd().gc()),r=0,n=wK(e.Hd().Ic());n.Ob();)JH(t,n.Pb(),G6(r++));return function(e){var t;switch(cz(),e.c.length){case 0:return VLe;case 1:return function(e,t){return cz(),hte(e,t),new FB(e,t)}((t=xL(wce(new td(e)),43)).ad(),t.bd());default:return new ov(xL(gee(e,HY(WLe,jye,43,e.c.length,0,1)),164))}}(t.a)}function U8(){var e,t,n;rae(),n=DFe+++Date.now(),e=dH(r.Math.floor(n*x_e))&A_e,t=dH(n-e*T_e),this.a=1502^e,this.b=t^S_e}function j8(e,t,n,r,i,a){this.e=new $b,this.f=(t1(),nJe),SL(this.e,e),this.d=t,this.a=n,this.b=r,this.f=i,this.c=a}function B8(e){var t;this.a=new PP(t=xL(e.e&&e.e(),9),xL(lR(t,t.length),9),0),this.b=HY(LLe,aye,1,this.a.a.length,5,1)}function z8(e,t){var n;switch(n=xL(QB(e.b,t),121).n,t.g){case 1:n.d=e.s;break;case 3:n.a=e.s}e.B&&(n.b=e.B.b,n.c=e.B.c)}function $8(e,t){switch(t.g){case 2:return e.b;case 1:return e.c;case 4:return e.d;case 3:return e.a;default:return!1}}function H8(e,t){if(t==e.d)return e.e;if(t==e.e)return e.d;throw Jb(new Rv("Node "+t+" not part of edge "+e))}function G8(e,t,n,r){if(t<0)tfe(e,n,r);else{if(!n.Dj())throw Jb(new Rv(lOe+n.ne()+uOe));xL(n,65).Ij().Oj(e,e.th(),t,r)}}function V8(e,t){var n,r;for(n=xee(e,0);n.b!=n.d.c;){if((r=Iv(NN(_W(n))))==t)return;if(r>t){CV(n);break}}pj(n,t)}function W8(e,t){var n,r;for(r=0,n=xL(t.Kb(e),19).Ic();n.Ob();)Av(ON(Hae(xL(n.Pb(),18),(Nve(),fqe))))||++r;return r}function q8(e,t){var n,r,i,a,o;if(n=t.f,Eee(e.c.d,n,t),null!=t.g)for(a=0,o=(i=t.g).length;a>>0).toString(16):e.toString()}function Z8(e,t,n,r){switch(t){case 3:return e.f;case 4:return e.g;case 5:return e.i;case 6:return e.j}return O6(e,t,n,r)}function Q8(e){return e.k==(yoe(),p$e)&&tX(new JD(null,new dj(new lU(NI(L8(e).a.Ic(),new p)))),new Hi)}function J8(e){var t,n,r;for(this.a=new zC,r=new td(e);r.a=a)return t.c+n;return t.c+t.b.gc()}function n9(e,t){var n,r;for(r=e.e.a.ec().Ic();r.Ob();)if(goe(t,(n=xL(r.Pb(),265)).d)||oce(t,n.d))return!0;return!1}function r9(e,t,n){var r,i;for(r=lH(n,l_e),i=0;0!=K4(r,0)&&it?1:bC(isNaN(e),isNaN(t))}function d9(e,t){e.hj();try{e.d.Tc(e.e++,t),e.f=e.d.j,e.g=-1}catch(e){throw RM(e=H2(e),73)?Jb(new Sm):Jb(e)}}function p9(e){switch(Lwe(),e.g){case 4:return Q9e;case 1:return Z9e;case 3:return g7e;case 2:return m7e;default:return b7e}}function g9(e){switch(e.g){case 0:return new zo;case 1:return new Go;default:throw Jb(new Rv(PTe+(null!=e.f?e.f:""+e.g)))}}function b9(e){switch(e.g){case 0:return new Ww;case 1:return new bw;default:throw Jb(new Rv(UMe+(null!=e.f?e.f:""+e.g)))}}function m9(e,t){var n;return e.d?UU(e.b,t)?xL(qj(e.b,t),52):(n=t.Hf(),zB(e.b,t,n),n):t.Hf()}function w9(e,t){var n;return Ak(e)===Ak(t)||!!RM(t,90)&&(n=xL(t,90),e.e==n.e&&e.d==n.d&&function(e,t){var n;for(n=e.d-1;n>=0&&e.a[n]===t[n];n--);return n<0}(e,n.a))}function v9(e,t){var n,r;for(r=new td(t);r.a0&&(r+=i,++n);return n>1&&(r+=e.d*(n-1)),r}function _9(e){var t,n,r;for((r=new ly).a+="[",t=0,n=e.gc();tl.d&&(f=l.d+l.a+o));n.c.d=f,t.a.xc(n,t),u=r.Math.max(u,n.c.d+n.c.a)}return u}(e),aS(new JD(null,new LG(e.d,16)),new Ud(e)),t}function I9(e){var t;return 0!=(64&e.Db)?m6(e):((t=new BI(m6(e))).a+=" (instanceClassName: ",Fk(t,e.D),t.a+=")",t.a)}function O9(e,t,n){var r,i;if(++e.j,n.dc())return!1;for(i=n.Ic();i.Ob();)r=i.Pb(),e.Ci(t,e.ji(t,r)),++t;return!0}function N9(e,t){var n;if(t){for(n=0;n0&&(e.lj(),-1!=Rue(e,((n=null==t?0:L4(t))&Jve)%e.d.length,n,t))}function j9(e,t){var n,r,i,a;for(a=Kfe(e.e.Og(),t),n=xL(e.g,118),i=0;i0&&(t.lengthe.i&&Gj(t,e.i,null),t}function z9(e,t){var n,r;return sM(),r=null,t==(n=CR((dv(),dv(),cDe)))&&(r=xL(fH(sDe,e),605)),r||(r=new aB(e),t==n&&rG(sDe,e,r)),r}function $9(e){var t;return uR(),t=new nM(xL(e.e.Xe((Ove(),R6e)),8)),e.A.Fc((Tpe(),R7e))&&(t.a<=0&&(t.a=20),t.b<=0&&(t.b=20)),t}function H9(e,t,n){var r,i,a;return e._i()?(r=e.i,a=e.aj(),E6(e,r,t),i=e.Ui(3,null,t,r,a),n?n.zi(i):n=i):E6(e,e.i,t),n}function G9(e,t){var n,r;return e.f>0&&(e.lj(),n=nle(e,((r=null==t?0:L4(t))&Jve)%e.d.length,r,t))?n.bd():null}function V9(e,t){var n,r,i;return!!RM(t,43)&&(r=(n=xL(t,43)).ad(),pB(i=_5(e.Pc(),r),n.bd())&&(null!=i||e.Pc()._b(r)))}function W9(e){return bte(),(e.q?e.q:(i$(),i$(),pFe))._b((mve(),nZe))?xL(Hae(e,nZe),196):xL(Hae(xB(e),rZe),196)}function q9(e,t){var n,r;return r=null,HO(e,(mve(),HZe))&&(n=xL(Hae(e,HZe),94)).Ye(t)&&(r=n.Xe(t)),null==r&&(r=Hae(xB(e),t)),r}function X9(){X9=S,V7e=new NA("SIMPLE",0),$7e=new NA("GROUP_DEC",1),G7e=new NA("GROUP_MIXED",2),H7e=new NA("GROUP_INC",3)}function Y9(){Y9=S,Pnt=new kc,knt=new Cc,Cnt=new Mc,Mnt=new Ic,Int=new Oc,Ont=new Nc,Nnt=new Rc,Rnt=new Pc,Lnt=new Lc}function K9(){K9=S,_7e=new tM(15),E7e=new iM((Ove(),U6e),_7e),x7e=new iM(S8e,15),S7e=new iM(l8e,G6(0)),y7e=new iM(Z5e,Nxe)}function Z9(e,t){var n,r;for(r=t.length,n=0;n>1,this.k=t-1>>1}function r7(e){if(null==e.b){for(;e.a.Ob();)if(e.b=e.a.Pb(),!xL(e.b,48).Ug())return!0;return e.b=null,!1}return!0}function i7(e,t){var n;if(RM(t,244)){n=xL(t,244);try{return 0==e.vd(n)}catch(e){if(!RM(e=H2(e),203))throw Jb(e)}}return!1}function a7(e,t){return hM(),hM(),eJ(rEe),(r.Math.abs(e-t)<=rEe||e==t||isNaN(e)&&isNaN(t)?0:et?1:bC(isNaN(e),isNaN(t)))>0}function o7(e,t){return hM(),hM(),eJ(rEe),(r.Math.abs(e-t)<=rEe||e==t||isNaN(e)&&isNaN(t)?0:et?1:bC(isNaN(e),isNaN(t)))<0}function s7(e){var t;0!=e.c&&(1==(t=xL($D(e.a,e.b),286)).b?(++e.b,e.bs)}(e.f,n,r)&&(function(e,t,n){var r,i;Nae(e.e,t,n,(Lwe(),m7e)),Nae(e.i,t,n,Z9e),e.a&&(i=xL(Hae(t,(Nve(),QWe)),11),r=xL(Hae(n,QWe),11),aV(e.g,i,r))}(e.f,e.a[t][n],e.a[t][r]),o=(a=e.a[t])[r],a[r]=a[n],a[n]=o,i=!0),i}function h7(e,t,n){var r,i,a;for(i=null,a=e.b;a;){if(r=e.a.ue(t,a.d),n&&0==r)return a;r>=0?a=a.a[1]:(i=a,a=a.a[0])}return i}function d7(e,t,n){var r,i,a;for(i=null,a=e.b;a;){if(r=e.a.ue(t,a.d),n&&0==r)return a;r<=0?a=a.a[0]:(i=a,a=a.a[1])}return i}function p7(e,t,n){var r,i,a;for(i=xL(qj(e.b,n),177),r=0,a=new td(t.j);a.a>5,t&=31,i=e.d+n+(0==t?0:1),function(e,t,n,r){var i,a,o;if(0==r)Abe(t,0,e,n,e.length-n);else for(o=32-r,e[e.length-1]=0,a=e.length-1;a>n;a--)e[a]|=t[a-n-1]>>>o,e[a-1]=t[a-n-1]<t.e?1:e.et.d?e.e:e.d=48&&e<48+r.Math.min(10,10)?e-48:e>=97&&e<97?e-97+10:e>=65&&e<65?e-65+10:-1}function N7(e,t){return hM(),hM(),eJ(rEe),(r.Math.abs(e-t)<=rEe||e==t||isNaN(e)&&isNaN(t)?0:et?1:bC(isNaN(e),isNaN(t)))<=0}function R7(e){switch(e.g){case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:return!0;default:return!1}}function P7(e,t){if(t.c==e)return t.d;if(t.d==e)return t.c;throw Jb(new Rv("Input edge is not connected to the input port."))}function L7(e){return Ghe(),K4(e,0)<0?0!=K4(e,-1)?new hie(-1,nK(e)):tFe:K4(e,10)<=0?rFe[zD(e)]:new hie(1,e)}function D7(e){var t,n;return K4(e,-129)>0&&K4(e,128)<0?(t=zD(e)+128,!(n=(DD(),DDe)[t])&&(n=DDe[t]=new Yh(e)),n):new Yh(e)}function F7(e,t){var n;return Ak(t)===Ak(e)||!!RM(t,21)&&(n=xL(t,21)).gc()==e.gc()&&e.Gc(n)}function U7(e){var t,n,r;if(!(r=e.Ug()))for(t=0,n=e.$g();n;n=n.$g()){if(++t>s_e)return n._g();if((r=n.Ug())||n==e)break}return r}function j7(e,t){var n,r;for(pG(t,e.length),n=e.charCodeAt(t),r=t+1;r=2*t&&SL(n,new nL(o[r-1]+t,o[r]-t));return n}(n,r),a=function(e){var t,n,r,i,a,o,s;for(a=new zC,n=new td(e);n.a2&&s.e.b+s.j.b<=2&&(i=s,r=o),a.a.xc(i,a),i.q=r);return a}(t),aS(MQ(new JD(null,new LG(a,1)),new vo),new _z(e,n,i,r)))}function W7(e,t,n){var r;0!=(e.Db&t)?null==n?function(e,t){var n,r,i,a,o,s,c;if(1==(r=J6(254&e.Db)))e.Eb=null;else if(a=KQ(e.Eb),2==r)i=wne(e,t),e.Eb=a[0==i?1:0];else{for(o=HY(LLe,aye,1,r-1,5,1),n=2,s=0,c=0;n<=128;n<<=1)n==t?++s:0!=(e.Db&n)&&(o[c++]=a[s++]);e.Eb=o}e.Db&=~t}(e,t):-1==(r=wne(e,t))?e.Eb=n:Gj(KQ(e.Eb),r,n):null!=n&&function(e,t,n){var r,i,a,o,s,c;if(0==(i=J6(254&e.Db)))e.Eb=n;else{if(1==i)o=HY(LLe,aye,1,2,5,1),0==wne(e,t)?(o[0]=n,o[1]=e.Eb):(o[0]=e.Eb,o[1]=n);else for(o=HY(LLe,aye,1,i+1,5,1),a=KQ(e.Eb),r=2,s=0,c=0;r<=128;r<<=1)r==t?o[c++]=n:0!=(e.Db&r)&&(o[c++]=a[s++]);e.Eb=o}e.Db|=t}(e,t,n)}function q7(e){var t;return 0==(32&e.Db)&&0!=(t=Oj(xL(k2(e,16),26)||e.uh())-Oj(e.uh()))&&W7(e,32,HY(LLe,aye,1,t,5,1)),e}function X7(e,t){return sB(e),null!=t&&(!!eP(e,t)||e.length==t.length&&eP(e.toLowerCase(),t.toLowerCase()))}function Y7(e,t,n){var r,i,a;for(a=new td(n.a);a.aS&&(g.c=S-g.b),SL(s.d,new OF(g,c8(s,g))),v=t==Q9e?r.Math.max(v,b.b+u.b.pf().b):r.Math.min(v,b.b));for(v+=t==Q9e?e.s:-e.s,(y=M9((s.e=v,s)))>0&&(xL(QB(e.b,t),121).a.b=y),f=d.Ic();f.Ob();)!(u=xL(f.Pb(),110)).c||u.c.d.c.length<=0||((g=u.c.i).c-=u.e.a,g.d-=u.e.b)}else Cwe(e,t)}(e,t):Cwe(e,t):e.t.Fc(q9e)&&(n?function(e,t){var n,i,a,o,s,c,l,u,f,h,d,p,g,b,m,w;if((f=xL(xL(MX(e.r,t),21),81)).gc()<=2||t==(Lwe(),Z9e)||t==(Lwe(),m7e))Vwe(e,t);else{for(b=e.t.Fc((lae(),X9e)),n=t==(Lwe(),Q9e)?(F2(),Bje):(F2(),Fje),w=t==Q9e?(CZ(),oje):(CZ(),cje),i=xy(OP(n),e.s),m=t==Q9e?e_e:t_e,u=f.Ic();u.Ob();)!(c=xL(u.Pb(),110)).c||c.c.d.c.length<=0||(g=c.b.pf(),p=c.e,(d=(h=c.c).i).b=(o=h.n,h.e.a+o.b+o.c),d.a=(s=h.n,h.e.b+s.d+s.a),b?(d.c=p.a-(a=h.n,h.e.a+a.b+a.c)-e.s,b=!1):d.c=p.a+g.a+e.s,oB(w,xSe),h.f=w,lK(h,(IK(),tje)),SL(i.d,new OF(d,c8(i,d))),m=t==Q9e?r.Math.min(m,p.b):r.Math.max(m,p.b+c.b.pf().b));for(m+=t==Q9e?-e.s:e.s,M9((i.e=m,i)),l=f.Ic();l.Ob();)!(c=xL(l.Pb(),110)).c||c.c.d.c.length<=0||((d=c.c.i).c-=c.e.a,d.d-=c.e.b)}}(e,t):Vwe(e,t))}function cee(e){var t;Ak(gue(e,(Ove(),g6e)))===Ak((Z6(),c9e))&&($H(e)?(t=xL(gue($H(e),g6e),332),Zee(e,g6e,t)):Zee(e,g6e,l9e))}function lee(e,t,n){return new Sz(r.Math.min(e.a,t.a)-n/2,r.Math.min(e.b,t.b)-n/2,r.Math.abs(e.a-t.a)+n,r.Math.abs(e.b-t.b)+n)}function uee(e,t,n){var r,i,a;r=t.c.p,a=t.p,e.b[r][a]=new O$(e,t),n&&(e.a[r][a]=new Qp(t),(i=xL(Hae(t,(Nve(),zWe)),10))&&Xce(e.d,i,t))}function fee(e,t,n){var r;if(!n[t.d])for(n[t.d]=!0,r=new td(Y8(t));r.a=64&&t<128&&(i=uH(i,uD(1,t-64)));return i}function pee(e,t,n,r){var i;if(t>=(i=e.length))return i;for(t=t>0?t:0;tr&&Gj(t,r,null),t}function bee(e,t){var n,r;for(r=e.a.length,t.lengthr&&Gj(t,r,null),t}function mee(e){this.d=new $b,this.e=new wq,this.c=HY(Eit,kEe,24,(Lwe(),m3(ay(M7e,1),sTe,61,0,[b7e,Q9e,Z9e,g7e,m7e])).length,15,1),this.b=e}function wee(e){var t;this.d=new $b,this.j=new lE,this.g=new lE,t=e.g.b,this.f=xL(Hae(xB(t),(mve(),hKe)),108),this.e=Mv(NN(zee(t,GZe)))}function vee(e,t,n){var r;switch(r=n[e.g][t],e.g){case 1:case 3:return new HA(0,r);case 2:case 4:return new HA(r,0);default:return null}}function yee(e,t,n){var r,i,a,o;return r=null,(a=Ume(e1(),t))&&(i=null,null!=(o=Ame(a,n))&&(i=e.Ze(a,o)),r=i),r}function Eee(e,t,n){var r,i,a;return(i=xL(qj(e.e,t),382))?(a=oR(i,n),ZM(e,i),a):(r=new EL(e,t,n),zB(e.e,t,r),pH(r),null)}function _ee(e,t,n,r){var i,a;for(fle(),i=0,a=0;a=e.b>>1)for(r=e.c,n=e.b;n>t;--n)r=r.b;else for(r=e.a.a,n=0;n=0?e.gh(i):Vce(e,r):n<0?Vce(e,r):xL(r,65).Ij().Nj(e,e.th(),n)}function Uee(e){var t,n;for(!e.o&&(e.o=new iK((uve(),pet),qet,e,0)),t=(n=e.o).c.Ic();t.e!=t.i.gc();)xL(t.ij(),43).bd();return BY(n)}function jee(){jee=S,Ove(),ABe=g8e,yBe=h6e,gBe=Z5e,EBe=U6e,Mre(),xBe=CUe,SBe=AUe,TBe=IUe,_Be=TUe,u5(),mBe=fBe,bBe=uBe,wBe=dBe,vBe=pBe}function Bee(e){switch(yS(),this.c=new $b,this.d=e,e.g){case 0:case 2:this.a=sz(r$e),this.b=e_e;break;case 3:case 1:this.a=r$e,this.b=t_e}}function zee(e,t){var n,r;return r=null,HO(e,(Ove(),v8e))&&(n=xL(Hae(e,v8e),94)).Ye(t)&&(r=n.Xe(t)),null==r&&xB(e)&&(r=Hae(xB(e),t)),r}function $ee(e,t){var n;return n=xL(Hae(e,(mve(),FKe)),74),qM(t,a$e)?n?qz(n):(n=new mw,q3(e,FKe,n)):n&&q3(e,FKe,null),n}function Hee(e,t){var n,r,i,a;for(i$(),n=e,a=t,RM(e,21)&&!RM(t,21)&&(n=t,a=e),i=n.Ic();i.Ob();)if(r=i.Pb(),a.Fc(r))return!1;return!0}function Gee(e,t,n){var r;t.a.length>0&&(SL(e.b,new mL(t.a,n)),0<(r=t.a.length)?t.a=t.a.substr(0,0):0>r&&(t.a+=WM(HY(yit,dEe,24,-r,15,1))))}function Vee(e,t){var n,r,i;for(n=e.o,i=xL(xL(MX(e.r,t),21),81).Ic();i.Ob();)(r=xL(i.Pb(),110)).e.a=Fne(r,n.a),r.e.b=n.b*Mv(NN(r.b.Xe(Dje)))}function Wee(e){var t;return(t=new fy).a+="n",e.k!=(yoe(),p$e)&&Bk(Bk((t.a+="(",t),VO(e.k).toLowerCase()),")"),Bk((t.a+="_",t),Une(e)),t.a}function qee(e,t,n,r){var i;return n>=0?e.bh(t,n,r):(e.$g()&&(r=(i=e.Qg())>=0?e.Lg(r):e.$g().dh(e,-1-i,null,r)),e.Ng(t,n,r))}function Xee(e,t,n){var r,i;if(t>=(i=e.gc()))throw Jb(new PR(t,i));if(e.ci()&&(r=e.Vc(n))>=0&&r!=t)throw Jb(new Rv(cNe));return e.hi(t,n)}function Yee(e,t,n){var r,i,a,o;return-1!=(r=e.Vc(t))&&(e._i()?(a=e.aj(),o=Vne(e,r),i=e.Ui(4,o,null,r,a),n?n.zi(i):n=i):Vne(e,r)),n}function Kee(e,t){switch(t){case 7:return!e.e&&(e.e=new VR(Cet,e,7,4)),void lme(e.e);case 8:return!e.d&&(e.d=new VR(Cet,e,8,5)),void lme(e.d)}P9(e,t)}function Zee(e,t,n){return null==n?(!e.o&&(e.o=new iK((uve(),pet),qet,e,0)),k7(e.o,t)):(!e.o&&(e.o=new iK((uve(),pet),qet,e,0)),Xre(e.o,t,n)),e}function Qee(e,t){this.e=e,tn.b)return!0}return!1}function rte(e,t){return Mk(e)?!!qve[t]:e.cm?!!e.cm[t]:Ck(e)?!!Wve[t]:!!kk(e)&&!!Vve[t]}function ite(e){var t;if(Z4(e))return hF(e),e.Gk()&&(t=Wce(e.e,e.b,e.c,e.a,e.j),e.j=t),e.g=e.a,++e.a,++e.c,e.i=0,e.j;throw Jb(new mm)}function ate(e,t,n,r){var i,a,o;return a=mQ(e.Og(),t),(i=t-e.vh())<0?(o=e.Tg(a))>=0?e.Wg(o,n,!0):Jce(e,a,n):xL(a,65).Ij().Kj(e,e.th(),i,n,r)}function ote(e,t,n,r){var i,a;n.hh(t)&&(YS(),RZ(t)?function(e,t){var n,r,i,a;for(r=0,i=t.gc();r0||e==(zw(),$Le)||t==($w(),HLe))throw Jb(new Rv("Invalid range: "+HW(e,t)))}function hte(e,t){if(null==e)throw Jb(new Dv("null key in entry: null="+t));if(null==t)throw Jb(new Dv("null value in entry: "+e+"=null"))}function dte(e,t){var n,r;if((r=ore(e,t))>=0)return r;if(e.Ak())for(n=0;n0),(t&-t)==t)return dH(t*Fue(e,31)*4.656612873077393e-10);do{r=(n=Fue(e,31))%t}while(n-r+(t-1)<0);return dH(r)}function vte(e){var t,n,r;return kR(),null!=(r=sUe[n=":"+e])?dH((sB(r),r)):(t=null==(r=oUe[n])?function(e){var t,n,r,i;for(t=0,i=(r=e.length)-4,n=0;n0)for(r=new AP(xL(MX(e.a,a),21)),i$(),wM(r,new Yd(t)),i=new FV(a.b,0);i.b(c=null==e.d?0:e.d.length)){for(u=e.d,e.d=HY(Zet,cRe,60,2*c+4,0,1),a=0;a102?-1:e<=57?e-48:e<65?-1:e<=70?e-65+10:e<97?-1:e-97+10}function Wte(e){var t;if(t=function(e){var t;for(cj(e),uP(!0,"numberToAdvance must be nonnegative"),t=0;t<0&&Wle(e);t++)qq(e);return t}(e),!Wle(e))throw Jb(new Sv("position (0) must be less than the number of elements that remained ("+t+")"));return qq(e)}function qte(e,t){var n;return n=m3(ay(Tit,1),o_e,24,15,[S5(e.a[0],t),S5(e.a[1],t),S5(e.a[2],t)]),e.d&&(n[0]=r.Math.max(n[0],n[2]),n[2]=n[0]),n}function Xte(e,t){var n;return n=m3(ay(Tit,1),o_e,24,15,[x5(e.a[0],t),x5(e.a[1],t),x5(e.a[2],t)]),e.d&&(n[0]=r.Math.max(n[0],n[2]),n[2]=n[0]),n}function Yte(e,t,n){aP(xL(Hae(t,(mve(),yZe)),100))||(IZ(e,t,Boe(t,n)),IZ(e,t,Boe(t,(Lwe(),g7e))),IZ(e,t,Boe(t,Q9e)),i$(),wM(t.j,new Yp(e)))}function Kte(e){var t,n;for(e.c||function(e){var t,n,i,a,o,s;if(a=new FV(e.e,0),i=new FV(e.a,0),e.d)for(n=0;nBCe;){for(o=t,s=0;r.Math.abs(t-o)0),a.a.Xb(a.c=--a.b),Age(e,e.b-s,o,i,a),wO(a.b0),i.a.Xb(i.c=--i.b)}if(!e.d)for(n=0;n0||!o&&0==s))}(e,n,r.d,i,a,o,s)&&t.Dc(r),(l=r.a[1])&&ine(e,t,n,l,i,a,o,s))}function ane(e,t,n){try{Sde(e,t+e.j,n+e.k,!1,!0)}catch(e){throw RM(e=H2(e),73)?Jb(new Sv(e.g+VSe+t+rye+n+").")):Jb(e)}}function one(e,t,n){try{Sde(e,t+e.j,n+e.k,!0,!1)}catch(e){throw RM(e=H2(e),73)?Jb(new Sv(e.g+VSe+t+rye+n+").")):Jb(e)}}function sne(e,t){var n,r;if(n=xL(BQ(e.g,t),34))return n;if(r=xL(BQ(e.j,t),122))return r;throw Jb(new Wv("Referenced shape does not exist: "+t))}function cne(e,t){var n,r,i,a;for(a=e.gc(),t.lengtha&&Gj(t,a,null),t}function lne(e,t){var n,r,i;return n=t.ad(),i=t.bd(),r=e.vc(n),!(!(Ak(i)===Ak(r)||null!=i&&C6(i,r))||null==r&&!e._b(n))}function une(e,t,n,r){var i,a;this.a=t,this.c=r,function(e,t){e.b=t}(this,new HA(-(i=e.a).c,-i.d)),MR(this.b,n),a=r/2,t.a?YO(this.b,0,a):YO(this.b,a,0),SL(e.c,this)}function fne(e,t){if(e.c==t)return e.d;if(e.d==t)return e.c;throw Jb(new Rv("Node 'one' must be either source or target of edge 'edge'."))}function hne(e,t){if(e.c.i==t)return e.d.i;if(e.d.i==t)return e.c.i;throw Jb(new Rv("Node "+t+" is neither source nor target of edge "+e))}function dne(){dne=S,z2e=new uA(FTe,0),j2e=new uA(JTe,1),B2e=new uA("EDGE_LENGTH_BY_POSITION",2),U2e=new uA("CROSSING_MINIMIZATION_BY_POSITION",3)}function pne(e){var t;if(!e.C&&(null!=e.D||null!=e.B))if(t=function(e){var t,n,r,i;if(-1!=(t=mC(n=null!=e.D?e.D:e.B,_ae(91)))){r=n.substr(0,t),i=new ly;do{i.a+="["}while(-1!=(t=IO(n,91,++t)));eP(r,Yve)?i.a+="Z":eP(r,IRe)?i.a+="B":eP(r,ORe)?i.a+="C":eP(r,NRe)?i.a+="D":eP(r,RRe)?i.a+="F":eP(r,PRe)?i.a+="I":eP(r,LRe)?i.a+="J":eP(r,DRe)?i.a+="S":(i.a+="L",i.a+=""+r,i.a+=";");try{return null}catch(e){if(!RM(e=H2(e),59))throw Jb(e)}}else if(-1==mC(n,_ae(46))){if(eP(n,Yve))return _it;if(eP(n,IRe))return xit;if(eP(n,ORe))return yit;if(eP(n,NRe))return Tit;if(eP(n,RRe))return Ait;if(eP(n,PRe))return Eit;if(eP(n,LRe))return Sit;if(eP(n,DRe))return kit}return null}(e),t)e.tk(t);else try{e.tk(null)}catch(e){if(!RM(e=H2(e),59))throw Jb(e)}return e.C}function gne(e,t){var n;switch(t.g){case 2:case 4:n=e.a,e.c.d.n.b0&&(c+=i),l[u]=o,o+=s*(c+r)}function mne(e){var t,n,r;for(r=e.f,e.n=HY(Tit,o_e,24,r,15,1),e.d=HY(Tit,o_e,24,r,15,1),t=0;t=0;t--)if(eP(e[t].d,"Ey")||eP(e[t].d,"Sx")){e.length>=t+1&&e.splice(0,t+1);break}return e}(oDe.ce(e)))),t=0,n=e.j.length;t0&&(a.b+=t),a}function Nne(e,t){var n,i,a;for(a=new lE,i=e.Ic();i.Ob();)Vde(n=xL(i.Pb(),38),0,a.b),a.b+=n.f.b+t,a.a=r.Math.max(a.a,n.f.a);return a.a>0&&(a.a+=t),a}function Rne(e,t){var n,r;if(0==t.length)return 0;for(n=Jj(e.a,t[0],(Lwe(),m7e)),n+=Jj(e.a,t[t.length-1],Z9e),r=0;r>16==6?e.Cb.dh(e,5,Ret,t):(n=Ote(xL(mQ(xL(k2(e,16),26)||e.uh(),e.Db>>16),17)),e.Cb.dh(e,n.n,n.f,t))}function Dne(e){var t,n,i;e.b==e.c&&(i=e.a.length,n=H3(r.Math.max(8,i))<<1,0!=e.b?(F1(e,t=lR(e.a,n),i),e.a=t,e.b=0):Mm(e.a,n),e.c=i)}function Fne(e,t){var n;return(n=e.b).Ye((Ove(),Z6e))?n.Ef()==(Lwe(),m7e)?-n.pf().a-Mv(NN(n.Xe(Z6e))):t+Mv(NN(n.Xe(Z6e))):n.Ef()==(Lwe(),m7e)?-n.pf().a:t}function Une(e){var t;return 0!=e.b.c.length&&xL($D(e.b,0),69).a?xL($D(e.b,0),69).a:null!=(t=Cz(e))?t:""+(e.c?YK(e.c.a,e,0):-1)}function jne(e){var t;return 0!=e.f.c.length&&xL($D(e.f,0),69).a?xL($D(e.f,0),69).a:null!=(t=Cz(e))?t:""+(e.i?YK(e.i.j,e,0):-1)}function Bne(e,t){var n,r;if(t<0||t>=e.gc())return null;for(n=t;n=e.i)throw Jb(new iC(t,e.i));return++e.j,n=e.g[t],(r=e.i-t-1)>0&&Abe(e.g,t+1,e.g,t,r),Gj(e.g,--e.i,null),e.ai(t,n),e.Zh(),n}function Wne(e,t){var n,r;n=e.Xc(t);try{return r=n.Pb(),n.Qb(),r}catch(e){throw RM(e=H2(e),114)?Jb(new Sv("Can't remove element "+t)):Jb(e)}}function qne(e,t){var n,r,i;return!((i=e.h-t.h)<0||(n=e.l-t.l,(i+=(r=e.m-t.m+(n>>22))>>22)<0||(e.l=n&HEe,e.m=r&HEe,e.h=i&GEe,0)))}function Xne(e,t,n){var r,i;return D5(i=new Mw,t),o0(i,n),cK((!e.c&&(e.c=new AU(Btt,e,12,10)),e.c),i),MJ(r=i,0),IJ(r,1),D6(r,!0),B6(r,!0),r}function Yne(e,t){var n;return e.Db>>16==17?e.Cb.dh(e,21,Ntt,t):(n=Ote(xL(mQ(xL(k2(e,16),26)||e.uh(),e.Db>>16),17)),e.Cb.dh(e,n.n,n.f,t))}function Kne(e){var t,n,r,i,a;for(i=Jve,a=null,r=new td(e.d);r.an.a.c.length))throw Jb(new Rv("index must be >= 0 and <= layer node count"));e.c&&KK(e.c.a,e),e.c=n,n&&mF(n.a,t,e)}function Jne(e,t,n){var r,i,a,o,s,c;for(c=0,i=0,a=(r=e.a[t]).length;i>16==6?e.Cb.dh(e,6,Cet,t):(n=Ote(xL(mQ(xL(k2(e,16),26)||(uve(),cet),e.Db>>16),17)),e.Cb.dh(e,n.n,n.f,t))}function dre(e,t){var n;return e.Db>>16==7?e.Cb.dh(e,1,Tet,t):(n=Ote(xL(mQ(xL(k2(e,16),26)||(uve(),fet),e.Db>>16),17)),e.Cb.dh(e,n.n,n.f,t))}function pre(e,t){var n;return e.Db>>16==9?e.Cb.dh(e,9,Let,t):(n=Ote(xL(mQ(xL(k2(e,16),26)||(uve(),det),e.Db>>16),17)),e.Cb.dh(e,n.n,n.f,t))}function gre(e,t){var n;return e.Db>>16==5?e.Cb.dh(e,9,Dtt,t):(n=Ote(xL(mQ(xL(k2(e,16),26)||(Fve(),Qtt),e.Db>>16),17)),e.Cb.dh(e,n.n,n.f,t))}function bre(e,t){var n;return e.Db>>16==7?e.Cb.dh(e,6,Ret,t):(n=Ote(xL(mQ(xL(k2(e,16),26)||(Fve(),snt),e.Db>>16),17)),e.Cb.dh(e,n.n,n.f,t))}function mre(e,t){var n;return e.Db>>16==3?e.Cb.dh(e,0,Iet,t):(n=Ote(xL(mQ(xL(k2(e,16),26)||(Fve(),Vtt),e.Db>>16),17)),e.Cb.dh(e,n.n,n.f,t))}function wre(e,t){var n;return e.Db>>16==3?e.Cb.dh(e,12,Let,t):(n=Ote(xL(mQ(xL(k2(e,16),26)||(uve(),set),e.Db>>16),17)),e.Cb.dh(e,n.n,n.f,t))}function vre(){this.a=new oc,this.g=new Pte,this.j=new Pte,this.b=new Hb,this.d=new Pte,this.i=new Pte,this.k=new Hb,this.c=new Hb,this.e=new Hb,this.f=new Hb}function yre(e,t){var n,r;if(t){if(t==e)return!0;for(n=0,r=xL(t,48).$g();r&&r!=t;r=r.$g()){if(++n>s_e)return yre(e,r);if(r==e)return!0}}return!1}function Ere(e){var t;return 0==(1&e.Bb)&&e.r&&e.r.fh()&&(t=xL(e.r,48),e.r=xL(Q5(e,t),138),e.r!=t&&0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,9,8,t,e.r))),e.r}function _re(e,t){var n;return Ik(e)&&Ik(t)&&YEe<(n=e/t)&&n>16==11?e.Cb.dh(e,10,Let,t):(n=Ote(xL(mQ(xL(k2(e,16),26)||(uve(),het),e.Db>>16),17)),e.Cb.dh(e,n.n,n.f,t))}function Are(e,t){var n;return e.Db>>16==10?e.Cb.dh(e,11,Ntt,t):(n=Ote(xL(mQ(xL(k2(e,16),26)||(Fve(),ant),e.Db>>16),17)),e.Cb.dh(e,n.n,n.f,t))}function kre(e,t){var n;return e.Db>>16==10?e.Cb.dh(e,12,jtt,t):(n=Ote(xL(mQ(xL(k2(e,16),26)||(Fve(),cnt),e.Db>>16),17)),e.Cb.dh(e,n.n,n.f,t))}function Cre(e,t){var n,r,i,a,o,s;return(o=e.h>>19)!=(s=t.h>>19)?s-o:(r=e.h)!=(a=t.h)?r-a:(n=e.m)!=(i=t.m)?n-i:e.l-t.l}function Mre(){Mre=S,dde(),IUe=new rC(lSe,OUe=UUe),hQ(),CUe=new rC(uSe,MUe=_Ue),Oee(),AUe=new rC(fSe,kUe=wUe),TUe=new rC(hSe,(pO(),!0))}function Ire(e,t,n){var r,i;r=t*n,RM(e.g,145)?(i=SW(e)).f.d?i.f.a||(e.d.a+=r+CSe):(e.d.d-=r+CSe,e.d.a+=r+CSe):RM(e.g,10)&&(e.d.d-=r,e.d.a+=2*r)}function Ore(e,t,n){var i,a,o,s,c;for(a=e[n.g],c=new td(t.d);c.as&&(c=s/i),(a=r.Math.abs(e.b))>o&&(l=o/a),nI(e,r.Math.min(c,l)),e}function Ure(){JS.call(this),this.e=-1,this.a=!1,this.p=iEe,this.k=-1,this.c=-1,this.b=-1,this.g=!1,this.f=-1,this.j=-1,this.n=-1,this.i=-1,this.d=-1,this.o=iEe}function jre(){jre=S,kze=zF(AD(AD(AD(new nW,(Gae(),Rze),(Pve(),oHe)),Rze,uHe),Pze,mHe),Pze,X$e),Mze=AD(AD(new nW,Rze,U$e),Rze,Y$e),Cze=zF(new nW,Pze,Z$e)}function Bre(e,t){var n,r,i,a;for(a=new Hb,t.e=null,t.f=null,r=new td(t.i);r.a=0?t:-t;r>0;)r%2==0?(n*=n,r=r/2|0):(i*=n,r-=1);return t<0?1/i:i}(e,e)/f6(2.718281828459045,e))}function Vre(e,t,n,r){switch(n){case 7:return!e.e&&(e.e=new VR(Cet,e,7,4)),H9(e.e,t,r);case 8:return!e.d&&(e.d=new VR(Cet,e,8,5)),H9(e.d,t,r)}return gae(e,t,n,r)}function Wre(e,t,n,r){switch(n){case 7:return!e.e&&(e.e=new VR(Cet,e,7,4)),Yee(e.e,t,r);case 8:return!e.d&&(e.d=new VR(Cet,e,8,5)),Yee(e.d,t,r)}return n3(e,t,n,r)}function qre(e){if(-1==e.g)throw Jb(new ym);e.hj();try{e.i.Yc(e.g),e.f=e.i.j,e.g0&&(i=nle(e,(a&Jve)%e.d.length,a,t))?i.cd(n):(r=e.oj(a,t,n),e.c.Dc(r),null)}function Yre(e,t){var n,r,i,a;switch(S6(e,t).Wk()){case 3:case 2:for(i=0,a=(n=Ebe(t)).i;i=0?(n=_re(e,XEe),r=a9(e,XEe)):(n=_re(t=fD(e,1),5e8),r=T6(uD(r=a9(t,5e8),1),lH(e,1))),uH(uD(r,32),lH(n,l_e))}function Zre(e,t){var n,i,a,o;for(o=0,a=xL(xL(MX(e.r,t),21),81).Ic();a.Ob();)i=xL(a.Pb(),110),o=r.Math.max(o,i.e.a+i.b.pf().a);(n=xL(QB(e.b,t),121)).n.b=0,n.a.a=o}function Qre(e,t){var n,i,a,o;for(n=0,o=xL(xL(MX(e.r,t),21),81).Ic();o.Ob();)a=xL(o.Pb(),110),n=r.Math.max(n,a.e.b+a.b.pf().b);(i=xL(QB(e.b,t),121)).n.d=0,i.a.b=n}function Jre(e,t){if(t==e.c.i)return e.d.i;if(t==e.d.i)return e.c.i;throw Jb(new Rv("'node' must either be the source node or target node of the edge."))}function eie(e,t){var n;if(n=!1,Mk(t)&&(n=!0,uB(e,new lj(RN(t)))),n||RM(t,236)&&(n=!0,uB(e,new lh(SP(xL(t,236))))),!n)throw Jb(new Tv(WOe))}function tie(e,t){var n;if(e.ii()&&null!=t){for(n=0;n0&&(e.b+=2,e.a+=i):(e.b+=1,e.a+=r.Math.min(i,a))}function iie(e){var t,n;switch(xL(Hae(xB(e),(mve(),DKe)),414).g){case 0:return t=e.n,n=e.o,new HA(t.a+n.a/2,t.b+n.b/2);case 1:return new nM(e.n);default:return null}}function aie(){aie=S,RVe=new yT(FTe,0),NVe=new yT("LEFTUP",1),LVe=new yT("RIGHTUP",2),OVe=new yT("LEFTDOWN",3),PVe=new yT("RIGHTDOWN",4),IVe=new yT("BALANCED",5)}function oie(e,t,n){switch(t){case 1:return!e.n&&(e.n=new AU(Pet,e,1,7)),lme(e.n),!e.n&&(e.n=new AU(Pet,e,1,7)),void Bj(e.n,xL(n,15));case 2:return void d1(e,RN(n))}N4(e,t,n)}function sie(e,t,n){switch(t){case 3:return void vJ(e,Mv(NN(n)));case 4:return void yJ(e,Mv(NN(n)));case 5:return void EJ(e,Mv(NN(n)));case 6:return void _J(e,Mv(NN(n)))}oie(e,t,n)}function cie(e,t,n){var r,i;(r=mae(i=new Mw,t,null))&&r.Ai(),o0(i,n),cK((!e.c&&(e.c=new AU(Btt,e,12,10)),e.c),i),MJ(i,0),IJ(i,1),D6(i,!0),B6(i,!0)}function lie(e,t){var n,r;return RM(n=ix(e.g,t),234)?((r=xL(n,234)).Lh(),r.Ih()):RM(n,490)?r=xL(n,1910).b:null}function uie(e,t,n,r){var i,a;return cj(t),cj(n),JK(!!(a=xL(_P(e.d,t),20)),"Row %s not in %s",t,e.e),JK(!!(i=xL(_P(e.b,n),20)),"Column %s not in %s",n,e.c),b3(e,a.a,i.a,r)}function fie(e,t,n,r,i,a,o){var s,c,l,u,f;if(f=_ne(s=(l=a==o-1)?r:0,u=i[a]),10!=r&&m3(ay(e,o-a),t[a],n[a],s,f),!l)for(++a,c=0;c1||-1==s?(a=xL(c,14),i.Wb(function(e,t){var n,r,i;for(r=new dY(t.gc()),n=t.Ic();n.Ob();)(i=Ape(e,xL(n.Pb(),55)))&&(r.c[r.c.length]=i);return r}(e,a))):i.Wb(Ape(e,xL(c,55))))}function Eie(){Eie=S,V5e=new wA("V_TOP",0),G5e=new wA("V_CENTER",1),H5e=new wA("V_BOTTOM",2),z5e=new wA("H_LEFT",3),B5e=new wA("H_CENTER",4),$5e=new wA("H_RIGHT",5)}function _ie(e){var t;return 0!=(64&e.Db)?I9(e):((t=new BI(I9(e))).a+=" (abstract: ",jE(t,0!=(256&e.Bb)),t.a+=", interface: ",jE(t,0!=(512&e.Bb)),t.a+=")",t.a)}function Sie(e,t){var n,i,a,o,s;for(s=e.e,a=0,o=0,i=new td(e.a);i.a0&&Jne(this,this.c-1,(Lwe(),Z9e)),this.c0&&e[0].length>0&&(this.c=Av(ON(Hae(xB(e[0][0]),(Nve(),HWe))))),this.a=HY(UJe,kye,1987,e.length,0,2),this.b=HY(GJe,kye,1988,e.length,0,2),this.d=new O5}function Bie(e){return 0!=e.c.length&&((dG(0,e.c.length),xL(e.c[0],18)).c.i.k==(yoe(),d$e)||tX(uz(new JD(null,new LG(e,16)),new Ca),new Ma))}function zie(e,t,n){return Qie(n,"Tree layout",1),YV(e.b),tj(e.b,(rre(),q1e),q1e),tj(e.b,X1e,X1e),tj(e.b,Y1e,Y1e),tj(e.b,K1e,K1e),e.a=mme(e.b,t),function(e,t,n){var r,i,a;if(!(i=n)&&(i=new qw),Qie(i,"Layout",e.a.c.length),Av(ON(Hae(t,(xoe(),R0e)))))for(Y_(),r=0;r=0;t--)PFe[t]=r,r*=.5;for(n=1,e=24;e>=0;e--)RFe[e]=n,n*=.5}function iae(e){var t,n;if(Av(ON(gue(e,(mve(),RKe)))))for(n=new lU(NI(efe(e).a.Ic(),new p));Wle(n);)if(Zce(t=xL(qq(n),80))&&Av(ON(gue(t,PKe))))return!0;return!1}function aae(e,t){var n,r,i;ZU(e.f,t)&&(t.b=e,r=t.c,-1!=YK(e.j,r,0)||SL(e.j,r),i=t.d,-1!=YK(e.j,i,0)||SL(e.j,i),0!=(n=t.a.b).c.length&&(!e.i&&(e.i=new wee(e)),function(e,t){var n,r;for(r=new td(t);r.a=e.f)break;a.c[a.c.length]=n}return a}function pae(e){var t,n,r,i;for(t=null,i=new td(e.uf());i.a0&&Abe(e.g,t,e.g,t+r,s),o=n.Ic(),e.i+=r,i=0;ia&&FU(l,XZ(n[s],kFe))&&(i=s,a=c);return i>=0&&(r[0]=t+a),i}function Eae(e,t,n){Qie(n,"Grow Tree",1),e.b=t.f,Av(ON(Hae(t,(g2(),Jje))))?(e.c=new et,EG(e,null)):e.c=new et,e.a=!1,$fe(e,t.f),q3(t,eBe,(pO(),!!e.a)),Toe(n)}function _ae(e){var t,n;return e>=i_e?(t=a_e+(e-i_e>>10&1023)&pEe,n=56320+(e-i_e&1023)&pEe,String.fromCharCode(t)+""+String.fromCharCode(n)):String.fromCharCode(e&pEe)}function Sae(e,t,n,r,i){var a,o,s;for(a=Ohe(e,t,n,r,i),s=!1;!a;)Aue(e,i,!0),s=!0,a=Ohe(e,t,n,r,i);s&&Aue(e,i,!1),0!=(o=E3(i)).c.length&&(e.d&&e.d.gg(o),Sae(e,i,n,r,o))}function xae(){xae=S,K8e=new _A(FTe,0),X8e=new _A("DIRECTED",1),Z8e=new _A("UNDIRECTED",2),W8e=new _A("ASSOCIATION",3),Y8e=new _A("GENERALIZATION",4),q8e=new _A("DEPENDENCY",5)}function Tae(e,t,n,r){var i;if(i=!1,Mk(r)&&(i=!0,jL(t,n,RN(r))),i||kk(r)&&(i=!0,Tae(e,t,n,r)),i||RM(r,236)&&(i=!0,s$(t,n,xL(r,236))),!i)throw Jb(new Tv(WOe))}function Aae(e,t){var n,r;for(sB(t),r=e.b.c.length,SL(e.b,t);r>0;){if(n=r,r=(r-1)/2|0,e.a.ue($D(e.b,r),t)<=0)return Kq(e.b,n,t),!0;Kq(e.b,n,$D(e.b,r))}return Kq(e.b,r,t),!0}function kae(e,t,n,i){var a,o;if(a=0,n)a=x5(e.a[n.g][t.g],i);else for(o=0;o=o)}function Mae(e,t){var n,r,i,a;if(sB(t),(a=e.a.gc())=(i=e.Qi())||t<0)throw Jb(new Sv(lNe+t+uNe+i));if(n>=i||n<0)throw Jb(new Sv(fNe+n+uNe+i));return t!=n?(a=e.Oi(n),e.Ci(t,a),r=a):r=e.Ji(n),r}function Lae(e,t){RM(fH((WS(),Ptt),e),490)?rG(Ptt,e,new pk(this,t)):rG(Ptt,e,this),moe(this,t),t==(_E(),Htt)?(this.wb=xL(this,1911),xL(t,1913)):this.wb=(Ij(),Gtt)}function Dae(e){if(1!=(!e.b&&(e.b=new VR(ket,e,4,7)),e.b).i||1!=(!e.c&&(e.c=new VR(ket,e,5,8)),e.c).i)throw Jb(new Rv(sNe));return Jie(xL(FQ((!e.b&&(e.b=new VR(ket,e,4,7)),e.b),0),93))}function Fae(e){if(1!=(!e.b&&(e.b=new VR(ket,e,4,7)),e.b).i||1!=(!e.c&&(e.c=new VR(ket,e,5,8)),e.c).i)throw Jb(new Rv(sNe));return $2(xL(FQ((!e.b&&(e.b=new VR(ket,e,4,7)),e.b),0),93))}function Uae(e){if(1!=(!e.b&&(e.b=new VR(ket,e,4,7)),e.b).i||1!=(!e.c&&(e.c=new VR(ket,e,5,8)),e.c).i)throw Jb(new Rv(sNe));return $2(xL(FQ((!e.c&&(e.c=new VR(ket,e,5,8)),e.c),0),93))}function jae(e){if(1!=(!e.b&&(e.b=new VR(ket,e,4,7)),e.b).i||1!=(!e.c&&(e.c=new VR(ket,e,5,8)),e.c).i)throw Jb(new Rv(sNe));return Jie(xL(FQ((!e.c&&(e.c=new VR(ket,e,5,8)),e.c),0),93))}function Bae(e){var t,n,r;if(r=e,e)for(t=0,n=e.Pg();n;n=n.Pg()){if(++t>s_e)return Bae(n);if(r=n,n==e)throw Jb(new Pv("There is a cycle in the containment hierarchy of "+e))}return r}function zae(){zae=S,yFe=m3(ay(eFe,1),kye,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),EFe=m3(ay(eFe,1),kye,2,6,["Jan","Feb","Mar","Apr",vEe,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])}function $ae(e){var t,n;(t=eP(typeof t,R_e)?null:new le)&&(J_(),Yj(n=900>=Jye?"error":"warn",e.a),e.b&&Ffe(t,n,e.b,"Exception: ",!0))}function Hae(e,t){var n,r;return!e.q&&(e.q=new Hb),null!=(r=qj(e.q,t))?r:(RM(n=t.rg(),4)&&(null==n?(!e.q&&(e.q=new Hb),BX(e.q,t)):(!e.q&&(e.q=new Hb),zB(e.q,t,n))),n)}function Gae(){Gae=S,Ize=new Lx("P1_CYCLE_BREAKING",0),Oze=new Lx("P2_LAYERING",1),Nze=new Lx("P3_NODE_ORDERING",2),Rze=new Lx("P4_NODE_PLACEMENT",3),Pze=new Lx("P5_EDGE_ROUTING",4)}function Vae(e,t){var n,r,i,a;for(r=(1==t?zze:Bze).a.ec().Ic();r.Ob();)for(n=xL(r.Pb(),108),a=xL(MX(e.f.c,n),21).Ic();a.Ob();)i=xL(a.Pb(),46),KK(e.b.b,i.b),KK(e.b.a,xL(i.b,79).d)}function Wae(e,t){var n,r;if(Kae(e,t))return!0;for(r=new td(t);r.ar&&(pG(t-1,e.length),e.charCodeAt(t-1)<=32);)--t;return r>0||t1&&(e.j.b+=e.e)):(e.j.a+=n.a,e.j.b=r.Math.max(e.j.b,n.b),e.d.c.length>1&&(e.j.a+=e.e))}function toe(){toe=S,wGe=m3(ay(M7e,1),sTe,61,0,[(Lwe(),Q9e),Z9e,g7e]),mGe=m3(ay(M7e,1),sTe,61,0,[Z9e,g7e,m7e]),vGe=m3(ay(M7e,1),sTe,61,0,[g7e,m7e,Q9e]),yGe=m3(ay(M7e,1),sTe,61,0,[m7e,Q9e,Z9e])}function noe(e,t,n,r){var i,a,o,s,c;if(a=e.c.d,o=e.d.d,a.j!=o.j)for(c=e.b,i=a.j,s=null;i!=o.j;)s=0==t?s8(i):a8(i),oD(r,MR(vee(i,c.d[i.g],n),vee(s,c.d[s.g],n))),i=s}function roe(e,t,n,r){var i,a,o,s,c;return s=xL((o=tre(e.a,t,n)).a,20).a,a=xL(o.b,20).a,r&&(c=xL(Hae(t,(Nve(),oqe)),10),i=xL(Hae(n,oqe),10),c&&i&&(VW(e.b,c,i),s+=e.b.i,a+=e.b.e)),s>a}function ioe(e){var t,n,r,i,a,o,s,c;for(this.a=ute(e),this.b=new $b,r=0,i=(n=e).length;r0&&(e.a[H.p]=Q++)}for(re=0,P=0,F=(O=n).length;P0;){for(wO(q.b>0),W=0,c=new td((H=xL(q.a.Xb(q.c=--q.b),11)).e);c.a0&&(H.j==(Lwe(),Q9e)?(e.a[H.p]=re,++re):(e.a[H.p]=re+U+B,++B))}re+=B}for(V=new Hb,g=new zC,N=0,L=(M=t).length;Nu.b&&(u.b=X)):H.i.c==Z&&(Xu.c&&(u.c=X));for($K(b,0,b.length,null),ne=HY(Eit,kEe,24,b.length,15,1),i=HY(Eit,kEe,24,re+1,15,1),w=0;w0;)x%2>0&&(a+=oe[x+1]),++oe[x=(x-1)/2|0];for(A=HY(JJe,aye,359,2*b.length,0,1),E=0;Ee.d[i.p]&&(n+=Zq(e.b,r)*xL(o.b,20).a,yW(e.a,G6(r)));for(;!Bv(e.a);)BZ(e.b,xL(JU(e.a),20).a)}return n}(e,n)}(e.a,i)),o}function ooe(e,t,n,r,i){var a,o,s,c;for(c=null,s=new td(r);s.aFN(e.d).c?(e.i+=e.g.c,s7(e.d)):FN(e.d).c>FN(e.g).c?(e.e+=e.d.c,s7(e.g)):(e.i+=WD(e.g),e.e+=WD(e.d),s7(e.g),s7(e.d))}function coe(e,t,n,i){e.a.d=r.Math.min(t,n),e.a.a=r.Math.max(t,i)-e.a.d,tc&&(l=c/i),(a=r.Math.abs(t.b-e.b))>o&&(u=o/a),s=r.Math.min(l,u),e.a+=s*(t.a-e.a),e.b+=s*(t.b-e.b)}function doe(e,t,n,r,i){var a,o;for(o=!1,a=xL($D(n.b,0),34);Zge(e,t,a,r,i)&&(o=!0,mie(n,a),0!=n.b.c.length);)a=xL($D(n.b,0),34);return 0==n.b.c.length&&H7(n.j,n),o&&Q9(t.q),o}function poe(e,t){if(e<0||t<0)throw Jb(new Rv("k and n must be positive"));if(t>e)throw Jb(new Rv("k must be smaller than n"));return 0==t||t==e?1:0==e?0:Gre(e)/(Gre(t)*Gre(e-t))}function goe(e,t){var n,r,i,a;if(zhe(),t.b<2)return!1;for(r=n=xL(_W(a=xee(t,0)),8);a.b!=a.d.c;){if(Sfe(e,r,i=xL(_W(a),8)))return!0;r=i}return!!Sfe(e,r,n)}function boe(e,t,n,r){return 0==n?(!e.o&&(e.o=new iK((uve(),pet),qet,e,0)),vP(e.o,t,r)):xL(mQ(xL(k2(e,16),26)||e.uh(),n),65).Ij().Mj(e,q7(e),n-Oj(e.uh()),t,r)}function moe(e,t){var n;t!=e.sb?(n=null,e.sb&&(n=xL(e.sb,48).dh(e,1,Oet,n)),t&&(n=xL(t,48).ah(e,1,Oet,n)),(n=w6(e,t,n))&&n.Ai()):0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,4,t,t))}function woe(e){if(null==xDe&&(xDe=new RegExp("^\\s*[+-]?(NaN|Infinity|((\\d+\\.?\\d*)|(\\.\\d+))([eE][+-]?\\d+)?[dDfF]?)\\s*$")),!xDe.test(e))throw Jb(new cy(JEe+e+'"'));return parseFloat(e)}function voe(e,t){var n,r;r=xL(Hae(t,(mve(),yZe)),100),q3(t,(Nve(),rqe),r),(n=t.e)&&(aS(new JD(null,new LG(n.a,16)),new qd(e)),aS(DZ(new JD(null,new LG(n.b,16)),new dt),new Xd(e)))}function yoe(){yoe=S,p$e=new Vx("NORMAL",0),d$e=new Vx("LONG_EDGE",1),f$e=new Vx("EXTERNAL_PORT",2),g$e=new Vx("NORTH_SOUTH_PORT",3),h$e=new Vx("LABEL",4),u$e=new Vx("BREAKING_POINT",5)}function Eoe(e){var t,n,r,i,a,o;for(t=new wq,i=0,a=(r=e).length;i>22-t,i=e.h<>22-t):t<44?(n=0,r=e.l<>44-t):(n=0,r=0,i=e.l<r&&(e.a=r),e.bi&&(e.b=i),e}function Voe(e){var t,n,r;for(oD(r=new mw,new HA(e.j,e.k)),n=new gI((!e.a&&(e.a=new iI(xet,e,5)),e.a));n.e!=n.i.gc();)oD(r,new HA((t=xL(aee(n),463)).a,t.b));return oD(r,new HA(e.b,e.c)),r}function Woe(e){if(RM(e,149))return function(e){var t,n,r,i,a;return a=fae(e),null!=e.a&&jL(a,"category",e.a),!e_(new Uh(e.d))&&(GZ(a,"knownOptions",r=new dh),t=new hb(r),Jq(new Uh(e.d),t)),!e_(e.g)&&(GZ(a,"supportedFeatures",i=new dh),n=new db(i),Jq(e.g,n)),a}(xL(e,149));if(RM(e,227))return function(e){var t,n,r;return r=fae(e),!e_(e.c)&&(GZ(r,"knownLayouters",n=new dh),t=new pb(n),Jq(e.c,t)),r}(xL(e,227));if(RM(e,23))return function(e){var t,n,r;return r=fae(e),null!=e.e&&jL(r,iNe,e.e),!!e.k&&jL(r,"type",VO(e.k)),!e_(e.j)&&(n=new dh,GZ(r,UOe,n),t=new gb(n),Jq(e.j,t)),r}(xL(e,23));throw Jb(new Rv(YOe+Yae(new Uv(m3(ay(LLe,1),aye,1,5,[e])))))}function qoe(e,t){var n;SL(e.d,t),n=t.pf(),e.c?(e.e.a=r.Math.max(e.e.a,n.a),e.e.b+=n.b,e.d.c.length>1&&(e.e.b+=e.a)):(e.e.a+=n.a,e.e.b=r.Math.max(e.e.b,n.b),e.d.c.length>1&&(e.e.a+=e.a))}function Xoe(e){var t,n,r,i;switch(t=(i=e.i).b,r=i.j,n=i.g,i.a.g){case 0:n.a=(e.g.b.o.a-r.a)/2;break;case 1:n.a=t.d.n.a+t.d.a.a;break;case 2:n.a=t.d.n.a+t.d.a.a-r.a;break;case 3:n.b=t.d.n.b+t.d.a.b}}function Yoe(e,t,n,r){var i;this.b=r,this.e=e==(r1(),$Je),i=t[n],this.d=kD(_it,[kye,bSe],[177,24],16,[i.length,i.length],2),this.a=kD(Eit,[kye,kEe],[47,24],15,[i.length,i.length],2),this.c=new Uie(t,n)}function Koe(e,t,n,r){var i,a;if(t.k==(yoe(),d$e))for(a=new lU(NI(P8(t).a.Ic(),new p));Wle(a);)if((i=xL(qq(a),18)).c.i.k==d$e&&e.c.a[i.c.i.c.p]==r&&e.c.a[t.c.p]==n)return!0;return!1}function Zoe(e){var t,n;return xL(gue(e,(Ove(),I6e)),21).Fc((x7(),T7e))?(n=xL(gue(e,L6e),21),t=xL(gue(e,R6e),8),n.Fc((Tpe(),R7e))&&(t.a<=0&&(t.a=20),t.b<=0&&(t.b=20)),t):new lE}function Qoe(e){switch(e.g){case 0:return new RF;case 1:return new Zu;case 2:return new Qu;default:throw Jb(new Rv("No implementation is available for the cycle breaker "+(null!=e.f?e.f:""+e.g)))}}function Joe(e,t){var n,r,i;ZU(e.d,t),n=new ho,zB(e.c,t,n),n.f=M6(t.c),n.a=M6(t.d),n.d=(ihe(),(i=t.c.i.k)==(yoe(),p$e)||i==u$e),n.e=(r=t.d.i.k)==p$e||r==u$e,n.b=t.c.j==(Lwe(),m7e),n.c=t.d.j==Z9e}function ese(e,t){var n,r,i,a;for(r=0,i=e.length;r=n)return lse(e,t,r.p),!0;return!1}function rse(e,t,n){var r,i,a,o,s;for(s=Kfe(e.e.Og(),t),i=xL(e.g,118),r=0,o=0;o=0?e.wh(i):Ece(e,r)}else y6(e,n,r)}function ose(e){var t;return 0!=(64&e.Db)?koe(e):(t=new zI(iOe),!e.a||Bk(Bk((t.a+=' "',t),e.a),'"'),Bk(BE(Bk(BE(Bk(BE(Bk(BE((t.a+=" (",t),e.i),","),e.j)," | "),e.g),","),e.f),")"),t.a)}function sse(e){var t,n,r;if(2==(t=e.c)||7==t||1==t)return Lve(),Lve(),Qrt;for(r=fve(e),n=null;2!=(t=e.c)&&7!=t&&1!=t;)n||(Lve(),Lve(),ime(n=new mM(1),r),r=n),ime(n,fve(e));return r}function cse(e,t,n){var r,i,a,o;for(Qie(n,"ELK Force",1),function(e){var t,n;(t=xL(Hae(e,(ehe(),QBe)),20))?(n=t.a,q3(e,(q1(),cze),0==n?new U8:new vW(n))):q3(e,(q1(),cze),new vW(1))}(o=W3(t)),function(e,t){switch(t.g){case 0:RM(e.b,621)||(e.b=new u2);break;case 1:RM(e.b,622)||(e.b=new nD)}}(e,xL(Hae(o,(ehe(),qBe)),418)),i=(a=Cge(e.a,o)).Ic();i.Ob();)r=xL(i.Pb(),229),cpe(e.b,r,P0(n,1/a.gc()));Fwe(o=Wwe(a)),Toe(n)}function lse(e,t,n){var i,a;for(n!=t.c+t.b.gc()&&function(e,t){var n,r,i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v,y,E,_,S,x,T;for(y=e.c,E=t.c,n=YK(y.a,e,0),r=YK(E.a,t,0),w=xL(L9(e,(t1(),eJe)).Ic().Pb(),11),x=xL(L9(e,tJe).Ic().Pb(),11),v=xL(L9(t,eJe).Ic().Pb(),11),T=xL(L9(t,tJe).Ic().Pb(),11),b=ZV(w.e),_=ZV(x.g),m=ZV(v.e),S=ZV(T.g),Qne(e,r,E),l=0,d=(a=m).length;l0&&use(e,a,n));t.p=0}function fse(e){var t;this.c=new iS,this.f=e.e,this.e=e.d,this.i=e.g,this.d=e.c,this.b=e.b,this.k=e.j,this.a=e.a,e.i?this.j=e.i:this.j=new PP(t=xL(NE(p5e),9),xL(lR(t,t.length),9),0),this.g=e.f}function hse(e){var t,n;if(n=null,t=!1,RM(e,202)&&(t=!0,n=xL(e,202).a),t||RM(e,257)&&(t=!0,n=""+xL(e,257).a),t||RM(e,477)&&(t=!0,n=""+xL(e,477).a),!t)throw Jb(new Tv(WOe));return n}function dse(e,t,n){var r,i,a;if(!(n<=t+2))for(i=(n-t)/2|0,r=0;r=(i/2|0))for(this.e=r?r.c:null,this.d=i;n++0;)KH(this);this.b=t,this.a=null}function Mse(e,t){var n,r;if(n=xL(QB(e.b,t),121),xL(xL(MX(e.r,t),21),81).dc())return n.n.b=0,void(n.n.c=0);n.n.b=e.B.b,n.n.c=e.B.c,e.w.Fc((x7(),C7e))&&ide(e,t),r=function(e,t){var n,r,i;for(i=0,r=xL(xL(MX(e.r,t),21),81).Ic();r.Ob();)i+=(n=xL(r.Pb(),110)).d.b+n.b.pf().a+n.d.c,r.Ob()&&(i+=e.v);return i}(e,t),Vhe(e,t)==(Cee(),O9e)&&(r+=2*e.v),n.a.a=r}function Ise(e,t){var n,r;if(n=xL(QB(e.b,t),121),xL(xL(MX(e.r,t),21),81).dc())return n.n.d=0,void(n.n.a=0);n.n.d=e.B.d,n.n.a=e.B.a,e.w.Fc((x7(),C7e))&&ade(e,t),r=function(e,t){var n,r,i;for(i=0,r=xL(xL(MX(e.r,t),21),81).Ic();r.Ob();)i+=(n=xL(r.Pb(),110)).d.d+n.b.pf().b+n.d.a,r.Ob()&&(i+=e.v);return i}(e,t),Vhe(e,t)==(Cee(),O9e)&&(r+=2*e.v),n.a.b=r}function Ose(e,t){var n,r,i,a;for(a=new $b,r=new td(t);r.a=0&&eP(e.substr(s,2),"//")?(c=pee(e,s+=2,_tt,Stt),r=e.substr(s,c-s),s=c):null==f||s!=e.length&&(pG(s,e.length),47==e.charCodeAt(s))||(o=!1,-1==(c=ZI(e,_ae(35),s))&&(c=e.length),r=e.substr(s,c-s),s=c);if(!n&&s0&&58==ez(u,u.length-1)&&(i=u,s=c)),s0&&(pG(0,n.length),47!=n.charCodeAt(0))))throw Jb(new Rv("invalid opaquePart: "+n));if(e&&(null==t||!j_(ftt,t.toLowerCase()))&&null!=n&&i9(n,_tt,Stt))throw Jb(new Rv(hRe+n));if(e&&null!=t&&j_(ftt,t.toLowerCase())&&!function(e){if(null!=e&&e.length>0&&33==ez(e,e.length-1))try{return null==Use(OO(e,0,e.length-1)).e}catch(e){if(!RM(e=H2(e),31))throw Jb(e)}return!1}(n))throw Jb(new Rv(hRe+n));if(!function(e){var t;return null==e||(t=e.length)>0&&(pG(t-1,e.length),58==e.charCodeAt(t-1))&&!i9(e,_tt,Stt)}(r))throw Jb(new Rv("invalid device: "+r));if(!function(e){var t,n;if(null==e)return!1;for(t=0,n=e.length;t=0?e.nh(a,n):tfe(e,i,n)}else G8(e,r,i,n)}function Hse(e,t,n){var r,i,a,o,s;if(null!=(o=xL(k2(e.a,8),1908)))for(i=0,a=o.length;in.a&&(r.Fc((Eie(),B5e))?i=(t.a-n.a)/2:r.Fc($5e)&&(i=t.a-n.a)),t.b>n.b&&(r.Fc((Eie(),G5e))?a=(t.b-n.b)/2:r.Fc(H5e)&&(a=t.b-n.b)),Rae(e,i,a)}function Zse(e,t,n,r,i,a,o,s,c,l,u,f,h){RM(e.Cb,87)&&cce(yX(xL(e.Cb,87)),4),o0(e,n),e.f=o,u8(e,s),h8(e,c),f8(e,l),d8(e,u),D6(e,f),_8(e,h),B6(e,!0),MJ(e,i),e.jk(a),D5(e,t),null!=r&&(e.i=null,N1(e,r))}function Qse(e){var t,n;if(e.f){for(;e.n>0;){if(RM(n=(t=xL(e.k.Xb(e.n-1),71)).Xj(),97)&&0!=(xL(n,17).Bb&gOe)&&(!e.e||n.Bj()!=Set||0!=n.Xi())&&null!=t.bd())return!0;--e.n}return!1}return e.n>0}function Jse(e,t,n,r,i,a){var o,s,c;if(r-n<7)!function(e,t,n,r){var i,a,o;for(i=t+1;it&&r.ue(e[a-1],e[a])>0;--a)o=e[a],Gj(e,a,e[a-1]),Gj(e,a-1,o)}(t,n,r,a);else if(Jse(t,e,s=n+i,c=s+((o=r+i)-s>>1),-i,a),Jse(t,e,c,o,-i,a),a.ue(e[c-1],e[c])<=0)for(;n=r||to.a&&!t&&(a.b=o.a),a.c=-(a.b-o.a)/2,n.g){case 1:a.d=-a.a;break;case 3:a.d=o.b}kge(i),Nge(i)}function ace(e,t,n){var i,a,o;switch(o=e.o,(a=(i=xL(QB(e.p,n),243)).i).b=jce(i),a.a=Uce(i),a.a=r.Math.max(a.a,o.b),a.a>o.b&&!t&&(a.a=o.b),a.d=-(a.a-o.b)/2,n.g){case 4:a.c=-a.b;break;case 2:a.c=o.a}kge(i),Nge(i)}function oce(e,t){var n,r,i,a;if(zhe(),t.b<2)return!1;for(r=n=xL(_W(a=xee(t,0)),8);a.b!=a.d.c;){if(i=xL(_W(a),8),!X0(e,r)||!X0(e,i))return!1;r=i}return!(!X0(e,r)||!X0(e,n))}function sce(e,t){var n,r,i,a,o;return n=PJ(o=e,"x"),function(e,t){EJ(e,null==t||xP((sB(t),t))||isNaN((sB(t),t))?0:(sB(t),t))}(new Jg(t).a,n),r=PJ(o,"y"),function(e,t){_J(e,null==t||xP((sB(t),t))||isNaN((sB(t),t))?0:(sB(t),t))}(new eb(t).a,r),i=PJ(o,NOe),function(e,t){yJ(e,null==t||xP((sB(t),t))||isNaN((sB(t),t))?0:(sB(t),t))}(new tb(t).a,i),a=PJ(o,OOe),function(e,t){vJ(e,null==t||xP((sB(t),t))||isNaN((sB(t),t))?0:(sB(t),t))}(new nb(t).a,a),a}function cce(e,t){xde(e,t),0!=(1&e.b)&&(e.a.a=null),0!=(2&e.b)&&(e.a.f=null),0!=(4&e.b)&&(e.a.g=null,e.a.i=null),0!=(16&e.b)&&(e.a.d=null,e.a.e=null),0!=(8&e.b)&&(e.a.b=null),0!=(32&e.b)&&(e.a.j=null,e.a.c=null)}function lce(e){var t,n,r,i,a;if(null==e)return cye;for(a=new P2(rye,"[","]"),r=0,i=(n=e).length;r0)for(o=e.c.d,i=nI(IR(new HA((s=e.d.d).a,s.b),o),1/(r+1)),a=new HA(o.a,o.b),n=new td(e.a);n.a(dG(a+1,t.c.length),xL(t.c[a+1],20)).a-r&&++s,SL(i,(dG(a+s,t.c.length),xL(t.c[a+s],20))),o+=(dG(a+s,t.c.length),xL(t.c[a+s],20)).a-r,++n;n=0?e.Wg(n,!0,!0):Jce(e,i,!0),152),xL(r,212).jl(t)}function _ce(e,t,n){var r,i;r=t.a&e.f,t.b=e.b[r],e.b[r]=t,i=t.f&e.f,t.d=e.c[i],e.c[i]=t,n?(t.e=n.e,t.e?t.e.c=t:e.a=t,t.c=n.c,t.c?t.c.e=t:e.e=t):(t.e=e.e,t.c=null,e.e?e.e.c=t:e.a=t,e.e=t),++e.i,++e.g}function Sce(e){var t,n;return e>-0x800000000000&&e<0x800000000000?0==e?0:((t=e<0)&&(e=-e),n=dH(r.Math.floor(r.Math.log(e)/.6931471805599453)),(!t||e!=r.Math.pow(2,n))&&++n,n):l2(e2(e))}function xce(e,t,n){var r,i;for(r=t.d,i=n.d;r.a-i.a==0&&r.b-i.b==0;)r.a+=Fue(e,26)*E_e+Fue(e,27)*__e-.5,r.b+=Fue(e,26)*E_e+Fue(e,27)*__e-.5,i.a+=Fue(e,26)*E_e+Fue(e,27)*__e-.5,i.b+=Fue(e,26)*E_e+Fue(e,27)*__e-.5}function Tce(e){var t,n,r,i;for(e.g=new B8(xL(cj(M7e),289)),r=0,Lwe(),n=Q9e,t=0;t=0&&r0&&(o+=n,++t);t>1&&(o+=e.c*(t-1))}else o=my(g0(fz(lz(oj(e.a),new _e),new ve)));return o>0?o+e.n.d+e.n.a:0}function jce(e){var t,n,r,i,a,o;if(o=0,0==e.b)o=my(g0(fz(lz(oj(e.a),new ye),new Ee)));else{for(t=0,i=0,a=(r=Xte(e,!0)).length;i0&&(o+=n,++t);t>1&&(o+=e.c*(t-1))}return o>0?o+e.n.b+e.n.c:0}function Bce(e,t,n){var r,i,a,o,s;if(!e||0==e.c.length)return null;for(i=new iH(t,!n),r=new td(e);r.a1||-1==n||(t=Ere(e))&&(YS(),t.xj()==kRe)?(e.b=-1,!0):(e.b=1,!1);default:return!1}}function Vce(e,t){var n,r,i;if(i=_me((yse(),$nt),e.Og(),t))return YS(),xL(i,65).Jj()||(i=zG(gZ($nt,i))),r=xL((n=e.Tg(i))>=0?e.Wg(n,!0,!0):Jce(e,i,!0),152),xL(r,212).gl(t);throw Jb(new Rv(lOe+t.ne()+hOe))}function Wce(e,t,n,r,i){var a,o,s,c;return Ak(c=bN(e,xL(i,55)))!==Ak(i)?(s=xL(e.g[n],71),rI(e,n,Yie(e,0,a=GW(t,c))),NC(e.e)&&(Rie(o=K$(e,9,a.Xj(),i,c,r,!1),new fZ(e.e,9,e.c,s,a,r,!1)),qK(o)),c):i}function qce(e,t,n){var r;if(++e.j,t>=e.i)throw Jb(new Sv(lNe+t+uNe+e.i));if(n>=e.i)throw Jb(new Sv(fNe+n+uNe+e.i));return r=e.g[n],t!=n&&(t=e.length)return-1;for(pG(r,e.length),n=e.charCodeAt(r);n>=48&&n<=57&&(i=10*i+(n-48),!(++r>=e.length));)pG(r,e.length),n=e.charCodeAt(r);return r>t[0]?t[0]=r:i=-1,i}function Kce(e,t,n){var r,i,a,o;a=e.c,o=e.d,i=(u4(m3(ay(v5e,1),kye,8,0,[a.i.n,a.n,a.a])).b+u4(m3(ay(v5e,1),kye,8,0,[o.i.n,o.n,o.a])).b)/2,r=a.j==(Lwe(),Z9e)?new HA(t+a.i.c.c.a+n,i):new HA(t-n,i),vN(e.a,0,r)}function Zce(e){var t,n,r;for(t=null,n=jU(FJ(m3(ay(jLe,1),aye,19,0,[(!e.b&&(e.b=new VR(ket,e,4,7)),e.b),(!e.c&&(e.c=new VR(ket,e,5,8)),e.c)])));Wle(n);)if(r=Jie(xL(qq(n),93)),t){if(t!=r)return!1}else t=r;return!0}function Qce(e){var t,n,r;return e<0?0:0==e?32:(n=16-(t=-(e>>16)>>16&16),n+=t=(e>>=t)-256>>16&8,n+=t=(e<<=t)-n_e>>16&4,(n+=t=(e<<=t)-Cye>>16&2)+2-(t=(r=(e<<=t)>>14)&~(r>>1)))}function Jce(e,t,n){var r,i,a;if(a=_me((yse(),$nt),e.Og(),t))return YS(),xL(a,65).Jj()||(a=zG(gZ($nt,a))),i=xL((r=e.Tg(a))>=0?e.Wg(r,!0,!0):Jce(e,a,!0),152),xL(i,212).cl(t,n);throw Jb(new Rv(lOe+t.ne()+hOe))}function ele(e,t){var n;if(t<0)throw Jb(new _v("Negative exponent"));if(0==t)return nFe;if(1==t||w9(e,nFe)||w9(e,oFe))return e;if(!Ule(e,0)){for(n=1;!Ule(e,n);)++n;return qZ(function(e){var t,n,r;return e>5),15,1))[n]=1<1;t>>=1)0!=(1&t)&&(r=qZ(r,n)),n=1==n.d?qZ(n,n):new eee(gpe(n.a,n.d,HY(Eit,kEe,24,n.d<<1,15,1)));return qZ(r,n)}(e,t)}function tle(e,t){var n,i,a,o,s,c,l,u;for(u=Mv(NN(Hae(t,(mve(),ZZe)))),l=e[0].n.a+e[0].o.a+e[0].d.c+u,c=1;c=null.em()?(Yue(e),ole(e)):t.Ob()}function sle(e,t){var n,r,i;i=e.b,e.b=t,0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,3,i,e.b)),t?t!=e&&(o0(e,t.zb),OJ(e,t.d),E1(e,null==(n=null==(r=t.c)?t.zb:r)||eP(n,t.zb)?null:n)):(o0(e,null),OJ(e,0),E1(e,null))}function cle(e){var t,n;if(e.f){for(;e.n=0;)r=n[a],o.ml(r.Xj())&&cK(i,r);!Jwe(e,i)&&NC(e.e)&&km(e,t.Vj()?K$(e,6,t,(i$(),dFe),null,-1,!1):K$(e,t.Fj()?2:1,t,null,null,-1,!1))}function vle(e,t){var n,r,i;n=xL(Hae(e,(mve(),hKe)),108),i=xL(gue(t,TZe),61),(r=xL(Hae(e,yZe),100))!=(Hie(),B9e)&&r!=z9e?i==(Lwe(),b7e)&&(i=Ege(t,n))==b7e&&(i=p9(n)):i=eme(t)>0?p9(n):o8(p9(n)),Zee(t,TZe,i)}function yle(e,t){var n,r,i,a;return e.a==(foe(),$Ve)||(i=t.a.c,n=t.a.c+t.a.b,!(t.j&&(a=(r=t.A).c.c.a-r.o.a/2,i-(r.n.a+r.o.a)>a)||t.q&&(a=(r=t.C).c.c.a-r.o.a/2,r.n.a-n>a)))}function Ele(e){var t,n,r,i,a,o;for(fG(),n=new wq,r=new td(e.e.b);r.a1?e.e*=Mv(e.a):e.f/=Mv(e.a),function(e){var t,n;for(t=e.b.a.a.ec().Ic();t.Ob();)n=new Gue(xL(t.Pb(),554),e.e,e.f),SL(e.g,n)}(e),function(e){var t,n;for(t=new td(e.g);t.a=0?e.Lg(null):e.$g().dh(e,-1-t,null,null),e.Mg(xL(i,48),n),r&&r.Ai(),e.Gg()&&e.Hg()&&n>-1&&E2(e,new xU(e,9,n,a,i)),i):a}function Ule(e,t){var n,r,i;if(0==t)return 0!=(1&e.a[0]);if(t<0)throw Jb(new _v("Negative bit address"));if((i=t>>5)>=e.d)return e.e<0;if(n=e.a[i],t=1<<(31&t),e.e<0){if(i<(r=H0(e)))return!1;n=r==i?-n:~n}return 0!=(n&t)}function jle(e){var t,n,r,i,a,o,s;for(a=0,i=e.f.e,n=0;n>16)),14).Vc(a))>t,a=e.m>>t|n<<22-t,i=e.l>>t|e.m<<22-t):t<44?(o=r?GEe:0,a=n>>t-22,i=e.m>>t-22|n<<44-t):(o=r?GEe:0,a=r?HEe:0,i=n>>t-44),SM(i&HEe,a&HEe,o&GEe)}function Qle(e){var t,n,i,a,o,s;for(this.c=new $b,this.d=e,i=e_e,a=e_e,t=t_e,n=t_e,s=xee(e,0);s.b!=s.d.c;)o=xL(_W(s),8),i=r.Math.min(i,o.a),a=r.Math.min(a,o.b),t=r.Math.max(t,o.a),n=r.Math.max(n,o.b);this.a=new Sz(i,a,t-i,n-a)}function Jle(e,t){var n,r,i,a;for(r=new td(e.b);r.a0&&RM(t,43)&&(e.a.lj(),a=null==(c=(l=xL(t,43)).ad())?0:L4(c),o=YN(e.a,a),n=e.a.d[o]))for(r=xL(n.g,364),u=n.i,s=0;s=2)for(t=NN((n=a.Ic()).Pb());n.Ob();)o=t,t=NN(n.Pb()),i=r.Math.min(i,(sB(t),t-(sB(o),o)));return i}function fue(e,t){var n,r,i,a,o;mq(r=new iS,t,r.c.b,r.c);do{for(wO(0!=r.b),n=xL(UQ(r,r.a.a),83),e.b[n.g]=1,a=xee(n.d,0);a.b!=a.d.c;)o=(i=xL(_W(a),188)).c,1==e.b[o.g]?oD(e.a,i):2==e.b[o.g]?e.b[o.g]=1:mq(r,o,r.c.b,r.c)}while(0!=r.b)}function hue(e,t){var n;if(0!=e.c.length){if(2==e.c.length)fge((dG(0,e.c.length),xL(e.c[0],10)),(are(),h9e)),fge((dG(1,e.c.length),xL(e.c[1],10)),d9e);else for(n=new td(e);n.a0&&(i=n),o=new td(e.f.e);o.a=0;i+=n?1:-1)a|=t.c.Pf(s,i,n,r&&!Av(ON(Hae(t.j,(Nve(),LWe))))),a|=t.q.Xf(s,i,n),a|=Tde(e,s[i],n,r);return ZU(e.c,t),a}function yue(e,t,n){var r,i,a,o;for(Qie(n,"Processor set coordinates",1),e.a=0==t.b.b?1:t.b.b,a=null,r=xee(t.b,0);!a&&r.b!=r.d.c;)Av(ON(Hae(o=xL(_W(r),83),(Sme(),T0e))))&&(a=o,(i=o.e).a=xL(Hae(o,A0e),20).a,i.b=0);$oe(e,y3(a),P0(n,1)),Toe(n)}function Eue(e,t,n){var r,i,a;for(Qie(n,"Processor determine the height for each level",1),e.a=0==t.b.b?1:t.b.b,i=null,r=xee(t.b,0);!i&&r.b!=r.d.c;)Av(ON(Hae(a=xL(_W(r),83),(Sme(),T0e))))&&(i=a);i&&Che(e,NX(m3(ay(s0e,1),wxe,83,0,[i])),n),Toe(n)}function _ue(e,t){var n,i,a,o,s;return s=(o=t.a).c.i==t.b?o.d:o.c,i=o.c.i==t.b?o.c:o.d,a=function(e,t,n){var r;return r=Mv(e.p[t.i.p])+Mv(e.d[t.i.p])+t.n.b+t.a.b,Mv(e.p[n.i.p])+Mv(e.d[n.i.p])+n.n.b+n.a.b-r}(e.a,s,i),a>0&&a0):a<0&&-a0)}function Sue(e){var t,n,i,a,o,s,c;for(i=e_e,n=t_e,t=new td(e.e.b);t.a=0;t-=2)for(n=0;n<=t;n+=2)(e.b[n]>e.b[n+2]||e.b[n]===e.b[n+2]&&e.b[n+1]>e.b[n+3])&&(r=e.b[n+2],e.b[n+2]=e.b[n],e.b[n]=r,r=e.b[n+3],e.b[n+3]=e.b[n+1],e.b[n+1]=r);e.c=!0}}function Cue(e){var t,n,r;if(e.e)throw Jb(new Pv((CN(vUe),X_e+vUe.k+Y_e)));for(e.d==(K6(),O8e)&&pwe(e,M8e),n=new td(e.a.a);n.a>>0).toString(16)),e.fh()?(t.a+=" (eProxyURI: ",jk(t,e.lh()),e.Vg()&&(t.a+=" eClass: ",jk(t,e.Vg())),t.a+=")"):e.Vg()&&(t.a+=" (eClass: ",jk(t,e.Vg()),t.a+=")"),t.a}function Oue(e,t){var n,r,i,a,o;if(a=t,!(o=xL(nJ(Kj(e.i),a),34)))throw Jb(new Wv("Unable to find elk node for json object '"+hW(a,qOe)+"' Panic!"));r=lW(a,"edges"),function(e,t,n){var r,i,a;if(n)for(a=((r=new qF(n.a.length)).b-r.a)*r.c<0?(QS(),pit):new bI(r);a.Ob();)i=fW(n,xL(a.Pb(),20).a),FOe in i.a||UOe in i.a?qde(e,i,t):ove(e,i,t)}((n=new WA(e,o)).a,n.b,r),i=lW(a,LOe),function(e,t){var n,r,i;if(t)for(i=((n=new qF(t.a.length)).b-n.a)*n.c<0?(QS(),pit):new bI(n);i.Ob();)(r=fW(t,xL(i.Pb(),20).a))&&Oue(e,r)}(new Gg(e).a,i)}function Nue(e,t,n,r){var i,a,o,s,c,l;for(i=(t-e.d)/e.c.c.length,a=0,e.a+=n,e.d=t,l=new td(e.c);l.a=0)return i;for(a=1,o=new td(t.j);o.a=2147483648&&(i-=u_e),i)}function Uue(e,t,n){var r,i,a,o;tV(e,t)>tV(e,n)?(r=x8(n,(Lwe(),Z9e)),e.d=r.dc()?0:bD(xL(r.Xb(0),11)),o=x8(t,m7e),e.b=o.dc()?0:bD(xL(o.Xb(0),11))):(i=x8(n,(Lwe(),m7e)),e.d=i.dc()?0:bD(xL(i.Xb(0),11)),a=x8(t,Z9e),e.b=a.dc()?0:bD(xL(a.Xb(0),11)))}function jue(e){var t,n,r,i,a,o,s;if(e&&(t=e.Ch(JRe))&&null!=(o=RN(G9((!t.b&&(t.b=new rN((Fve(),unt),Dnt,t)),t.b),"conversionDelegates")))){for(s=new $b,i=0,a=(r=ipe(o,"\\w+")).length;i>>0).toString(16)),function(e,t,n){var r;(ZFe?(function(e){var t,n;if(e.b)return e.b;for(n=JFe?null:e.d;n;){if(t=JFe?null:n.b)return t;n=JFe?null:n.d}J_()}(e),1):QFe||tUe?(J_(),1):eUe&&(J_(),0))&&((r=new oP(t)).b=n,function(e,t){var n,r,i,a,o;for(r=0,a=P4(e).length;r";throw Jb(r)}}function zue(e,t){var n,r,i,a;for(n=e.o.a,a=xL(xL(MX(e.r,t),21),81).Ic();a.Ob();)(i=xL(a.Pb(),110)).e.a=n*Mv(NN(i.b.Xe(Dje))),i.e.b=(r=i.b).Ye((Ove(),Z6e))?r.Ef()==(Lwe(),Q9e)?-r.pf().b-Mv(NN(r.Xe(Z6e))):Mv(NN(r.Xe(Z6e))):r.Ef()==(Lwe(),Q9e)?-r.pf().b:0}function $ue(e){var t,n,r,i,a,o,s,c;t=!0,i=null,a=null;e:for(c=new td(e.a);c.a>1,e.k=n-1>>1}(this,this.d,this.c),function(e){var t,n,r,i,a,o,s;for(n=QC(e.e),a=nI(YO(kM(ZC(e.e)),e.d*e.a,e.c*e.b),-.5),t=n.a-a.a,i=n.b-a.b,s=0;s0&&Eme(this,a)}function Vue(e,t,n,r,i,a){var o,s,c;if(!i[t.b]){for(i[t.b]=!0,!(o=r)&&(o=new VX),SL(o.e,t),c=a[t.b].Ic();c.Ob();)(s=xL(c.Pb(),281)).d!=n&&s.c!=n&&(s.c!=t&&Vue(e,s.c,t,o,i,a),s.d!=t&&Vue(e,s.d,t,o,i,a),SL(o.c,s),a3(o.d,s.b));return o}return null}function Wue(e){var t,n,r;for(t=0,n=new td(e.e);n.a=2}function que(e){switch(e.g){case 0:return new rf;case 1:return new tf;case 2:return new NS;case 3:return new xa;case 4:return new SR;case 5:return new nf;default:throw Jb(new Rv("No implementation is available for the layerer "+(null!=e.f?e.f:""+e.g)))}}function Xue(e,t,n){var r,i,a;for(a=new td(e.t);a.a0&&(r.b.n-=r.c,r.b.n<=0&&r.b.u>0&&oD(t,r.b));for(i=new td(e.i);i.a0&&(r.a.u-=r.c,r.a.u<=0&&r.a.n>0&&oD(n,r.a))}function Yue(e){var t,n,r;if(null==e.g&&(e.d=e.ni(e.f),cK(e,e.d),e.c))return e.f;if(r=(t=xL(e.g[e.i-1],49)).Pb(),e.e=t,(n=e.ni(r)).Ob())e.d=n,cK(e,n);else for(e.d=null;!t.Ob()&&(Gj(e.g,--e.i,null),0!=e.i);)t=xL(e.g[e.i-1],49);return r}function Kue(e,t,n,i){var a,o,s;for(wh(a=new Lte(e),(yoe(),h$e)),q3(a,(Nve(),QWe),t),q3(a,uqe,i),q3(a,(mve(),yZe),(Hie(),F9e)),q3(a,qWe,t.c),q3(a,XWe,t.d),_he(t,a),s=r.Math.floor(n/2),o=new td(a.j);o.a=0?e.Wg(r,!0,!0):Jce(e,a,!0),152),xL(i,212).hl(t,n)}function nfe(e,t){var n,r,i,a;if(t){for(a=!(i=RM(e.Cb,87)||RM(e.Cb,97))&&RM(e.Cb,321),n=new gI((!t.a&&(t.a=new tF(t,Utt,t)),t.a));n.e!=n.i.gc();)if(r=pge(xL(aee(n),86)),i?RM(r,87):a?RM(r,148):r)return r;return i?(Fve(),int):(Fve(),tnt)}return null}function rfe(e,t,n,r){var i,a,o,s,c,l;for(IR(s=new HA(n,r),xL(Hae(t,(Sme(),u0e)),8)),l=xee(t.b,0);l.b!=l.d.c;)MR((c=xL(_W(l),83)).e,s),oD(e.b,c);for(o=xee(t.a,0);o.b!=o.d.c;){for(i=xee((a=xL(_W(o),188)).a,0);i.b!=i.d.c;)MR(xL(_W(i),8),s);oD(e.a,a)}}function ife(e,t,n){var r,a,o,s,c;if(n)for(o=((r=new qF(n.a.length)).b-r.a)*r.c<0?(QS(),pit):new bI(r);o.Ob();)(a=fW(n,xL(o.Pb(),20).a))&&(i=null,d1(s=UW(e,(yE(),c=new vw,!!t&&hfe(c,t),c),a),hW(a,qOe)),uae(a,s),sce(a,s),h4(e,a,s))}function afe(e){var t,n,r,i;if(!e.j){if(i=new xc,null==(t=bnt).a.xc(e,t)){for(r=new gI(D$(e));r.e!=r.i.gc();)Bj(i,afe(n=xL(aee(r),26))),cK(i,n);t.a.zc(e)}b5(i),e.j=new aC((xL(FQ(u$((Ij(),Gtt).o),11),17),i.i),i.g),yX(e).b&=-33}return e.j}function ofe(e){var t,n,r,i,a;if(r=Ere(e),null==(a=e.j)&&r)return e.Vj()?null:r.uj();if(RM(r,148)){if((n=r.vj())&&(i=n.Ih())!=e.i){if((t=xL(r,148)).zj())try{e.g=i.Fh(t,a)}catch(t){if(!RM(t=H2(t),78))throw Jb(t);e.g=null}e.i=i}return e.g}return null}function sfe(e,t){var n,r,i,a,o;for(i=t.a&e.f,a=null,r=e.b[i];;r=r.b){if(r==t){a?a.b=t.b:e.b[i]=t.b;break}a=r}for(o=t.f&e.f,a=null,n=e.c[o];;n=n.d){if(n==t){a?a.d=t.d:e.c[o]=t.d;break}a=n}t.e?t.e.c=t.c:e.a=t.c,t.c?t.c.e=t.e:e.e=t.e,--e.i,++e.g}function cfe(e,t){var n,r,i,a;for(wO((a=new FV(e,0)).b0),a.a.Xb(a.c=--a.b),cR(a,i),wO(a.b>16!=6&&t){if(yre(e,t))throw Jb(new Rv(vOe+_le(e)));r=null,e.Cb&&(r=(n=e.Db>>16)>=0?hre(e,r):e.Cb.dh(e,-1-n,null,r)),t&&(r=qee(t,e,6,r)),(r=VN(e,t,r))&&r.Ai()}else 0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,6,t,t))}function ffe(e,t){var n,r;if(t!=e.Cb||e.Db>>16!=3&&t){if(yre(e,t))throw Jb(new Rv(vOe+Obe(e)));r=null,e.Cb&&(r=(n=e.Db>>16)>=0?wre(e,r):e.Cb.dh(e,-1-n,null,r)),t&&(r=qee(t,e,12,r)),(r=GN(e,t,r))&&r.Ai()}else 0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,3,t,t))}function hfe(e,t){var n,r;if(t!=e.Cb||e.Db>>16!=9&&t){if(yre(e,t))throw Jb(new Rv(vOe+jde(e)));r=null,e.Cb&&(r=(n=e.Db>>16)>=0?pre(e,r):e.Cb.dh(e,-1-n,null,r)),t&&(r=qee(t,e,9,r)),(r=WN(e,t,r))&&r.Ai()}else 0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,9,t,t))}function dfe(e){var t,n;for(n=0;n0);n++);if(n>0&&n0);t++);return t>0&&n0&&p.a<=0){c.c=HY(LLe,aye,1,0,5,1),c.c[c.c.length]=p;break}(d=p.i-p.d)>=s&&(d>s&&(c.c=HY(LLe,aye,1,0,5,1),s=d),c.c[c.c.length]=p)}0!=c.c.length&&(o=xL($D(c,wte(i,c.c.length)),111),gH(v.a,o),o.g=u++,xge(o,t,n,r),c.c=HY(LLe,aye,1,0,5,1))}for(b=e.c.length+1,h=new td(e);h.ar.b.g&&(a.c[a.c.length]=r);return a}function Efe(){Efe=S,C3e=new hA("CANDIDATE_POSITION_LAST_PLACED_RIGHT",0),k3e=new hA("CANDIDATE_POSITION_LAST_PLACED_BELOW",1),I3e=new hA("CANDIDATE_POSITION_WHOLE_DRAWING_RIGHT",2),M3e=new hA("CANDIDATE_POSITION_WHOLE_DRAWING_BELOW",3),O3e=new hA("WHOLE_DRAWING",4)}function _fe(e,t){var n,r;if(t!=e.Cb||e.Db>>16!=11&&t){if(yre(e,t))throw Jb(new Rv(vOe+Ude(e)));r=null,e.Cb&&(r=(n=e.Db>>16)>=0?Tre(e,r):e.Cb.dh(e,-1-n,null,r)),t&&(r=qee(t,e,10,r)),(r=OR(e,t,r))&&r.Ai()}else 0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,11,t,t))}function Sfe(e,t,n){return zhe(),(!X0(e,t)||!X0(e,n))&&(hwe(new HA(e.c,e.d),new HA(e.c+e.b,e.d),t,n)||hwe(new HA(e.c+e.b,e.d),new HA(e.c+e.b,e.d+e.a),t,n)||hwe(new HA(e.c+e.b,e.d+e.a),new HA(e.c,e.d+e.a),t,n)||hwe(new HA(e.c,e.d+e.a),new HA(e.c,e.d),t,n))}function xfe(e,t){var n,r,i,a;if(!e.dc())for(n=0,r=e.gc();n>16!=7&&t){if(yre(e,t))throw Jb(new Rv(vOe+ose(e)));r=null,e.Cb&&(r=(n=e.Db>>16)>=0?dre(e,r):e.Cb.dh(e,-1-n,null,r)),t&&(r=xL(t,48).ah(e,1,Tet,r)),(r=jF(e,t,r))&&r.Ai()}else 0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,7,t,t))}function Nfe(e,t){var n,r;if(t!=e.Cb||e.Db>>16!=3&&t){if(yre(e,t))throw Jb(new Rv(vOe+P6(e)));r=null,e.Cb&&(r=(n=e.Db>>16)>=0?mre(e,r):e.Cb.dh(e,-1-n,null,r)),t&&(r=xL(t,48).ah(e,0,Iet,r)),(r=BF(e,t,r))&&r.Ai()}else 0!=(4&e.Db)&&0==(1&e.Db)&&E2(e,new xU(e,1,3,t,t))}function Rfe(e,t){var n,r,i;r=0!=Fue(e.d,1),Av(ON(Hae(t.j,(Nve(),LWe))))&&Ak(Hae(t.j,(mve(),eKe)))!==Ak((p4(),WQe))?r=!0:t.c.Qf(t.e,r),vue(e,t,r,!0),q3(t.j,LWe,(pO(),!1)),n=Bse(e,t);do{if(n0(e),0==n)return 0;i=n,vue(e,t,r=!r,!1),n=Bse(e,t)}while(i>n);return i}function Pfe(e,t,n){var r,i,a,o,s;for(o=I6(e,n),s=HY(b$e,gTe,10,t.length,0,1),r=0,a=o.Ic();a.Ob();)Av(ON(Hae(i=xL(a.Pb(),11),(Nve(),jWe))))&&(s[r++]=xL(Hae(i,oqe),10));if(re.d&&(s=e,e=t,t=s),t.d<63?function(e,t){var n,r,i,a,o,s,c,l,u;return a=(n=e.d)+(r=t.d),o=e.e!=t.e?-1:1,2==a?(u=zD(c=A6(lH(e.a[0],l_e),lH(t.a[0],l_e))),0==(l=zD(fD(c,32)))?new JX(o,u):new GU(o,2,m3(ay(Eit,1),kEe,24,15,[u,l]))):(function(e,t,n,r,i){0!=t&&0!=r&&(1==t?i[r]=_ee(i,n,r,e[0]):1==r?i[t]=_ee(i,e,t,n[0]):function(e,t,n,r,i){var a,o,s,c;if(Ak(e)!==Ak(t)||r!=i)for(s=0;s1&&(e.a=!0),MF(xL(n.b,63),MR(kM(xL(t.b,63).c),nI(IR(kM(xL(n.b,63).a),xL(t.b,63).a),i))),EG(e,t),$fe(e,n)}function Hfe(e){var t,n,r,i,a,o;for(i=new td(e.a.a);i.a0&&a>0?t++:r>0?n++:a>0?i++:n++}i$(),wM(e.j,new lr)}function Vfe(e,t){var n,r,i,a,o,s,c,l,u;for(s=t.j,o=t.g,c=xL($D(s,s.c.length-1),112),dG(0,s.c.length),l=Mne(e,o,c,u=xL(s.c[0],112)),a=1;al&&(c=n,u=i,l=r);t.a=u,t.c=c}function Wfe(e,t,n){var r,i,a,o,s,c;if(r=0,0!=t.b&&0!=n.b){a=xee(t,0),o=xee(n,0),s=Mv(NN(_W(a))),c=Mv(NN(_W(o))),i=!0;do{if(s>c-e.b&&sc-e.a&&s0&&(a+=(o=xL($D(this.b,0),167)).o,i+=o.p),a*=2,i*=2,t>1?a=dH(r.Math.ceil(a*t)):i=dH(r.Math.ceil(i/t)),this.a=new n7(a,i)}function she(e,t,n,i,a,o){var s,c,l,u,f,h,d,p,g,b;for(u=i,t.j&&t.o?(g=(d=xL(qj(e.f,t.A),56)).d.c+d.d.b,--u):g=t.a.c+t.a.b,f=a,n.q&&n.o?(l=(d=xL(qj(e.f,n.C),56)).d.c,++f):l=n.a.c,p=g+(c=(l-g)/r.Math.max(2,f-u)),h=u;h=0;o+=i?1:-1){for(s=t[o],c=r==(Lwe(),Z9e)?i?x8(s,r):t2(x8(s,r)):i?t2(x8(s,r)):x8(s,r),a&&(e.c[s.p]=c.gc()),f=c.Ic();f.Ob();)u=xL(f.Pb(),11),e.d[u.p]=l++;a3(n,c)}}function lhe(e,t,n){var r,i,a,o,s,c,l,u;for(a=Mv(NN(e.b.Ic().Pb())),l=Mv(NN(function(e){var t;if(e){if((t=e).dc())throw Jb(new mm);return t.Xb(t.gc()-1)}return IG(e.Ic())}(t.b))),r=nI(kM(e.a),l-n),i=nI(kM(t.a),n-a),nI(u=MR(r,i),1/(l-a)),this.a=u,this.b=new $b,s=!0,(o=e.b.Ic()).Pb();o.Ob();)c=Mv(NN(o.Pb())),s&&c-n>BCe&&(this.b.Dc(n),s=!1),this.b.Dc(c);s&&this.b.Dc(n)}function uhe(e,t,n,r){var i,a,o,s,c;if(YS(),s=xL(t,65).Jj(),phe(e.e,t)){if(t.ci()&&Pge(e,t,r,RM(t,97)&&0!=(xL(t,17).Bb&i_e)))throw Jb(new Rv(cNe))}else for(c=Kfe(e.e.Og(),t),i=xL(e.g,118),o=0;o>5,t&=31,r>=e.d)return e.e<0?(Ghe(),tFe):(Ghe(),oFe);if(a=e.d-r,function(e,t,n,r,i){var a,o;for(!0,a=0;a>>i|n[a+r+1]<>>i,++a}}(i=HY(Eit,kEe,24,a+1,15,1),a,e.a,r,t),e.e<0){for(n=0;n0&&e.a[n]<<32-t!=0){for(n=0;n=0)&&(!(n=_me((yse(),$nt),i,t))||((r=n.Uj())>1||-1==r)&&3!=UB(gZ($nt,n))))}function ghe(e,t,n,r){var i,a,o,s,c;return s=Jie(xL(FQ((!t.b&&(t.b=new VR(ket,t,4,7)),t.b),0),93)),c=Jie(xL(FQ((!t.c&&(t.c=new VR(ket,t,5,8)),t.c),0),93)),$H(s)==$H(c)||DQ(c,s)?null:(o=AH(t))==n?r:(a=xL(qj(e.a,o),10))&&(i=a.e)?i:null}function bhe(e,t,n){var r,i,a,o,s,c;if(r=function(e,t){return e?t-1:0}(n,e.length),(o=e[r])[0].k==(yoe(),f$e))for(a=ky(n,o.length),c=t.j,i=0;i>24}(e));break;case 2:e.g=v3(function(e){if(2!=e.p)throw Jb(new ym);return zD(e.f)&pEe}(e));break;case 3:e.g=function(e){if(3!=e.p)throw Jb(new ym);return e.e}(e);break;case 4:e.g=new $h(function(e){if(4!=e.p)throw Jb(new ym);return e.e}(e));break;case 6:e.g=D7(function(e){if(6!=e.p)throw Jb(new ym);return e.f}(e));break;case 5:e.g=G6(function(e){if(5!=e.p)throw Jb(new ym);return zD(e.f)}(e));break;case 7:e.g=H6(function(e){if(7!=e.p)throw Jb(new ym);return zD(e.f)<<16>>16}(e))}return e.g}function vhe(e){if(null==e.n)switch(e.p){case 0:e.n=function(e){if(0!=e.p)throw Jb(new ym);return F_(e.k,0)}(e)?(pO(),_De):(pO(),EDe);break;case 1:e.n=HZ(function(e){if(1!=e.p)throw Jb(new ym);return zD(e.k)<<24>>24}(e));break;case 2:e.n=v3(function(e){if(2!=e.p)throw Jb(new ym);return zD(e.k)&pEe}(e));break;case 3:e.n=function(e){if(3!=e.p)throw Jb(new ym);return e.j}(e);break;case 4:e.n=new $h(function(e){if(4!=e.p)throw Jb(new ym);return e.j}(e));break;case 6:e.n=D7(function(e){if(6!=e.p)throw Jb(new ym);return e.k}(e));break;case 5:e.n=G6(function(e){if(5!=e.p)throw Jb(new ym);return zD(e.k)}(e));break;case 7:e.n=H6(function(e){if(7!=e.p)throw Jb(new ym);return zD(e.k)<<16>>16}(e))}return e.n}function yhe(e){var t,n,r,i,a,o;for(i=new td(e.a.a);i.a0&&(n[0]+=e.d,s-=n[0]),n[2]>0&&(n[2]+=e.d,s-=n[2]),o=r.Math.max(0,s),n[1]=r.Math.max(n[1],s),DX(e,XUe,a.c+i.b+n[0]-(n[1]-s)/2,n),t==XUe&&(e.c.b=o,e.c.c=a.c+i.b+(o-s)/2)}function The(){this.c=HY(Tit,o_e,24,(Lwe(),m3(ay(M7e,1),sTe,61,0,[b7e,Q9e,Z9e,g7e,m7e])).length,15,1),this.b=HY(Tit,o_e,24,m3(ay(M7e,1),sTe,61,0,[b7e,Q9e,Z9e,g7e,m7e]).length,15,1),this.a=HY(Tit,o_e,24,m3(ay(M7e,1),sTe,61,0,[b7e,Q9e,Z9e,g7e,m7e]).length,15,1),lx(this.c,e_e),lx(this.b,t_e),lx(this.a,t_e)}function Ahe(e,t,n){var r,i,a,o;if(t<=n?(i=t,a=n):(i=n,a=t),r=0,null==e.b)e.b=HY(Eit,kEe,24,2,15,1),e.b[0]=i,e.b[1]=a,e.c=!0;else{if(r=e.b.length,e.b[r-1]+1==i)return void(e.b[r-1]=a);o=HY(Eit,kEe,24,r+2,15,1),Abe(e.b,0,o,0,r),e.b=o,e.b[r-1]>=i&&(e.c=!1,e.a=!1),e.b[r++]=i,e.b[r]=a,e.c||kue(e)}}function khe(e,t){var n,i,a;$H(e)&&(a=xL(Hae(t,(mve(),aZe)),174),Ak(gue(e,yZe))===Ak((Hie(),z9e))&&Zee(e,yZe,B9e),i=twe(new vv($H(e)),new SO($H(e)?new vv($H(e)):null,e),!1,!0),U1(a,(x7(),T7e)),(n=xL(Hae(t,oZe),8)).a=r.Math.max(i.a,n.a),n.b=r.Math.max(i.b,n.b))}function Che(e,t,n){var r,i,a,o,s,c;if(!pW(t)){for(Qie(c=P0(n,(RM(t,15)?xL(t,15).gc():gW(t.Ic()))/e.a|0),YCe,1),s=new Ao,o=0,a=t.Ic();a.Ob();)r=xL(a.Pb(),83),s=FJ(m3(ay(jLe,1),aye,19,0,[s,new _g(r)])),o1;)Fhe(i,i.i-1);return r}function Phe(e,t){var n,r,i,a,o,s;for(n=new zb,i=new td(e.b);i.ae.d[o.p]&&(n+=Zq(e.b,a),yW(e.a,G6(a)));for(;!Bv(e.a);)BZ(e.b,xL(JU(e.a),20).a)}return n}function Dhe(e,t,n){var r,i,a,o;for(a=(!t.a&&(t.a=new AU(Let,t,10,11)),t.a).i,i=new gI((!t.a&&(t.a=new AU(Let,t,10,11)),t.a));i.e!=i.i.gc();)0==(!(r=xL(aee(i),34)).a&&(r.a=new AU(Let,r,10,11)),r.a).i||(a+=Dhe(e,r,!1));if(n)for(o=$H(t);o;)a+=(!o.a&&(o.a=new AU(Let,o,10,11)),o.a).i,o=$H(o);return a}function Fhe(e,t){var n,r,i,a;return e._i()?(r=null,i=e.aj(),e.dj()&&(r=e.fj(e.ki(t),null)),n=e.Ui(4,a=Vne(e,t),null,t,i),e.Yi()&&null!=a?(r=e.$i(a,r))?(r.zi(n),r.Ai()):e.Vi(n):r?(r.zi(n),r.Ai()):e.Vi(n),a):(a=Vne(e,t),e.Yi()&&null!=a&&(r=e.$i(a,null))&&r.Ai(),a)}function Uhe(){Uhe=S,qVe=new _T("COMMENTS",0),YVe=new _T("EXTERNAL_PORTS",1),KVe=new _T("HYPEREDGES",2),ZVe=new _T("HYPERNODES",3),QVe=new _T("NON_FREE_PORTS",4),JVe=new _T("NORTH_SOUTH_PORTS",5),tWe=new _T(eAe,6),WVe=new _T("CENTER_LABELS",7),XVe=new _T("END_LABELS",8),eWe=new _T("PARTITIONS",9)}function jhe(e){var t,n,r,i,a;for(i=new $b,t=new UD((!e.a&&(e.a=new AU(Let,e,10,11)),e.a)),r=new lU(NI(efe(e).a.Ic(),new p));Wle(r);)RM(FQ((!(n=xL(qq(r),80)).b&&(n.b=new VR(ket,n,4,7)),n.b),0),199)||(a=Jie(xL(FQ((!n.c&&(n.c=new VR(ket,n,5,8)),n.c),0),93)),t.a._b(a)||(i.c[i.c.length]=a));return i}function Bhe(){Bhe=S,kGe=new mz(DSe,0,(Lwe(),Q9e),Q9e),IGe=new mz(USe,1,g7e,g7e),AGe=new mz(FSe,2,Z9e,Z9e),RGe=new mz(jSe,3,m7e,m7e),MGe=new mz("NORTH_WEST_CORNER",4,m7e,Q9e),CGe=new mz("NORTH_EAST_CORNER",5,Q9e,Z9e),NGe=new mz("SOUTH_WEST_CORNER",6,g7e,m7e),OGe=new mz("SOUTH_EAST_CORNER",7,Z9e,g7e)}function zhe(){zhe=S,m5e=m3(ay(Sit,1),r_e,24,14,[1,1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,6227020800,87178291200,1307674368e3,{l:3506176,m:794077,h:1},{l:884736,m:916411,h:20},{l:3342336,m:3912489,h:363},{l:589824,m:3034138,h:6914},{l:3407872,m:1962506,h:138294}]),r.Math.pow(2,-65)}function $he(e,t){var n,r,i,a,o;if(0==e.c.length)return new GA(G6(0),G6(0));for(n=(dG(0,e.c.length),xL(e.c[0],11)).j,o=0,a=t.g,r=t.g+1;o=u&&(l=i);l&&(f=r.Math.max(f,l.a.o.a)),f>d&&(h=u,d=f)}return h}function Ghe(){var e;for(Ghe=S,nFe=new JX(1,1),iFe=new JX(1,10),oFe=new JX(0,0),tFe=new JX(-1,1),rFe=m3(ay(hFe,1),kye,90,0,[oFe,nFe,new JX(1,2),new JX(1,3),new JX(1,4),new JX(1,5),new JX(1,6),new JX(1,7),new JX(1,8),new JX(1,9),iFe]),aFe=HY(hFe,kye,90,32,0,1),e=0;eEMe?wM(l,e.b):i<=EMe&&i>_Me?wM(l,e.d):i<=_Me&&i>SMe?wM(l,e.c):i<=SMe&&wM(l,e.a),o=qhe(e,l,o);return a}function Xhe(e,t,n,r,i,a){var o,s,c,l;for(s=!DE(lz(e.Mc(),new gd(new Xn))).sd((wS(),iUe)),o=e,a==(K6(),N8e)&&(o=RM(o,151)?OX(xL(o,151)):RM(o,131)?xL(o,131).a:RM(o,53)?new rv(o):new M_(o)),l=o.Ic();l.Ob();)(c=xL(l.Pb(),69)).n.a=t.a,c.n.b=s?t.b+(r.b-c.o.b)/2:i?t.b:t.b+r.b-c.o.b,t.a+=c.o.a+n}function Yhe(e,t,n,r){var i,a,o,s,c;for(i=(r.c+r.a)/2,qz(t.j),oD(t.j,i),qz(n.e),oD(n.e,i),c=new jy,o=new td(e.f);o.a1&&(r=new HA(i,n.b),oD(t.a,r)),XJ(t.a,m3(ay(v5e,1),kye,8,0,[f,u]))}function ede(e){US(e,new cae(Wy(By(Vy(Hy(new hs,GIe),"ELK Randomizer"),'Distributes the nodes randomly on the plane, leading to very obfuscating layouts. Can be useful to demonstrate the power of "real" layout algorithms.'),new js))),BV(e,GIe,dxe,_7e),BV(e,GIe,Lxe,15),BV(e,GIe,Fxe,G6(0)),BV(e,GIe,hxe,Nxe)}function tde(){var e,t,n,r,i,a;for(tde=S,jrt=HY(xit,SOe,24,255,15,1),Brt=HY(yit,dEe,24,16,15,1),t=0;t<255;t++)jrt[t]=-1;for(n=57;n>=48;n--)jrt[n]=n-48<<24>>24;for(r=70;r>=65;r--)jrt[r]=r-65+10<<24>>24;for(i=102;i>=97;i--)jrt[i]=i-97+10<<24>>24;for(a=0;a<10;a++)Brt[a]=48+a&pEe;for(e=10;e<=15;e++)Brt[e]=65+e-10&pEe}function nde(e){var t;if(10!=e.c)throw Jb(new Xv(Bve((cM(),vNe))));switch(t=e.a){case 110:t=10;break;case 114:t=13;break;case 116:t=9;break;case 92:case 124:case 46:case 94:case 45:case 63:case 42:case 43:case 123:case 125:case 40:case 41:case 91:case 93:break;default:throw Jb(new Xv(Bve((cM(),YNe))))}return t}function rde(e,t,n){var r,i,a,o,s,c,l,u;return s=t.i-e.g/2,c=n.i-e.g/2,l=t.j-e.g/2,u=n.j-e.g/2,a=t.g+e.g/2,o=n.g+e.g/2,r=t.f+e.g/2,i=n.f+e.g/2,s0?a.a?n>(s=a.b.pf().a)&&(i=(n-s)/2,a.d.b=i,a.d.c=i):a.d.c=e.s+n:vU(e.t)&&((r=pae(a.b)).c<0&&(a.d.b=-r.c),r.c+r.b>a.b.pf().a&&(a.d.c=r.c+r.b-a.b.pf().a))}(e,t),i=null,c=null,s){for(c=i=xL((a=o.Ic()).Pb(),110);a.Ob();)c=xL(a.Pb(),110);i.d.b=0,c.d.c=0,u&&!i.a&&(i.d.c=0)}f&&(function(e){var t,n,i,a,o;for(t=0,n=0,o=e.Ic();o.Ob();)i=xL(o.Pb(),110),t=r.Math.max(t,i.d.b),n=r.Math.max(n,i.d.c);for(a=e.Ic();a.Ob();)(i=xL(a.Pb(),110)).d.b=t,i.d.c=n}(o),s&&(i.d.b=0,c.d.c=0))}function ade(e,t){var n,i,a,o,s,c,l,u,f;if(o=xL(xL(MX(e.r,t),21),81),s=e.t.Fc((lae(),q9e)),n=e.t.Fc(G9e),c=e.t.Fc(X9e),f=e.A.Fc((Tpe(),j7e)),l=!n&&(c||2==o.gc()),function(e,t){var n,i,a,o,s,c,l;for(c=xL(xL(MX(e.r,t),21),81).Ic();c.Ob();)(i=(s=xL(c.Pb(),110)).c?wD(s.c):0)>0?s.a?i>(l=s.b.pf().b)&&(e.u||1==s.c.d.c.length?(o=(i-l)/2,s.d.d=o,s.d.a=o):(n=(xL($D(s.c.d,0),183).pf().b-l)/2,s.d.d=r.Math.max(0,n),s.d.a=i-n-l)):s.d.a=e.s+i:vU(e.t)&&((a=pae(s.b)).d<0&&(s.d.d=-a.d),a.d+a.a>s.b.pf().b&&(s.d.a=a.d+a.a-s.b.pf().b))}(e,t),u=null,i=null,s){for(i=u=xL((a=o.Ic()).Pb(),110);a.Ob();)i=xL(a.Pb(),110);u.d.d=0,i.d.a=0,l&&!u.a&&(u.d.a=0)}f&&(function(e){var t,n,i,a,o;for(n=0,t=0,o=e.Ic();o.Ob();)i=xL(o.Pb(),110),n=r.Math.max(n,i.d.d),t=r.Math.max(t,i.d.a);for(a=e.Ic();a.Ob();)(i=xL(a.Pb(),110)).d.d=n,i.d.a=t}(o),s&&(u.d.d=0,i.d.a=0))}function ode(e){var t,n,r,i,a;if(!e.c){if(a=new bc,null==(t=bnt).a.xc(e,t)){for(r=new gI(XW(e));r.e!=r.i.gc();)RM(i=pge(n=xL(aee(r),86)),87)&&Bj(a,ode(xL(i,26))),cK(a,n);t.a.zc(e),t.a.gc()}!function(e){var t,n,r,i;for(n=xL(e.g,662),r=e.i-1;r>=0;--r)for(t=n[r],i=0;i>19!=0)return"-"+sde(G3(e));for(n=e,r="";0!=n.l||0!=n.m||0!=n.h;){if(n=bme(n,dX(XEe),!0),t=""+OE(bDe),0!=n.l||0!=n.m||0!=n.h)for(i=9-t.length;i>0;i--)t="0"+t;r=t+r}return r}function cde(e,t,n,i){var a,o,s,c;if(gW((XP(),new lU(NI(R8(t).a.Ic(),new p))))>=e.a)return-1;if(!qie(t,n))return-1;if(pW(xL(i.Kb(t),19)))return 1;for(a=0,s=xL(i.Kb(t),19).Ic();s.Ob();){if(-1==(c=cde(e,(o=xL(s.Pb(),18)).c.i==t?o.d.i:o.c.i,n,i)))return-1;if((a=r.Math.max(a,c))>e.c-1)return-1}return a+1}function lde(e,t){var n,r,i,a,o,s;if(Ak(t)===Ak(e))return!0;if(!RM(t,14))return!1;if(r=xL(t,14),s=e.gc(),r.gc()!=s)return!1;if(o=r.Ic(),e.ii()){for(n=0;n0)if(e.lj(),null!=t){for(a=0;a>24;case 97:case 98:case 99:case 100:case 101:case 102:return e-97+10<<24>>24;case 65:case 66:case 67:case 68:case 69:case 70:return e-65+10<<24>>24;default:throw Jb(new cy("Invalid hexadecimal"))}}function hde(e,t,n){var r,i,a,o;for(Qie(n,"Processor order nodes",2),e.a=Mv(NN(Hae(t,(xoe(),j0e)))),i=new iS,o=xee(t.b,0);o.b!=o.d.c;)Av(ON(Hae(a=xL(_W(o),83),(Sme(),T0e))))&&mq(i,a,i.c.b,i.c);wO(0!=i.b),Xbe(e,r=xL(i.a.a.c,83)),!n.b&&x1(n,1),Pde(e,r,0-Mv(NN(Hae(r,(Sme(),m0e))))/2,0),!n.b&&x1(n,1),Toe(n)}function dde(){dde=S,BUe=new xx("SPIRAL",0),LUe=new xx("LINE_BY_LINE",1),DUe=new xx("MANHATTAN",2),PUe=new xx("JITTER",3),UUe=new xx("QUADRANTS_LINE_BY_LINE",4),jUe=new xx("QUADRANTS_MANHATTAN",5),FUe=new xx("QUADRANTS_JITTER",6),RUe=new xx("COMBINE_LINE_BY_LINE_MANHATTAN",7),NUe=new xx("COMBINE_JITTER_MANHATTAN",8)}function pde(e,t,n,r,i,a){if(this.b=n,this.d=i,e>=t.length)throw Jb(new Sv("Greedy SwitchDecider: Free layer not in graph."));this.c=t[e],this.e=new hP(r),Q1(this.e,this.c,(Lwe(),m7e)),this.i=new hP(r),Q1(this.i,this.c,Z9e),this.f=new iF(this.c),this.a=!a&&i.i&&!i.s&&this.c[0].k==(yoe(),f$e),this.a&&function(e,t,n){var r,i,a,o,s,c,l;s=(a=e.d.p).e,c=a.r,e.g=new hP(c),r=(o=e.d.o.c.p)>0?s[o-1]:HY(b$e,gTe,10,0,0,1),i=s[o],l=o0&&t=e.o)throw Jb(new rw);o=t>>5,a=uD(1,zD(uD(31&t,1))),e.n[n][o]=i?uH(e.n[n][o],a):lH(e.n[n][o],nR(a)),a=uD(a,1),e.n[n][o]=r?uH(e.n[n][o],a):lH(e.n[n][o],nR(a))}catch(r){throw RM(r=H2(r),318)?Jb(new Sv($Se+e.o+"*"+e.p+HSe+t+rye+n+GSe)):Jb(r)}}function xde(e,t){var n,r;switch(r=e.b,t){case 1:e.b|=1,e.b|=4,e.b|=8;break;case 2:e.b|=2,e.b|=4,e.b|=8;break;case 4:e.b|=1,e.b|=2,e.b|=4,e.b|=8;break;case 3:e.b|=16,e.b|=8;break;case 0:e.b|=32,e.b|=16,e.b|=8,e.b|=1,e.b|=2,e.b|=4}if(e.b!=r&&e.c)for(n=new gI(e.c);n.e!=n.i.gc();)cce(yX(xL(aee(n),467)),t)}function Tde(e,t,n,r){var i,a,o,s,c,l,u,f,h,d;for(i=!1,s=0,c=(o=t).length;s=0)return!1;if(t.p=n.b,SL(n.e,t),r==(yoe(),d$e)||r==g$e)for(i=new td(t.j);i.a1||-1==o)&&(a|=16),0!=(i.Bb&gOe)&&(a|=64)),0!=(n.Bb&i_e)&&(a|=MRe),a|=uRe):RM(t,450)?a|=512:(r=t.wj())&&0!=(1&r.i)&&(a|=256),0!=(512&e.Bb)&&(a|=128),a}function Nde(e,t){var n,r,i,a,o;for(e=null==e?cye:(sB(e),e),i=0;ie.d[s.p]&&(n+=Zq(e.b,a),yW(e.a,G6(a))):++o;for(n+=e.b.d*o;!Bv(e.a);)BZ(e.b,xL(JU(e.a),20).a)}return n}function Pde(e,t,n,i){var a,o;t&&(a=Mv(NN(Hae(t,(Sme(),E0e))))+i,o=n+Mv(NN(Hae(t,m0e)))/2,q3(t,A0e,G6(zD(e2(r.Math.round(a))))),q3(t,k0e,G6(zD(e2(r.Math.round(o))))),0==t.d.b||Pde(e,xL(XM(new Sg(xee(new _g(t).a.d,0))),83),n+Mv(NN(Hae(t,m0e)))+e.a,i+Mv(NN(Hae(t,w0e)))),null!=Hae(t,x0e)&&Pde(e,xL(Hae(t,x0e),83),n,i))}function Lde(e){var t,n,r,i,a,o,s;for(s=new Hb,r=new td(e.a.b);r.a0&&(!(r=(!e.n&&(e.n=new AU(Pet,e,1,7)),xL(FQ(e.n,0),137)).a)||Bk(Bk((t.a+=' "',t),r),'"'))),Bk(BE(Bk(BE(Bk(BE(Bk(BE((t.a+=" (",t),e.i),","),e.j)," | "),e.g),","),e.f),")"),t.a)}function jde(e){var t,n,r;return 0!=(64&e.Db)?koe(e):(t=new zI(oOe),(n=e.k)?Bk(Bk((t.a+=' "',t),n),'"'):(!e.n&&(e.n=new AU(Pet,e,1,7)),e.n.i>0&&(!(r=(!e.n&&(e.n=new AU(Pet,e,1,7)),xL(FQ(e.n,0),137)).a)||Bk(Bk((t.a+=' "',t),r),'"'))),Bk(BE(Bk(BE(Bk(BE(Bk(BE((t.a+=" (",t),e.i),","),e.j)," | "),e.g),","),e.f),")"),t.a)}function Bde(e){if(0==(!e.b&&(e.b=new VR(ket,e,4,7)),e.b).i)throw Jb(new Vv("Edges must have a source."));if(0==(!e.c&&(e.c=new VR(ket,e,5,8)),e.c).i)throw Jb(new Vv("Edges must have a target."));if(!e.b&&(e.b=new VR(ket,e,4,7)),!(e.b.i<=1&&(!e.c&&(e.c=new VR(ket,e,5,8)),e.c.i<=1)))throw Jb(new Vv("Hyperedges are not supported."))}function zde(e,t){var n,r,i,a,o,s;if(null==t||0==t.length)return null;if(!(i=xL(fH(e.a,t),149))){for(r=new Wh(new Vh(e.b).a.tc().Ic());r.a.Ob();)if(a=xL(r.a.Pb(),43),o=(n=xL(a.bd(),149)).c,s=t.length,eP(o.substr(o.length-s,s),t)&&(t.length==o.length||46==ez(o,o.length-t.length-1))){if(i)return null;i=n}i&&rG(e.a,t,i)}return i}function $de(e,t,n,r,i){var a,o,s,c,l,u,f;if(!(RM(t,238)||RM(t,351)||RM(t,199)))throw Jb(new Rv("Method only works for ElkNode-, ElkLabel and ElkPort-objects."));return o=e.a/2,c=t.i+r-o,u=t.j+i-o,l=c+t.g+e.a,f=u+t.f+e.a,oD(a=new mw,new HA(c,u)),oD(a,new HA(c,f)),oD(a,new HA(l,f)),oD(a,new HA(l,u)),L2(s=new Qle(a),t),n&&zB(e.b,t,s),s}function Hde(e){var t,n,r;HO(e,(mve(),ZKe))&&((r=xL(Hae(e,ZKe),21)).dc()||(n=new PP(t=xL(NE(P9e),9),xL(lR(t,t.length),9),0),r.Fc((mue(),_9e))?U1(n,_9e):U1(n,S9e),r.Fc(y9e)||U1(n,y9e),r.Fc(v9e)?U1(n,A9e):r.Fc(w9e)?U1(n,T9e):r.Fc(E9e)&&U1(n,x9e),r.Fc(A9e)?U1(n,v9e):r.Fc(T9e)?U1(n,w9e):r.Fc(x9e)&&U1(n,E9e),q3(e,ZKe,n)))}function Gde(e){var t,n,r,i,a,o,s;for(i=xL(Hae(e,(Nve(),zWe)),10),dG(0,(r=e.j).c.length),n=xL(r.c[0],11),o=new td(i.j);o.ai.p?(mce(a,g7e),a.d&&(s=a.o.b,t=a.a.b,a.a.b=s-t)):a.j==g7e&&i.p>e.p&&(mce(a,Q9e),a.d&&(s=a.o.b,t=a.a.b,a.a.b=-(s-t)));break}return i}function Vde(e,t,n){var r,i,a,o,s,c,l,u;for(a=new HA(t,n),l=new td(e.a);l.ao&&(H7((dG(o,e.c.length),xL(e.c[o],180)),r),0==(dG(o,e.c.length),xL(e.c[o],180)).a.c.length&&RX(e,o)))),s}function epe(e){US(e,new cae(Wy(By(Vy(Hy(new hs,HIe),"ELK Fixed"),"Keeps the current layout as it is, without any automatic modification. Optional coordinates can be given for nodes and edge bend points."),new Us))),BV(e,HIe,dxe,a9e),BV(e,HIe,yCe,Mee(o9e)),BV(e,HIe,yIe,Mee(e9e)),BV(e,HIe,Zke,Mee(t9e)),BV(e,HIe,fCe,Mee(r9e)),BV(e,HIe,NIe,Mee(n9e))}function tpe(e,t,n){var r,i,a,o,s,c;if(t){if(n<=-1){if(RM(r=mQ(t.Og(),-1-n),97))return xL(r,17);for(s=0,c=(o=xL(t.Xg(r),152)).gc();s1&&(r=new HA(i,n.b),oD(t.a,r)),XJ(t.a,m3(ay(v5e,1),kye,8,0,[f,u]))}function rpe(e,t,n,r){var i,a,o;return o=new __(t,n),e.a?r?(++(i=xL(qj(e.b,t),282)).a,o.d=r.d,o.e=r.e,o.b=r,o.c=r,r.e?r.e.c=o:xL(qj(e.b,t),282).b=o,r.d?r.d.b=o:e.a=o,r.d=o,r.e=o):(e.e.b=o,o.d=e.e,e.e=o,(i=xL(qj(e.b,t),282))?(++i.a,(a=i.c).c=o,o.e=a,i.c=o):(zB(e.b,t,i=new w$(o)),++e.c)):(e.a=e.e=o,zB(e.b,t,new w$(o)),++e.c),++e.d,o}function ipe(e,t){var n,r,i,a,o,s,c,l;for(n=new RegExp(t,"g"),c=HY(eFe,kye,2,0,6,1),r=0,l=e,a=null;;){if(null==(s=n.exec(l))||""==l){c[r]=l;break}o=s.index,c[r]=l.substr(0,o),l=OO(l,o+s[0].length,l.length),n.lastIndex=0,a==l&&(c[r]=l.substr(0,1),l=l.substr(1)),a=l,++r}if(e.length>0){for(i=c.length;i>0&&""==c[i-1];)--i;i>>31;0!=r&&(e[n]=r)}(n,n,t<<1),r=0,i=0,o=0;i=40)&&function(e){var t,n,r,i,a,o,s;for(e.o=new zb,r=new iS,o=new td(e.e.a);o.a0,s=H8(t,a),sO(n?s.b:s.g,t),1==Y8(s).c.length&&mq(r,s,r.c.b,r.c),i=new GA(a,t),yW(e.o,i),KK(e.e.a,a))}(e),function(e){var t,n,r,i,a,o,s,c,l,u;for(l=e.e.a.c.length,a=new td(e.e.a);a.a0){for(jv(e.c);Xle(e,xL(iV(new td(e.e.a)),119))0&&oD(e.e,a)):(e.c[o]-=l+1,e.c[o]<=0&&e.a[o]>0&&oD(e.d,a))))}function _pe(e,t,n){var r,i,a;if(!t.f)throw Jb(new Rv("Given leave edge is no tree edge."));if(n.f)throw Jb(new Rv("Given enter edge is a tree edge already."));for(t.f=!1,YM(e.p,t),n.f=!0,ZU(e.p,n),r=n.e.e-n.d.e-n.a,gce(e,n.e,t)||(r=-r),a=new td(e.e.a);a.a=0&&c0&&(pG(0,e.length),45==e.charCodeAt(0)||(pG(0,e.length),43==e.charCodeAt(0)))?1:0;rn)throw Jb(new cy(JEe+e+'"'));return o}function Cpe(e,t,n,r){var i,a,o,s,c,l,u,f,h,d;if(function(e,t,n){var r,i,a;for(i=t[n],r=0;r1)&&1==t&&xL(e.a[e.b],10).k==(yoe(),h$e)?fge(xL(e.a[e.b],10),(are(),h9e)):r&&(!n||(e.c-e.b&e.a.length-1)>1)&&1==t&&xL(e.a[e.c-1&e.a.length-1],10).k==(yoe(),h$e)?fge(xL(e.a[e.c-1&e.a.length-1],10),(are(),d9e)):2==(e.c-e.b&e.a.length-1)?(fge(xL(n4(e),10),(are(),h9e)),fge(xL(n4(e),10),d9e)):function(e,t){var n,r,i,a,o,s,c,l,u;for(c=PO(e.c-e.b&e.a.length-1),l=null,u=null,a=new VB(e);a.a!=a.b;)i=xL(K5(a),10),n=(s=xL(Hae(i,(Nve(),qWe)),11))?s.i:null,r=(o=xL(Hae(i,XWe),11))?o.i:null,l==n&&u==r||(hue(c,t),l=n,u=r),c.c[c.c.length]=i;hue(c,t)}(e,i),JW(e)}function Lpe(e,t,n){var r,i,a,o;if(t[0]>=e.length)return n.o=0,!0;switch(ez(e,t[0])){case 43:i=1;break;case 45:i=-1;break;default:return n.o=0,!0}if(++t[0],a=t[0],0==(o=Yce(e,t))&&t[0]==a)return!1;if(t[0]=0&&s!=n&&(a=new xU(e,1,s,o,null),r?r.zi(a):r=a),n>=0&&(a=new xU(e,1,n,s==n?o:null,t),r?r.zi(a):r=a)),r}function Upe(e){var t,n,r;if(null==e.b){if(r=new ly,null!=e.i&&(Fk(r,e.i),r.a+=":"),0!=(256&e.f)){for(0!=(256&e.f)&&null!=e.a&&(function(e){return null!=e&&j_(ftt,e.toLowerCase())}(e.i)||(r.a+="//"),Fk(r,e.a)),null!=e.d&&(r.a+="/",Fk(r,e.d)),0!=(16&e.f)&&(r.a+="/"),t=0,n=e.j.length;t0&&(t.td(n),n.i&&W6(n))}(i=function(e,t){var n,r,i,a,o;for(e.b=new $b,e.d=xL(Hae(t,(Nve(),lqe)),228),e.e=function(e){return T6(uD(e2(Fue(e,32)),32),e2(Fue(e,32)))}(e.d),a=new iS,i=NX(m3(ay(c$e,1),cTe,38,0,[t])),o=0;o0)if(i=xL(e.Ab.g,1906),null==t){for(a=0;an.s&&c=0&&l>=0&&co)return Lwe(),Z9e;break;case 4:case 3:if(u<0)return Lwe(),Q9e;if(u+n>a)return Lwe(),g7e}return(c=(l+s/2)/o)+(r=(u+n/2)/a)<=1&&c-r<=0?(Lwe(),m7e):c+r>=1&&c-r>=0?(Lwe(),Z9e):r<.5?(Lwe(),Q9e):(Lwe(),g7e)}function Zpe(e){var t,n,i,a,o,s;return L2(i=new l1,e),Ak(Hae(i,(mve(),hKe)))===Ak((K6(),O8e))&&q3(i,hKe,A8(i)),null==Hae(i,(sY(),b5e))&&(s=xL(Bae(e),160),q3(i,b5e,zk(s.Xe(b5e)))),q3(i,(Nve(),QWe),e),q3(i,DWe,new PP(t=xL(NE(sWe),9),xL(lR(t,t.length),9),0)),a=function(e,t){var n,i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v;for(dz(h=new _we(e),!0,!(t==(K6(),N8e)||t==C8e)),f=h.a,d=new sw,NQ(),s=0,l=(a=m3(ay(QUe,1),Kye,230,0,[qUe,XUe,YUe])).length;s0&&(d.d+=f.n.d,d.d+=f.d),d.a>0&&(d.a+=f.n.a,d.a+=f.d),d.b>0&&(d.b+=f.n.b,d.b+=f.d),d.c>0&&(d.c+=f.n.c,d.c+=f.d),d}(($H(e)&&new vv($H(e)),new SO($H(e)?new vv($H(e)):null,e)),I8e),o=xL(Hae(i,lZe),115),NH(n=i.d,o),NH(n,a),i}function Qpe(e,t){var n,r,i,a,o,s,c,l,u,f,h,d;for(n=!1,c=Mv(NN(Hae(t,(mve(),qZe)))),h=rEe*c,i=new td(t.b);i.ao.n.b-o.d.d+u.a+h&&(d=l.g+u.g,u.a=(u.g*u.a+l.g*l.a)/d,u.g=d,l.f=u,n=!0)),a=o,l=u;return n}function Jpe(e,t,n,r,i,a,o){var s,c,l,u,f;for(f=new HC,c=t.Ic();c.Ob();)for(u=new td(xL(c.Pb(),818).uf());u.ae.b/2+t.b/2||(a=r.Math.abs(e.d+e.a/2-(t.d+t.a/2)))>e.a/2+t.a/2?1:0==n&&0==a?0:0==n?o/a+1:0==a?i/n+1:r.Math.min(i/n,o/a)+1}function tge(e,t){var n,i,a,o,s,c;return(a=KJ(e))==(c=KJ(t))?e.e==t.e&&e.a<54&&t.a<54?e.ft.f?1:0:(i=e.e-t.e,(n=(e.d>0?e.d:r.Math.floor((e.a-1)*c_e)+1)-(t.d>0?t.d:r.Math.floor((t.a-1)*c_e)+1))>i+1?a:n0&&(s=qZ(s,Qge(i))),I7(o,s))):a0&&e.d!=(sZ(),xze)&&(s+=o*(r.d.a+e.a[t.b][r.b]*(t.d.a-r.d.a)/n)),n>0&&e.d!=(sZ(),_ze)&&(c+=o*(r.d.b+e.a[t.b][r.b]*(t.d.b-r.d.b)/n)));switch(e.d.g){case 1:return new HA(s/a,t.d.b);case 2:return new HA(t.d.a,c/a);default:return new HA(s/a,c/a)}}function rge(e){var t,n,r,i,a;for(SL(a=new dY((!e.a&&(e.a=new iI(xet,e,5)),e.a).i+2),new HA(e.j,e.k)),aS(new JD(null,(!e.a&&(e.a=new iI(xet,e,5)),new LG(e.a,16))),new Ug(a)),SL(a,new HA(e.b,e.c)),t=1;t0&&(R3(c,!1,(K6(),M8e)),R3(c,!0,I8e)),jQ(t.g,new tT(e,n)),zB(e.g,t,n)}function oge(e){var t;if(1!=(!e.a&&(e.a=new AU(Met,e,6,6)),e.a).i)throw Jb(new Rv(WIe+(!e.a&&(e.a=new AU(Met,e,6,6)),e.a).i));return t=new mw,$2(xL(FQ((!e.b&&(e.b=new VR(ket,e,4,7)),e.b),0),93))&&w0(t,Sve(e,$2(xL(FQ((!e.b&&(e.b=new VR(ket,e,4,7)),e.b),0),93)),!1)),$2(xL(FQ((!e.c&&(e.c=new VR(ket,e,5,8)),e.c),0),93))&&w0(t,Sve(e,$2(xL(FQ((!e.c&&(e.c=new VR(ket,e,5,8)),e.c),0),93)),!0)),t}function sge(e,t){var n,r,i;for(i=!1,r=new lU(NI((t.d?e.a.c==(q$(),f1e)?P8(t.b):L8(t.b):e.a.c==(q$(),u1e)?P8(t.b):L8(t.b)).a.Ic(),new p));Wle(r);)if(n=xL(qq(r),18),(Av(e.a.f[e.a.g[t.b.p].p])||gX(n)||n.c.i.c!=n.d.i.c)&&!Av(e.a.n[e.a.g[t.b.p].p])&&!Av(e.a.n[e.a.g[t.b.p].p])&&(i=!0,V_(e.b,e.a.g[hne(n,t.b).p])))return t.c=!0,t.a=n,t;return t.c=i,t.a=null,t}function cge(e,t,n){var r,i,a,o,s,c,l;if(0==(r=n.gc()))return!1;if(e._i())if(c=e.aj(),O9(e,t,n),o=1==r?e.Ui(3,null,n.Ic().Pb(),t,c):e.Ui(5,null,n,t,c),e.Yi()){for(s=r<100?null:new oE(r),a=t+r,i=t;i0){for(s=0;s>16==-15&&e.Cb.ih()&&qK(new aK(e.Cb,9,13,n,e.c,dte(dZ(xL(e.Cb,58)),e))):RM(e.Cb,87)&&e.Db>>16==-23&&e.Cb.ih()&&(RM(t=e.c,87)||(Fve(),t=int),RM(n,87)||(Fve(),n=int),qK(new aK(e.Cb,9,10,n,t,dte(XW(xL(e.Cb,26)),e)))))),e.c}function gge(e,t){var n,r;if(null!=t)if(r=pne(e)){if(0==(1&r.i))return KS(),!(n=xL(qj(ctt,r),54))||n.rj(t);if(r==_it)return kk(t);if(r==Eit)return RM(t,20);if(r==Ait)return RM(t,155);if(r==xit)return RM(t,215);if(r==yit)return RM(t,172);if(r==Tit)return Ck(t);if(r==kit)return RM(t,186);if(r==Sit)return RM(t,162)}else if(RM(t,55))return e.pk(xL(t,55));return!1}function bge(e,t,n){var r,i,a,o,s,c,l;if(t==n)return!0;if(t=Gle(e,t),n=Gle(e,n),r=Gte(t)){if((c=Gte(n))!=r)return!!c&&(o=r.yj())==c.yj()&&null!=o;if(!t.d&&(t.d=new iI(Utt,t,1)),i=(a=t.d).i,!n.d&&(n.d=new iI(Utt,n,1)),i==(l=n.d).i)for(s=0;se.b.b/2+t.b.b/2&&(n=1-r.Math.min(r.Math.abs(e.b.c-(t.b.c+t.b.b)),r.Math.abs(e.b.c+e.b.b-t.b.c))/i),o>e.b.a/2+t.b.a/2&&(a=1-r.Math.min(r.Math.abs(e.b.d-(t.b.d+t.b.a)),r.Math.abs(e.b.d+e.b.a-t.b.d))/o),(1-r.Math.min(n,a))*r.Math.sqrt(i*i+o*o)}function vge(e){var t,n,i;for(kwe(e,e.e,e.f,(W$(),H1e),!0,e.c,e.i),kwe(e,e.e,e.f,H1e,!1,e.c,e.i),kwe(e,e.e,e.f,G1e,!0,e.c,e.i),kwe(e,e.e,e.f,G1e,!1,e.c,e.i),function(e,t,n,r,i){var a,o,s,c,l,u,f;for(o=new td(t);o.a=p&&(w>p&&(d.c=HY(LLe,aye,1,0,5,1),p=w),d.c[d.c.length]=o);0!=d.c.length&&(h=xL($D(d,wte(t,d.c.length)),128),k.a.zc(h),h.s=g++,Xue(h,T,_),d.c=HY(LLe,aye,1,0,5,1))}for(y=e.c.length+1,s=new td(e);s.aA.s&&(HB(n),KK(A.i,r),r.c>0&&(r.a=A,SL(A.t,r),r.b=S,SL(S.i,r)))}(e.i,xL(Hae(e.d,(Nve(),lqe)),228)),function(e){var t,n,i,a,o,s,c,l,u;for(l=new iS,s=new iS,a=new td(e);a.a-1){for(i=xee(s,0);i.b!=i.d.c;)(n=xL(_W(i),128)).v=o;for(;0!=s.b;)for(t=new td((n=xL(Wne(s,0),128)).i);t.a=65;n--)Frt[n]=n-65<<24>>24;for(r=122;r>=97;r--)Frt[r]=r-97+26<<24>>24;for(i=57;i>=48;i--)Frt[i]=i-48+52<<24>>24;for(Frt[43]=62,Frt[47]=63,a=0;a<=25;a++)Urt[a]=65+a&pEe;for(o=26,c=0;o<=51;++o,c++)Urt[o]=97+c&pEe;for(e=52,s=0;e<=61;++e,s++)Urt[e]=48+s&pEe;Urt[62]=43,Urt[63]=47}function Ege(e,t){var n,r,i,a,o,s,c;if(!kH(e))throw Jb(new Pv(VIe));if(a=(r=kH(e)).g,i=r.f,a<=0&&i<=0)return Lwe(),b7e;switch(s=e.i,c=e.j,t.g){case 2:case 1:if(s<0)return Lwe(),m7e;if(s+e.g>a)return Lwe(),Z9e;break;case 4:case 3:if(c<0)return Lwe(),Q9e;if(c+e.f>i)return Lwe(),g7e}return(o=(s+e.g/2)/a)+(n=(c+e.f/2)/i)<=1&&o-n<=0?(Lwe(),m7e):o+n>=1&&o-n>=0?(Lwe(),Z9e):n<.5?(Lwe(),Q9e):(Lwe(),g7e)}function _ge(e){var t,n,r,i,a,o;if(Lve(),4!=e.e&&5!=e.e)throw Jb(new Rv("Token#complementRanges(): must be RANGE: "+e.e));for(kue(a=e),Qbe(a),r=a.b.length+2,0==a.b[0]&&(r-=2),(n=a.b[a.b.length-1])==fLe&&(r-=2),(i=new VG(4)).b=HY(Eit,kEe,24,r,15,1),o=0,a.b[0]>0&&(i.b[o++]=0,i.b[o++]=a.b[0]-1),t=1;t0&&(vh(c,c.d-i.d),i.c==(iY(),P1e)&&yh(c,c.a-i.d),c.d<=0&&c.i>0&&mq(t,c,t.c.b,t.c));for(a=new td(e.f);a.a0&&(Ih(s,s.i-i.d),i.c==(iY(),P1e)&&Oh(s,s.b-i.d),s.i<=0&&s.d>0&&mq(n,s,n.c.b,n.c))}function Tge(e,t,n){var r,i,a,o,s,c,l,u;for(Qie(n,"Processor compute fanout",1),zU(e.b),zU(e.a),s=null,a=xee(t.b,0);!s&&a.b!=a.d.c;)Av(ON(Hae(l=xL(_W(a),83),(Sme(),T0e))))&&(s=l);for(mq(c=new iS,s,c.c.b,c.c),Dwe(e,c),u=xee(t.b,0);u.b!=u.d.c;)o=RN(Hae(l=xL(_W(u),83),(Sme(),p0e))),i=null!=fH(e.b,o)?xL(fH(e.b,o),20).a:0,q3(l,d0e,G6(i)),r=1+(null!=fH(e.a,o)?xL(fH(e.a,o),20).a:0),q3(l,f0e,G6(r));Toe(n)}function Age(e,t,n,r,i){var a,o,s,c,l,u,f,h,d;for(f=function(e,t){var n,r,i;for(i=new FV(e.e,0),n=0;i.bBCe)return n;r>-1e-6&&++n}return n}(e,n),s=0;s0),r.a.Xb(r.c=--r.b),u>f+s&&HB(r);for(a=new td(h);a.a0),r.a.Xb(r.c=--r.b)}}function kge(e){var t,n,i,a,o,s,c,l,u,f,h,d,p;if(n=e.i,t=e.n,0==e.b)for(p=n.c+t.b,d=n.b-t.b-t.c,l=0,f=(s=e.a).length;l0&&(h-=i[0]+e.c,i[0]+=e.c),i[2]>0&&(h-=i[2]+e.c),i[1]=r.Math.max(i[1],h),xF(e.a[1],n.c+t.b+i[0]-(i[1]-h)/2,i[1]);for(c=0,u=(o=e.a).length;c1)for(r=xee(i,0);r.b!=r.d.c;)for(a=0,s=new td((n=xL(_W(r),229)).e);s.a0&&(t[0]+=e.c,h-=t[0]),t[2]>0&&(h-=t[2]+e.c),t[1]=r.Math.max(t[1],h),SF(e.a[1],i.d+n.d+t[0]-(t[1]-h)/2,t[1]);else for(p=i.d+n.d,d=i.a-n.d-n.a,l=0,f=(s=e.a).length;l=0&&a!=n)throw Jb(new Rv(cNe));for(i=0,c=0;c0||0==h9(a.b.d,e.b.d+e.b.a)&&i.b<0||0==h9(a.b.d+a.b.a,e.b.d)&&i.b>0){c=0;break}}else c=r.Math.min(c,vce(e,a,i));c=r.Math.min(c,Dge(e,o,c,i))}return c}function Fge(e,t){var n,r,i,a,o,s,c,l;for(n=0,r=new td((dG(0,e.c.length),xL(e.c[0],101)).g.b.j);r.as?1:-1:x4(e.a,t.a,a)))f=-c,u=o==c?PX(t.a,s,e.a,a):$Y(t.a,s,e.a,a);else if(f=o,o==c){if(0==i)return Ghe(),oFe;u=PX(e.a,a,t.a,s)}else u=$Y(e.a,a,t.a,s);return DV(l=new GU(f,u.length,u)),l}function $ge(e,t){var n,r,i,a,o,s;for(a=e.c,o=e.d,bG(e,null),gG(e,null),t&&Av(ON(Hae(o,(Nve(),UWe))))?bG(e,Gpe(o.i,(t1(),tJe),(Lwe(),Z9e))):bG(e,o),t&&Av(ON(Hae(a,(Nve(),iqe))))?gG(e,Gpe(a.i,(t1(),eJe),(Lwe(),m7e))):gG(e,a),r=new td(e.b);r.aMv(tI(o.g,o.d[0]).a)?(wO(c.b>0),c.a.Xb(c.c=--c.b),cR(c,o),i=!0):s.e&&s.e.gc()>0&&(a=(!s.e&&(s.e=new $b),s.e).Kc(t),l=(!s.e&&(s.e=new $b),s.e).Kc(n),(a||l)&&((!s.e&&(s.e=new $b),s.e).Dc(o),++o.c));i||(r.c[r.c.length]=o)}function Gge(e){var t,n,r,i,a,o;for(this.e=new $b,this.a=new $b,n=e.b-1;n<3;n++)vN(e,0,xL(Iee(e,0),8));if(e.b<4)throw Jb(new Rv("At (least dimension + 1) control points are necessary!"));for(this.b=3,this.d=!0,this.c=!1,function(e,t){var n,r,i,a,o;if(t<2*e.b)throw Jb(new Rv("The knot vector must have at least two time the dimension elements."));for(e.f=1,i=0;i>>0).toString(16),t.length-2,t.length):e>=i_e?"\\v"+OO(t="0"+(e>>>0).toString(16),t.length-6,t.length):""+String.fromCharCode(e&pEe)}return n}function Wge(e){var t,n,r;if(OC(xL(Hae(e,(mve(),yZe)),100)))for(n=new td(e.j);n.at&&c>0&&(o=0,s+=c,a=r.Math.max(a,h),i+=c,c=0,h=0,n&&(++f,SL(e.n,new vH(e.s,s,e.i)))),h+=l.g+e.i,c=r.Math.max(c,l.f+e.i),n&&w5(xL($D(e.n,f),209),l),o+=l.g+e.i;return a=r.Math.max(a,h),i+=c,n&&(e.r=a,e.d=i,g7(e.j)),new Sz(e.s,e.t,a,i)}function Kge(e,t){var n,i,a,o,s,c,l;t%=24,e.q.getHours()!=t&&((n=new r.Date(e.q.getTime())).setDate(n.getDate()+1),(s=e.q.getTimezoneOffset()-n.getTimezoneOffset())>0&&(c=s/60|0,l=s%60,i=e.q.getDate(),e.q.getHours()+c>=24&&++i,a=new r.Date(e.q.getFullYear(),e.q.getMonth(),i,t+c,e.q.getMinutes()+l,e.q.getSeconds(),e.q.getMilliseconds()),e.q.setTime(a.getTime()))),o=e.q.getTime(),e.q.setTime(o+36e5),e.q.getHours()!=t&&e.q.setTime(o)}function Zge(e,t,n,r,i){var a,o;if(n.f+i>=t.o&&n.f+i<=t.f||.5*t.a<=n.f+i&&1.5*t.a>=n.f+i){if(n.g+i<=r-((a=xL($D(t.n,t.n.c.length-1),209)).e+a.d)&&(xL($D(t.n,t.n.c.length-1),209).f-e.e+n.f+i<=e.b||1==e.a.c.length))return X8(t,n),!0;if(n.g<=r-t.s&&(t.d+n.f+i<=e.b||1==e.a.c.length))return SL(t.b,n),o=xL($D(t.n,t.n.c.length-1),209),SL(t.n,new vH(t.s,o.f+o.a,t.i)),w5(xL($D(t.n,t.n.c.length-1),209),n),yde(t,n),!0}return!1}function Qge(e){var t,n,r,i;if(fle(),t=dH(e),e1e6)throw Jb(new _v("power of ten too big"));if(e<=Jve)return bX(ele(uFe[1],t),t);for(i=r=ele(uFe[1],Jve),n=e2(e-Jve),t=dH(e%Jve);K4(n,Jve)>0;)i=qZ(i,r),n=k6(n,Jve);for(i=bX(i=qZ(i,ele(uFe[1],t)),Jve),n=e2(e-Jve);K4(n,Jve)>0;)i=bX(i,Jve),n=k6(n,Jve);return bX(i,t)}function Jge(e){var t,n,r,i,a;if(!e.d){if(a=new _c,null==(t=bnt).a.xc(e,t)){for(n=new gI(D$(e));n.e!=n.i.gc();)Bj(a,Jge(xL(aee(n),26)));t.a.zc(e),t.a.gc()}for(i=a.i,!e.q&&(e.q=new AU(jtt,e,11,10)),r=new gI(e.q);r.e!=r.i.gc();++i)xL(aee(r),395);Bj(a,(!e.q&&(e.q=new AU(jtt,e,11,10)),e.q)),b5(a),e.d=new aC((xL(FQ(u$((Ij(),Gtt).o),9),17),a.i),a.g),e.e=xL(a.g,661),null==e.e&&(e.e=mnt),yX(e).b&=-17}return e.d}function ebe(e,t,n,r){var i,a,o,s,c,l;if(l=Kfe(e.e.Og(),t),c=0,i=xL(e.g,118),YS(),xL(t,65).Jj()){for(o=0;o1||-1==p)if(f=xL(g,67),h=xL(u,67),f.dc())h.$b();else for(o=!!Ote(t),a=0,s=e.a?f.Ic():f.Uh();s.Ob();)l=xL(s.Pb(),55),(i=xL(LZ(e,l),55))?(o?-1==(c=h.Vc(i))?h.Sh(a,i):a!=c&&h.ei(a,i):h.Sh(a,i),++a):e.b&&!o&&(h.Sh(a,l),++a);else null==g?u.Wb(null):null==(i=LZ(e,g))?e.b&&!Ote(t)&&u.Wb(g):u.Wb(i)}function nbe(e,t){var n,i,a,o,s,c,l,u;for(n=new Mn,a=new lU(NI(P8(t).a.Ic(),new p));Wle(a);)if(!gX(i=xL(qq(a),18))&&qie(c=i.c.i,R$e)){if(-1==(u=cde(e,c,R$e,N$e)))continue;n.b=r.Math.max(n.b,u),!n.a&&(n.a=new $b),SL(n.a,c)}for(s=new lU(NI(L8(t).a.Ic(),new p));Wle(s);)if(!gX(o=xL(qq(s),18))&&qie(l=o.d.i,N$e)){if(-1==(u=cde(e,l,N$e,R$e)))continue;n.d=r.Math.max(n.d,u),!n.c&&(n.c=new $b),SL(n.c,l)}return n}function rbe(e){var t,n,r,i,a,o,s,c;for(o=new td(e.a);o.al&&r>l)){i=!1,n.n&&UL(n,"bk node placement breaks on "+s+" which should have been after "+u);break}u=s,l=Mv(t.p[s.p])+Mv(t.d[s.p])+s.o.b+s.d.a}if(!i)break}return n.n&&UL(n,t+" is feasible: "+i),i}function sbe(e,t,n,r){var i,a,o,s,c,l,u;if(n.d.i!=t.i){for(wh(i=new Lte(e),(yoe(),d$e)),q3(i,(Nve(),QWe),n),q3(i,(mve(),yZe),(Hie(),F9e)),r.c[r.c.length]=i,wG(o=new Poe,i),mce(o,(Lwe(),m7e)),wG(s=new Poe,i),mce(s,Z9e),u=n.d,gG(n,o),L2(a=new _$,n),q3(a,FKe,null),bG(a,s),gG(a,u),l=new FV(n.b,0);l.b=b&&e.e[l.p]>p*e.b||v>=n*b)&&(h.c[h.c.length]=c,c=new $b,w0(s,o),o.a.$b(),u-=f,d=r.Math.max(d,u*e.b+g),u+=v,w=v,v=0,f=0,g=0);return new GA(d,h)}function ube(e){var t,n,r,i,a,o,s,c,l,u,f,h;for(n=new Wh(new Vh(e.c.b).a.tc().Ic());n.a.Ob();)s=xL(n.a.Pb(),43),null==(i=(t=xL(s.bd(),149)).a)&&(i=""),!(r=DN(e.c,i))&&0==i.length&&(r=b6(e)),r&&!A9(r.c,t,!1)&&oD(r.c,t);for(o=xee(e.a,0);o.b!=o.d.c;)a=xL(_W(o),472),l=hX(e.c,a.a),h=hX(e.c,a.b),l&&h&&oD(l.c,new GA(h,a.c));for(qz(e.a),f=xee(e.b,0);f.b!=f.d.c;)u=xL(_W(f),472),t=LN(e.c,u.a),c=hX(e.c,u.b),t&&c&&FS(t,c,u.c);qz(e.b)}function fbe(e){var t,n,r,i,a,o;if(!e.f){if(o=new gc,a=new gc,null==(t=bnt).a.xc(e,t)){for(i=new gI(D$(e));i.e!=i.i.gc();)Bj(o,fbe(xL(aee(i),26)));t.a.zc(e),t.a.gc()}for(!e.s&&(e.s=new AU(Mtt,e,21,17)),r=new gI(e.s);r.e!=r.i.gc();)RM(n=xL(aee(r),170),97)&&cK(a,xL(n,17));b5(a),e.r=new zL(e,(xL(FQ(u$((Ij(),Gtt).o),6),17),a.i),a.g),Bj(o,e.r),b5(o),e.f=new aC((xL(FQ(u$(Gtt.o),5),17),o.i),o.g),yX(e).b&=-3}return e.f}function hbe(e){var t,n,r,i,a,o,s,c,l,u,f,h,d,p;for(o=e.o,r=HY(Eit,kEe,24,o,15,1),i=HY(Eit,kEe,24,o,15,1),n=e.p,t=HY(Eit,kEe,24,n,15,1),a=HY(Eit,kEe,24,n,15,1),l=0;l=0&&!Ete(e,u,f);)--f;i[u]=f}for(d=0;d=0&&!Ete(e,s,p);)--s;a[p]=s}for(c=0;ct[h]&&hr[c]&&Sde(e,c,h,!1,!0)}function dbe(e){var t,n,r,i,a,o,s,c;n=Av(ON(Hae(e,(ehe(),GBe)))),a=e.a.c.d,s=e.a.d.d,n?(o=nI(IR(new HA(s.a,s.b),a),.5),c=nI(kM(e.e),.5),t=IR(MR(new HA(a.a,a.b),o),c),KO(e.d,t)):(i=Mv(NN(Hae(e.a,nze))),r=e.d,a.a>=s.a?a.b>=s.b?(r.a=s.a+(a.a-s.a)/2+i,r.b=s.b+(a.b-s.b)/2-i-e.e.b):(r.a=s.a+(a.a-s.a)/2+i,r.b=a.b+(s.b-a.b)/2+i):a.b>=s.b?(r.a=a.a+(s.a-a.a)/2+i,r.b=s.b+(a.b-s.b)/2+i):(r.a=a.a+(s.a-a.a)/2+i,r.b=a.b+(s.b-a.b)/2-i-e.e.b))}function pbe(e,t){var n,r,i,a,o,s,c;if(null==e)return null;if(0==(a=e.length))return"";for(c=HY(yit,dEe,24,a,15,1),fY(0,a,e.length),fY(0,a,c.length),_j(e,0,a,c,0),n=null,s=t,i=0,o=0;i0?OO(n.a,0,a-1):"":e.substr(0,a-1):n?n.a:e}function gbe(){gbe=S,vet=m3(ay(yit,1),dEe,24,15,[48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70]),yet=new RegExp("[ \t\n\r\f]+");try{wet=m3(ay(Tnt,1),aye,1984,0,[new Ab((sM(),z9("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ",CR((dv(),dv(),cDe))))),new Ab(z9("yyyy-MM-dd'T'HH:mm:ss'.'SSS",CR(cDe))),new Ab(z9("yyyy-MM-dd'T'HH:mm:ss",CR(cDe))),new Ab(z9("yyyy-MM-dd'T'HH:mm",CR(cDe))),new Ab(z9("yyyy-MM-dd",CR(cDe)))])}catch(e){if(!RM(e=H2(e),78))throw Jb(e)}}function bbe(e){US(e,new cae(Wy(By(Vy(Hy(new hs,lxe),"ELK DisCo"),"Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out."),new rt))),BV(e,lxe,uxe,Mee(ABe)),BV(e,lxe,fxe,Mee(yBe)),BV(e,lxe,hxe,Mee(gBe)),BV(e,lxe,dxe,Mee(EBe)),BV(e,lxe,uSe,Mee(xBe)),BV(e,lxe,fSe,Mee(SBe)),BV(e,lxe,lSe,Mee(TBe)),BV(e,lxe,hSe,Mee(_Be)),BV(e,lxe,ixe,Mee(mBe)),BV(e,lxe,axe,Mee(bBe)),BV(e,lxe,oxe,Mee(wBe)),BV(e,lxe,sxe,Mee(vBe))}function mbe(e,t,n,r){var i,a,o,s,c,l,u;if(wh(a=new Lte(e),(yoe(),g$e)),q3(a,(mve(),yZe),(Hie(),F9e)),i=0,t){for(q3(o=new Poe,(Nve(),QWe),t),q3(a,QWe,t.i),mce(o,(Lwe(),m7e)),wG(o,a),l=0,u=(c=ZV(t.e)).length;l=0&&h<=1&&d>=0&&d<=1?MR(new HA(e.a,e.b),nI(new HA(t.a,t.b),h)):null}function vbe(e){var t,n,i,a,o,s,c,l,u,f;for(l=new Gh(new Uh(Ele(e)).a.tc().Ic());l.a.Ob();){for(i=xL(l.a.Pb(),43),u=0,f=0,u=(c=xL(i.ad(),10)).d.d,f=c.o.b+c.d.a,e.d[c.p]=0,t=c;(a=e.a[t.p])!=c;)n=K7(t,a),0,s=e.c==(q$(),u1e)?n.d.n.b+n.d.a.b-n.c.n.b-n.c.a.b:n.c.n.b+n.c.a.b-n.d.n.b-n.d.a.b,o=Mv(e.d[t.p])+s,e.d[a.p]=o,u=r.Math.max(u,a.d.d-o),f=r.Math.max(f,o+a.o.b+a.d.a),t=a;t=c;do{e.d[t.p]=Mv(e.d[t.p])+u,t=e.a[t.p]}while(t!=c);e.b[c.p]=u+f}}function ybe(e){var t,n,i,a,o,s,c,l,u,f,h;for(e.b=!1,f=e_e,c=t_e,h=e_e,l=t_e,n=e.e.a.ec().Ic();n.Ob();)for(i=(t=xL(n.Pb(),265)).a,f=r.Math.min(f,i.c),c=r.Math.max(c,i.c+i.b),h=r.Math.min(h,i.d),l=r.Math.max(l,i.d+i.a),o=new td(t.c);o.ad||r+i>l)throw Jb(new gm);if(0==(1&f.i)&&h!=c)if(u=KQ(e),a=KQ(n),Ak(e)===Ak(n)&&tr;)Gj(a,s,u[--t]);else for(s=r+i;r0&&pce(e,t,n,r,i,!0)}function kbe(e,t,n,r,i,a){var o,s,c,l;return c=!1,o=Afe(n.q,t.e+t.b-n.q.e),!((l=i-(n.q.d+o))a&&(H7((dG(a,e.c.length),xL(e.c[a],180)),r),0==(dG(a,e.c.length),xL(e.c[a],180)).a.c.length&&RX(e,a)),c=!0),c)}function Cbe(){Cbe=S,cFe=m3(ay(Eit,1),kEe,24,15,[iEe,1162261467,Xye,1220703125,362797056,1977326743,Xye,387420489,XEe,214358881,429981696,815730721,1475789056,170859375,268435456,410338673,612220032,893871739,128e7,1801088541,113379904,148035889,191102976,244140625,308915776,387420489,481890304,594823321,729e6,887503681,Xye,1291467969,1544804416,1838265625,60466176]),lFe=m3(ay(Eit,1),kEe,24,15,[-1,-1,31,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5])}function Mbe(e,t){var n,r,i,a,o;if(o=xL(t,136),kue(e),kue(o),null!=o.b){if(e.c=!0,null==e.b)return e.b=HY(Eit,kEe,24,o.b.length,15,1),void Abe(o.b,0,e.b,0,o.b.length);for(a=HY(Eit,kEe,24,e.b.length+o.b.length,15,1),n=0,r=0,i=0;n=e.b.length?(a[i++]=o.b[r++],a[i++]=o.b[r++]):r>=o.b.length?(a[i++]=e.b[n++],a[i++]=e.b[n++]):o.b[r]0&&(!(i=(!e.n&&(e.n=new AU(Pet,e,1,7)),xL(FQ(e.n,0),137)).a)||Bk(Bk((t.a+=' "',t),i),'"'))),!e.b&&(e.b=new VR(ket,e,4,7)),n=!(e.b.i<=1&&(!e.c&&(e.c=new VR(ket,e,5,8)),e.c.i<=1)),t.a+=n?" [":" ",Bk(t,EI(new ty,new gI(e.b))),n&&(t.a+="]"),t.a+=hTe,n&&(t.a+="["),Bk(t,EI(new ty,new gI(e.c))),n&&(t.a+="]"),t.a)}function Nbe(e,t){var n,r,i,a,o,s,c;if(e.a){if(c=null,null!=(s=e.a.ne())?t.a+=""+s:null!=(o=e.a.yj())&&(-1!=(a=mC(o,_ae(91)))?(c=o.substr(a),t.a+=""+OO(null==o?cye:(sB(o),o),0,a)):t.a+=""+o),e.d&&0!=e.d.i){for(i=!0,t.a+="<",r=new gI(e.d);r.e!=r.i.gc();)n=xL(aee(r),86),i?i=!1:t.a+=rye,Nbe(n,t);t.a+=">"}null!=c&&(t.a+=""+c)}else e.e?null!=(s=e.e.zb)&&(t.a+=""+s):(t.a+="?",e.b?(t.a+=" super ",Nbe(e.b,t)):e.f&&(t.a+=" extends ",Nbe(e.f,t)))}function Rbe(e,t,n){var i,a,o,s,c,l,u;return r.Math.abs(t.s-t.c)u?new TG((iY(),L1e),n,t,l-u):l>0&&u>0&&(new TG((iY(),L1e),t,n,0),new TG(L1e,n,t,0))),o)}function Pbe(e,t,n,r){var i,a,o,s,c,l;if(a=A8(r),!Av(ON(Hae(r,(mve(),XKe))))&&!Av(ON(Hae(e,NKe)))||OC(xL(Hae(e,yZe),100)))switch(wG(s=new Poe,e),t?((l=s.n).a=t.a-e.n.a,l.b=t.b-e.n.b,Goe(l,0,0,e.o.a,e.o.b),mce(s,Kpe(s,a))):(i=p9(a),mce(s,n==(t1(),tJe)?i:o8(i))),o=xL(Hae(r,(Nve(),DWe)),21),c=s.j,a.g){case 2:case 1:(c==(Lwe(),Q9e)||c==g7e)&&o.Dc((Uhe(),JVe));break;case 4:case 3:(c==(Lwe(),Z9e)||c==m7e)&&o.Dc((Uhe(),JVe))}else i=p9(a),s=Gpe(e,n,n==(t1(),tJe)?i:o8(i));return s}function Lbe(e,t){var n,i,a,o,s;for(s=new F4(new Fh(e.f.b).a);s.b;){if(a=xL((o=JQ(s)).ad(),585),1==t){if(a.hf()!=(K6(),N8e)&&a.hf()!=C8e)continue}else if(a.hf()!=(K6(),M8e)&&a.hf()!=I8e)continue;switch(i=xL(xL(o.bd(),46).b,79),n=xL(xL(o.bd(),46).a,189).c,a.hf().g){case 2:i.g.c=e.e.a,i.g.b=r.Math.max(1,i.g.b+n);break;case 1:i.g.c=i.g.c+n,i.g.b=r.Math.max(1,i.g.b-n);break;case 4:i.g.d=e.e.b,i.g.a=r.Math.max(1,i.g.a+n);break;case 3:i.g.d=i.g.d+n,i.g.a=r.Math.max(1,i.g.a-n)}}}function Dbe(e,t){var n,r,i,a,o,s,c,l,u,f,h;for(r=new lU(NI(efe(t).a.Ic(),new p));Wle(r);)RM(FQ((!(n=xL(qq(r),80)).b&&(n.b=new VR(ket,n,4,7)),n.b),0),199)||(c=Jie(xL(FQ((!n.c&&(n.c=new VR(ket,n,5,8)),n.c),0),93)),Ple(n)||(o=t.i+t.g/2,s=t.j+t.f/2,u=c.i+c.g/2,f=c.j+c.f/2,(h=new lE).a=u-o,h.b=f-s,Fre(a=new HA(h.a,h.b),t.g,t.f),h.a-=a.a,h.b-=a.b,o=u-h.a,s=f-h.b,Fre(l=new HA(h.a,h.b),c.g,c.f),h.a-=l.a,h.b-=l.b,u=o+h.a,f=s+h.b,SJ(i=Rhe(n,!0,!0),o),kJ(i,s),TJ(i,u),AJ(i,f),Dbe(e,c)))}function Fbe(e){US(e,new cae(Wy(By(Vy(Hy(new hs,zMe),"ELK SPOrE Compaction"),"ShrinkTree is a compaction algorithm that maintains the topology of a layout. The relocation of diagram elements is based on contracting a spanning tree."),new Qo))),BV(e,zMe,$Me,Mee(d4e)),BV(e,zMe,HMe,Mee(u4e)),BV(e,zMe,GMe,Mee(l4e)),BV(e,zMe,VMe,Mee(s4e)),BV(e,zMe,WMe,Mee(c4e)),BV(e,zMe,dxe,o4e),BV(e,zMe,Lxe,8),BV(e,zMe,qMe,Mee(h4e)),BV(e,zMe,XMe,Mee(n4e)),BV(e,zMe,YMe,Mee(r4e)),BV(e,zMe,qke,(pO(),!1))}function Ube(e,t,n){var r,i,a,o,s,c,l,u;return r=e.a.o==(PH(),g1e)?e_e:t_e,!(s=sge(e,new XT(t,n))).a&&s.c?(oD(e.d,s),r):s.a?(i=s.a.c,c=s.a.d,n?(l=e.a.c==(q$(),f1e)?c:i,a=e.a.c==f1e?i:c,o=e.a.g[a.i.p],u=Mv(e.a.p[o.p])+Mv(e.a.d[a.i.p])+a.n.b+a.a.b-Mv(e.a.d[l.i.p])-l.n.b-l.a.b):(l=e.a.c==(q$(),u1e)?c:i,a=e.a.c==u1e?i:c,u=Mv(e.a.p[e.a.g[a.i.p].p])+Mv(e.a.d[a.i.p])+a.n.b+a.a.b-Mv(e.a.d[l.i.p])-l.n.b-l.a.b),e.a.n[e.a.g[i.i.p].p]=(pO(),!0),e.a.n[e.a.g[c.i.p].p]=!0,u):r}function jbe(e,t,n){var r,i,a,o,s,c,l;if(phe(e.e,t))YS(),wle((s=xL(t,65).Jj()?new _D(t,e):new Ek(t,e)).c,s.b),NM(s,xL(n,15));else{for(l=Kfe(e.e.Og(),t),r=xL(e.g,118),a=0;a=s?$Y(e.a,a,t.a,s):$Y(t.a,s,e.a,a);else{if(0==(i=a!=s?a>s?1:-1:x4(e.a,t.a,a)))return Ghe(),oFe;1==i?(h=o,f=PX(e.a,a,t.a,s)):(h=c,f=PX(t.a,s,e.a,a))}return DV(l=new GU(h,f.length,f)),l}function Hbe(e,t){var n,r,i,a,o,s,c,l,u,f,h,d;for(u=0;u=n}(this.k)}function Vbe(e){var t,n,r,i,a;if(e.k!=(yoe(),p$e))return!1;if(e.j.c.length<=1)return!1;if(xL(Hae(e,(mve(),yZe)),100)==(Hie(),F9e))return!1;if(bte(),(r=(e.q?e.q:(i$(),i$(),pFe))._b(nZe)?xL(Hae(e,nZe),196):xL(Hae(xB(e),rZe),196))==xQe)return!1;if(r!=SQe&&r!=_Qe){if(i=Mv(NN(q9(e,ZZe))),!(t=xL(Hae(e,KZe),141))&&(t=new NR(i,i,i,i)),a=x8(e,(Lwe(),m7e)),t.d+t.a+(a.gc()-1)*i>e.o.b)return!1;if(n=x8(e,Z9e),t.d+t.a+(n.gc()-1)*i>e.o.b)return!1}return!0}function Wbe(e,t){var n,r,i,a,o,s,c,l,u,f;if(u=null,e.d&&(u=xL(fH(e.d,t),138)),!u){if(f=(a=e.a.Hh()).i,!e.d||W_(e.d)!=f){for(c=new Hb,e.d&&$0(c,e.d),s=l=c.f.c+c.g.c;s=e.b[i+1])i+=2;else{if(!(n0&&K4(r,-6)>=0){if(K4(r,0)>=0){for(i=n+zD(r),o=17;o>=i;o--)u[o+1]=u[o];return u[++i]=46,s&&(u[--n]=45),A7(u,n,l-n+1)}for(a=2;IE(a,T6(nK(r),1));a++)u[--n]=48;return u[--n]=46,u[--n]=48,s&&(u[--n]=45),A7(u,n,l-n)}return d=n+1,l,f=new hy,s&&(f.a+="-"),18-d>=1?(Wj(f,u[n]),f.a+=".",f.a+=A7(u,n+1,l-n-1)):f.a+=A7(u,n,l-n),f.a+="E",K4(r,0)>0&&(f.a+="+"),f.a+=""+vF(r),f.a}(e2(e.f),dH(e.e)),e.g):(i=Eve((!e.c&&(e.c=o6(e.f)),e.c),0),0==e.e?i:(t=(!e.c&&(e.c=o6(e.f)),e.c).e<0?2:1,n=i.length,r=-e.e+n-t,(a=new fy).a+=""+i,e.e>0&&r>=-6?r>=0?QH(a,n-dH(e.e),String.fromCharCode(46)):(a.a=OO(a.a,0,t-1)+"0."+Pk(a.a,t-1),QH(a,t+1,A7(qDe,0,-dH(r)-1))):(n-t>=1&&(QH(a,t,String.fromCharCode(46)),++n),QH(a,n,String.fromCharCode(69)),r>0&&QH(a,++n,String.fromCharCode(43)),QH(a,++n,""+vF(e2(r)))),e.g=a.a,e.g))}function ime(e,t){var n,r,i,a,o;if(t)if(!e.a&&(e.a=new Rm),2!=e.e)if(1!=t.e)0!=(o=e.a.a.c.length)?0!=(a=xL(AB(e.a,o-1),117)).e&&10!=a.e||0!=t.e&&10!=t.e?Cm(e.a,t):(0==t.e||t.Yl().length,0==a.e?(n=new uy,(r=a.Wl())>=i_e?Fk(n,D8(r)):Vj(n,r&pEe),a=new nH(10,null,0),function(e,t,n){FF(n,e.a.c.length),Kq(e.a,n,t)}(e.a,a,o-1)):(a.Yl().length,Fk(n=new uy,a.Yl())),0==t.e?(r=t.Wl())>=i_e?Fk(n,D8(r)):Vj(n,r&pEe):Fk(n,t.Yl()),xL(a,514).b=n.a):Cm(e.a,t);else for(i=0;i1&&(c=l.hg(c,e.a));return 1==c.c.length?xL($D(c,c.c.length-1),218):2==c.c.length?function(e,t,n,i){var a,o,s,c,l,u,f,h,d,p,g,b,m;return o=e.i,f=t.i,s=o==(Efe(),k3e)||o==M3e,c=o==C3e||o==k3e,h=f==C3e||f==k3e,!s||f!=k3e&&f!=M3e?(o==C3e||o==I3e)&&(f==C3e||f==I3e)?e.i==I3e?e:t:c&&h?(o==C3e?(u=e,l=t):(u=t,l=e),d=n.j+n.f,p=u.g+i.f,g=r.Math.max(d,p)-r.Math.min(n.j,u.g),a=(u.f+i.g-n.i)*g,b=n.i+n.g,m=l.f+i.g,a<=(r.Math.max(b,m)-r.Math.min(n.i,l.f))*(l.g+i.f-n.j)?e.i==C3e?e:t:e.i==k3e?e:t):e:e.i==M3e?e:t}((dG(0,c.c.length),xL(c.c[0],218)),(dG(1,c.c.length),xL(c.c[1],218)),s,o):null}function ome(e,t,n){var i,a,o;if((a=xL(Hae(t,(mve(),JYe)),273))!=(foe(),$Ve)){switch(Qie(n,"Horizontal Compaction",1),e.a=t,i=new hle(((o=new lZ).d=t,o.c=xL(Hae(o.d,vKe),216),function(e){var t,n,r,i,a,o,s;for(t=!1,n=0,i=new td(e.d.b);i.a0&&R3(c,!0,(K6(),I8e)),o.k==(yoe(),f$e)&&GB(c),zB(e.f,o,t)):((l=(r=xL(d$(R8(o)),18)).c.i)==o&&(l=r.d.i),u=new GA(l,IR(kM(o.n),l.n)),zB(e.b,o,u))}(o),function(e){var t,n,i;switch((t=xL(Hae(e.d,(mve(),vKe)),216)).g){case 2:n=function(e){var t,n,r,i,a,o,s,c,l,u,f,h,d,g,b;for(g=new $b,f=new td(e.d.b);f.ai.d.d+i.d.a?u.f.d=!0:(u.f.d=!0,u.f.a=!0))),r.b!=r.d.c&&(t=n);u&&(a=xL(qj(e.f,o.d.i),56),t.ba.d.d+a.d.a?u.f.d=!0:(u.f.d=!0,u.f.a=!0))}for(s=new lU(NI(P8(h).a.Ic(),new p));Wle(s);)0!=(o=xL(qq(s),18)).a.b&&(t=xL(LO(o.a),8),o.d.j==(Lwe(),Q9e)&&((b=new abe(t,new HA(t.a,i.d.d),i,o)).f.a=!0,b.a=o.d,g.c[g.c.length]=b),o.d.j==g7e&&((b=new abe(t,new HA(t.a,i.d.d+i.d.a),i,o)).f.d=!0,b.a=o.d,g.c[g.c.length]=b))}return g}(e);break;case 3:i=new $b,aS(lz(uz(DZ(DZ(new JD(null,new LG(e.d.b,16)),new Ai),new ki),new Ci),new di),new Up(i)),n=i;break;default:throw Jb(new Pv("Compaction not supported for "+t+" edges."))}!function(e,t){var n,i,a,o,s,c,l;if(0!=t.c.length){for(i$(),bF(t.c,t.c.length,null),i=xL(iV(a=new td(t)),145);a.a=r.Math.abs(i.b)?(i.b=0,o.d+o.a>s.d&&o.ds.c&&o.c0){if(t=new mk(e.i,e.g),a=(n=e.i)<100?null:new oE(n),e.dj())for(r=0;r0){for(s=e.g,l=e.i,SX(e),a=l<100?null:new oE(l),r=0;r4){if(!e.rj(t))return!1;if(e.mk()){if(s=(n=(r=xL(t,48)).Pg())==e.e&&(e.yk()?r.Jg(r.Qg(),e.uk())==e.vk():-1-r.Qg()==e.Xi()),e.zk()&&!s&&!n&&r.Ug())for(i=0;i0)if(t=new J0(e.Bi()),a=(n=u)<100?null:new oE(n),zN(e,n,t.g),i=1==n?e.Ui(4,FQ(t,0),null,0,c):e.Ui(6,t,null,-1,c),e.Yi()){for(r=new gI(t);r.e!=r.i.gc();)a=e.$i(aee(r),a);a?(a.zi(i),a.Ai()):e.Vi(i)}else a?(a.zi(i),a.Ai()):e.Vi(i);else zN(e,e.Qi(),e.Ri()),e.Vi(e.Ui(6,(i$(),dFe),null,-1,c));else if(e.Yi())if((u=e.Qi())>0){for(s=e.Ri(),l=u,zN(e,u,s),a=l<100?null:new oE(l),r=0;r.5?m-=2*o*(p-.5):p<.5&&(m+=2*a*(.5-p)),m<(i=s.d.b)&&(m=i),g=s.d.c,m>b.a-g-u&&(m=b.a-g-u),s.n.a=t+m}}function bme(e,t,n){var r,i,a,o,s,c;if(0==t.l&&0==t.m&&0==t.h)throw Jb(new _v("divide by zero"));if(0==e.l&&0==e.m&&0==e.h)return n&&(bDe=SM(0,0,0)),SM(0,0,0);if(t.h==VEe&&0==t.m&&0==t.l)return function(e,t){return e.h==VEe&&0==e.m&&0==e.l?(t&&(bDe=SM(0,0,0)),dC((RQ(),vDe))):(t&&(bDe=SM(e.l,e.m,e.h)),SM(0,0,0))}(e,n);if(c=!1,t.h>>19!=0&&(t=G3(t),c=!c),o=function(e){var t,n,r;return 0!=((n=e.l)&n-1)||0!=((r=e.m)&r-1)||0!=((t=e.h)&t-1)||0==t&&0==r&&0==n?-1:0==t&&0==r&&0!=n?A1(n):0==t&&0!=r&&0==n?A1(r)+22:0!=t&&0==r&&0==n?A1(t)+44:-1}(t),a=!1,i=!1,r=!1,e.h==VEe&&0==e.m&&0==e.l){if(i=!0,a=!0,-1!=o)return s=Zle(e,o),c&&c4(s),n&&(bDe=SM(0,0,0)),s;e=dC((RQ(),mDe)),r=!0,c=!c}else e.h>>19!=0&&(a=!0,e=G3(e),r=!0,c=!c);return-1!=o?function(e,t,n,r,i){var a;return a=Zle(e,t),n&&c4(a),i&&(e=function(e,t){var n,r,i;return t<=22?(n=e.l&(1<=0&&(!qne(e,o)||(c<22?s.l|=1<>>1,o.m=l>>>1|(1&u)<<21,o.l=f>>>1|(1&l)<<21,--c;return n&&c4(s),a&&(r?(bDe=G3(e),i&&(bDe=S3(bDe,(RQ(),vDe)))):bDe=SM(e.l,e.m,e.h)),s}(r?e:SM(e.l,e.m,e.h),t,c,a,i,n)}function mme(e,t){var n,r,i,a,o,s,c,l,u,f,h,d,p;if(e.e&&e.c.c=0)return i=function(e,t){var n;if(RM(n=Dfe(e.Og(),t),97))return xL(n,17);throw Jb(new Rv(lOe+t+"' is not a valid reference"))}(e,t.substr(1,a-1)),function(e,t,n){var r,i,a,o,s,c,l,u,f,h;for(c=new $b,f=t.length,o=i4(n),l=0;l=0?e.Wg(l,!1,!0):Jce(e,n,!1),57).Ic();a.Ob();){for(i=xL(a.Pb(),55),u=0;u=0){r=xL(CX(e,xQ(e,t.substr(1,n-1)),!1),57),c=0;try{c=kpe(t.substr(n+1),iEe,Jve)}catch(e){throw RM(e=H2(e),127)?Jb(new uZ(e)):Jb(e)}if(ct.f||t.g>e.f)){for(n=0,r=0,o=e.w.a.ec().Ic();o.Ob();)i=xL(o.Pb(),11),C5(u4(m3(ay(v5e,1),kye,8,0,[i.i.n,i.n,i.a])).b,t.g,t.f)&&++n;for(s=e.r.a.ec().Ic();s.Ob();)i=xL(s.Pb(),11),C5(u4(m3(ay(v5e,1),kye,8,0,[i.i.n,i.n,i.a])).b,t.g,t.f)&&--n;for(c=t.w.a.ec().Ic();c.Ob();)i=xL(c.Pb(),11),C5(u4(m3(ay(v5e,1),kye,8,0,[i.i.n,i.n,i.a])).b,e.g,e.f)&&++r;for(a=t.r.a.ec().Ic();a.Ob();)i=xL(a.Pb(),11),C5(u4(m3(ay(v5e,1),kye,8,0,[i.i.n,i.n,i.a])).b,e.g,e.f)&&--r;n=0)return n;switch(UB(gZ(e,n))){case 2:if(eP("",S6(e,n.Cj()).ne())){if(c=xue(e,t,s=Nz(gZ(e,n)),Oz(gZ(e,n))))return c;for(o=0,l=(i=ape(e,t)).gc();o1,u=new GX(d.b);vM(u.a)||vM(u.b);)h=(l=xL(vM(u.a)?iV(u.a):iV(u.b),18)).c==d?l.d:l.c,r.Math.abs(u4(m3(ay(v5e,1),kye,8,0,[h.i.n,h.n,h.a])).b-s.b)>1&&ahe(e,l,s,o,d)}}function Tme(){Tme=S,ort=(xE(),art).b,lrt=xL(FQ(u$(art.b),0),32),srt=xL(FQ(u$(art.b),1),32),crt=xL(FQ(u$(art.b),2),32),vrt=art.bb,xL(FQ(u$(art.bb),0),32),xL(FQ(u$(art.bb),1),32),Ert=art.fb,_rt=xL(FQ(u$(art.fb),0),32),xL(FQ(u$(art.fb),1),32),xL(FQ(u$(art.fb),2),17),xrt=art.qb,krt=xL(FQ(u$(art.qb),0),32),xL(FQ(u$(art.qb),1),17),xL(FQ(u$(art.qb),2),17),Trt=xL(FQ(u$(art.qb),3),32),Art=xL(FQ(u$(art.qb),4),32),Mrt=xL(FQ(u$(art.qb),6),32),Crt=xL(FQ(u$(art.qb),5),17),urt=art.j,frt=art.k,hrt=art.q,drt=art.w,prt=art.B,grt=art.A,brt=art.C,mrt=art.D,wrt=art._,yrt=art.cb,Srt=art.hb}function Ame(e,t){var n;if(null==t||eP(t,cye))return null;if(0==t.length&&e.k!=(wse(),l5e))return null;switch(e.k.g){case 1:return X7(t,uIe)?(pO(),_De):X7(t,fIe)?(pO(),EDe):null;case 2:try{return G6(kpe(t,iEe,Jve))}catch(e){if(RM(e=H2(e),127))return null;throw Jb(e)}case 4:try{return woe(t)}catch(e){if(RM(e=H2(e),127))return null;throw Jb(e)}case 3:return t;case 5:return M5(e),Dce(e,t);case 6:return M5(e),function(e,t,n){var r,i,a,o,s,c,l;for(l=new PP(r=xL(t.e&&t.e(),9),xL(lR(r,r.length),9),0),o=0,s=(a=ipe(n,"[\\[\\]\\s,]+")).length;o-2;default:return!1}switch(t=e.bj(),e.p){case 0:return null!=t&&Av(ON(t))!=F_(e.k,0);case 1:return null!=t&&xL(t,215).a!=zD(e.k)<<24>>24;case 2:return null!=t&&xL(t,172).a!=(zD(e.k)&pEe);case 6:return null!=t&&F_(xL(t,162).a,e.k);case 5:return null!=t&&xL(t,20).a!=zD(e.k);case 7:return null!=t&&xL(t,186).a!=zD(e.k)<<16>>16;case 3:return null!=t&&Mv(NN(t))!=e.j;case 4:return null!=t&&xL(t,155).a!=e.j;default:return null==t?null!=e.n:!C6(t,e.n)}}function Mme(e,t,n){var r,i,a,o;return e.Ak()&&e.zk()&&Ak(o=DU(e,xL(n,55)))!==Ak(n)?(e.Ji(t),e.Pi(t,yK(e,0,o)),e.mk()&&(i=xL(n,48),a=e.yk()?e.wk()?i.dh(e.b,Ote(xL(mQ(F$(e.b),e.Xi()),17)).n,xL(mQ(F$(e.b),e.Xi()).Tj(),26).wj(),null):i.dh(e.b,k9(i.Og(),Ote(xL(mQ(F$(e.b),e.Xi()),17))),null,null):i.dh(e.b,-1-e.Xi(),null,null),!xL(o,48).$g()&&(r=xL(o,48),a=e.yk()?e.wk()?r.ah(e.b,Ote(xL(mQ(F$(e.b),e.Xi()),17)).n,xL(mQ(F$(e.b),e.Xi()).Tj(),26).wj(),a):r.ah(e.b,k9(r.Og(),Ote(xL(mQ(F$(e.b),e.Xi()),17))),null,a):r.ah(e.b,-1-e.Xi(),null,a)),a&&a.Ai()),NC(e.b)&&e.Vi(e.Ui(9,n,o,t,!1)),o):n}function Ime(e,t,n){var i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v,y,E;for(f=Mv(NN(Hae(e,(mve(),zZe)))),i=Mv(NN(Hae(e,eQe))),q3(d=new Xs,zZe,f+i),w=(u=t).d,b=u.c.i,v=u.d.i,m=AC(b.c),y=AC(v.c),a=new $b,h=m;h<=y;h++)wh(c=new Lte(e),(yoe(),d$e)),q3(c,(Nve(),QWe),u),q3(c,yZe,(Hie(),F9e)),q3(c,HZe,d),p=xL($D(e.b,h),29),h==m?Qne(c,p.a.c.length-n,p):mG(c,p),(E=Mv(NN(Hae(u,AKe))))<0&&q3(u,AKe,E=0),c.o.b=E,g=r.Math.floor(E/2),mce(s=new Poe,(Lwe(),m7e)),wG(s,c),s.n.b=g,mce(l=new Poe,Z9e),wG(l,c),l.n.b=g,gG(u,s),L2(o=new _$,u),q3(o,FKe,null),bG(o,l),gG(o,w),Dre(c,u,o),a.c[a.c.length]=o,u=o;return a}function Ome(e,t){var n,r,i,a,o,s,c,l,u,f,h,d,p,g,b;for(s=xL(Boe(e,(Lwe(),m7e)).Ic().Pb(),11).e,f=xL(Boe(e,Z9e).Ic().Pb(),11).g,o=s.c.length,b=jG(xL($D(e.j,0),11));o-- >0;){for(dG(0,s.c.length),d=xL(s.c[0],18),dG(0,f.c.length),i=YK((r=xL(f.c[0],18)).d.e,r,0),KV(d,r.d,i),bG(r,null),gG(r,null),h=d.a,t&&oD(h,new nM(b)),n=xee(r.a,0);n.b!=n.d.c;)oD(h,new nM(xL(_W(n),8)));for(g=d.b,u=new td(r.b);u.a0&&(s=r.Math.max(s,k0(e.B.b+i.d.b,a))),f=i,h=a,d=o;e.B&&e.B.c>0&&(p=d+e.B.c,u&&(p+=f.d.c),s=r.Math.max(s,(hM(),eJ(CSe),r.Math.abs(h-1)<=CSe||1==h||isNaN(h)&&isNaN(1)?0:p/(1-h)))),n.n.b=0,n.a.a=s}function Pme(e,t){var n,i,a,o,s,c,l,u,f,h,d,p;if(n=xL(QB(e.b,t),121),(l=xL(xL(MX(e.r,t),21),81)).dc())return n.n.d=0,void(n.n.a=0);for(u=e.t.Fc((lae(),V9e)),s=0,e.w.Fc((x7(),C7e))&&ade(e,t),c=l.Ic(),f=null,d=0,h=0;c.Ob();)o=Mv(NN((i=xL(c.Pb(),110)).b.Xe((dO(),Dje)))),a=i.b.pf().b,f?(p=h+f.d.a+e.v+i.d.d,s=r.Math.max(s,(hM(),eJ(CSe),r.Math.abs(d-o)<=CSe||d==o||isNaN(d)&&isNaN(o)?0:p/(o-d)))):e.B&&e.B.d>0&&(s=r.Math.max(s,k0(e.B.d+i.d.d,o))),f=i,d=o,h=a;e.B&&e.B.a>0&&(p=h+e.B.a,u&&(p+=f.d.a),s=r.Math.max(s,(hM(),eJ(CSe),r.Math.abs(d-1)<=CSe||1==d||isNaN(d)&&isNaN(1)?0:p/(1-d)))),n.n.d=0,n.a.b=s}function Lme(e,t,n){var r,i,a,o,s,c;for(this.g=e,s=t.d.length,c=n.d.length,this.d=HY(b$e,gTe,10,s+c,0,1),o=0;o0?HQ(this,this.f/this.a):null!=tI(t.g,t.d[0]).a&&null!=tI(n.g,n.d[0]).a?HQ(this,(Mv(tI(t.g,t.d[0]).a)+Mv(tI(n.g,n.d[0]).a))/2):null!=tI(t.g,t.d[0]).a?HQ(this,tI(t.g,t.d[0]).a):null!=tI(n.g,n.d[0]).a&&HQ(this,tI(n.g,n.d[0]).a)}function Dme(e,t,n){var r,i,a,o,s,c,l,u,f,h,d,p,g,b,m;if(h=new nM(e.o),m=t.a/h.a,s=t.b/h.b,g=t.a-h.a,a=t.b-h.b,n)for(i=Ak(Hae(e,(mve(),yZe)))===Ak((Hie(),F9e)),p=new td(e.j);p.a=1&&(b-o>0&&f>=0?(c.n.a+=g,c.n.b+=a*o):b-o<0&&u>=0&&(c.n.a+=g*b,c.n.b+=a));e.o.a=t.a,e.o.b=t.b,q3(e,(mve(),aZe),(x7(),new PP(r=xL(NE(B7e),9),xL(lR(r,r.length),9),0)))}function Fme(e){var t,n,r,i,a,o,s,c,l,u;for(r=new $b,o=new td(e.e.a);o.a=s&&i<=c)s<=i&&a<=c?(n[u++]=i,n[u++]=a,r+=2):s<=i?(n[u++]=i,n[u++]=c,e.b[r]=c+1,o+=2):a<=c?(n[u++]=s,n[u++]=a,r+=2):(n[u++]=s,n[u++]=c,e.b[r]=c+1);else{if(!(c=2){for(o=xL(_W(c=xee(n,0)),8),s=xL(_W(c),8);s.a=e.i?(++e.i,SL(e.a,G6(1)),SL(e.b,l)):(r=e.c[t.p][1],Kq(e.a,c,G6(xL($D(e.a,c),20).a+1-r)),Kq(e.b,c,Mv(NN($D(e.b,c)))+l-r*e.e)),(e.q==(Tfe(),DQe)&&(xL($D(e.a,c),20).a>e.j||xL($D(e.a,c-1),20).a>e.j)||e.q==jQe&&(Mv(NN($D(e.b,c)))>e.k||Mv(NN($D(e.b,c-1)))>e.k))&&(s=!1),a=new lU(NI(P8(t).a.Ic(),new p));Wle(a);)o=xL(qq(a),18).c.i,e.f[o.p]==c&&(i+=xL((u=Hme(e,o)).a,20).a,s=s&&Av(ON(u.b)));return e.f[t.p]=c,new GA(G6(i+=e.c[t.p][0]),(pO(),!!s))}function Gme(e,t,n,i,a){var o,s,c,l,u,f,h,d,p,g,b,m,w;for(h=new Hb,s=new $b,kce(e,n,e.d.ag(),s,h),kce(e,i,e.d.bg(),s,h),e.b=.2*(b=uue(DZ(new JD(null,new LG(s,16)),new So)),m=uue(DZ(new JD(null,new LG(s,16)),new xo)),r.Math.min(b,m)),o=0,c=0;c=2&&(w=yfe(s,!0,d),!e.e&&(e.e=new Eg(e)),V7(e.e,w,s,e.b)),Xie(s,d),function(e){var t,n,i,a,o,s,c,l,u;for(l=new $b,s=new $b,o=new td(e);o.a-1){for(a=new td(s);a.a0||(Nh(c,r.Math.min(c.o,i.o-1)),Ih(c,c.i-1),0==c.i&&(s.c[s.c.length]=c))}}(s),p=-1,f=new td(s);f.an))}(e)&&(r=(Ak(Hae(e,CKe))===Ak(s9e)?xL(Hae(e,rKe),292):xL(Hae(e,iKe),292))==(d2(),aWe)?(Pve(),SHe):(Pve(),FHe),AD(t,(Gae(),Rze),r)),xL(Hae(e,cQe),375).g){case 1:AD(t,(Gae(),Rze),(Pve(),LHe));break;case 2:zF(AD(AD(t,(Gae(),Nze),(Pve(),L$e)),Rze,D$e),Pze,F$e)}return Ak(Hae(e,eKe))!==Ak((p4(),WQe))&&AD(t,(Gae(),Nze),(Pve(),DHe)),t}(t)),q3(t,cqe,mme(e.a,t))}function Wme(e,t){var n,i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v;for(u=e_e,f=e_e,c=t_e,l=t_e,d=new td(t.i);d.a=s&&i<=c)s<=i&&a<=c?r+=2:s<=i?(e.b[r]=c+1,o+=2):a<=c?(n[u++]=i,n[u++]=s-1,r+=2):(n[u++]=i,n[u++]=s-1,e.b[r]=c+1,o+=2);else{if(!(c0?1:0;a.a[i]!=n;)a=a.a[i],i=e.a.ue(n.d,a.d)>0?1:0;a.a[i]=r,r.b=n.b,r.a[0]=n.a[0],r.a[1]=n.a[1],n.a[0]=null,n.a[1]=null}(e,c,o,u=new YY(f.d,f.e)),h==o&&(h=u)),h.a[h.a[1]==f?1:0]=f.a[f.a[0]?0:1],--e.c),e.b=c.a[1],e.b&&(e.b.b=!1),n.b}function Jme(e){var t,n,r,i,a,o,s,c;for(t=null,r=new td(e);r.a0&&0==n.c&&(!t&&(t=new $b),t.c[t.c.length]=n);if(t)for(;0!=t.c.length;){if((n=xL(RX(t,0),232)).b&&n.b.c.length>0)for(!n.b&&(n.b=new $b),a=new td(n.b);a.aYK(e,n,0))return new GA(i,n)}else if(Mv(tI(i.g,i.d[0]).a)>Mv(tI(n.g,n.d[0]).a))return new GA(i,n);for(s=(!n.e&&(n.e=new $b),n.e).Ic();s.Ob();)!(o=xL(s.Pb(),232)).b&&(o.b=new $b),MH(0,(c=o.b).c.length),KT(c.c,0,n),o.c==c.c.length&&(t.c[t.c.length]=o)}return null}function ewe(e,t){var n,r,i,a,o,s;if(null==e)return cye;if(null!=t.a.xc(e,t))return"[...]";for(n=new P2(rye,"[","]"),a=0,o=(i=e).length;a=14&&s<=16?RM(r,177)?jX(n,hce(xL(r,177))):RM(r,190)?jX(n,Gie(xL(r,190))):RM(r,194)?jX(n,Coe(xL(r,194))):RM(r,1981)?jX(n,Vie(xL(r,1981))):RM(r,47)?jX(n,fce(xL(r,47))):RM(r,361)?jX(n,Rce(xL(r,361))):RM(r,811)?jX(n,uce(xL(r,811))):RM(r,103)&&jX(n,lce(xL(r,103))):t.a._b(r)?(n.a?Bk(n.a,n.b):n.a=new zI(n.d),Uk(n.a,"[...]")):jX(n,ewe(KQ(r),new UD(t))):jX(n,null==r?cye:K8(r));return n.a?0==n.e.length?n.a.a:n.a.a+""+n.e:n.c}function twe(e,t,n,i){var a,o,s;return function(e,t){var n,r,i,a;for(n=!t||!e.t.Fc((lae(),V9e)),a=0,i=new td(e.e.Af());i.ai.d,i.d=r.Math.max(i.d,t),c&&n&&(i.d=r.Math.max(i.d,i.a),i.a=i.d+a);break;case 3:n=t>i.a,i.a=r.Math.max(i.a,t),c&&n&&(i.a=r.Math.max(i.a,i.d),i.d=i.a+a);break;case 2:n=t>i.c,i.c=r.Math.max(i.c,t),c&&n&&(i.c=r.Math.max(i.b,i.c),i.b=i.c+a);break;case 4:n=t>i.b,i.b=r.Math.max(i.b,t),c&&n&&(i.b=r.Math.max(i.b,i.c),i.c=i.b+a)}}}(o),function(e){switch(e.q.g){case 5:Zre(e,(Lwe(),Q9e)),Zre(e,g7e);break;case 4:Rme(e,(Lwe(),Q9e)),Rme(e,g7e);break;default:Mse(e,(Lwe(),Q9e)),Mse(e,g7e)}}(o),function(e){switch(e.q.g){case 5:Qre(e,(Lwe(),Z9e)),Qre(e,m7e);break;case 4:Pme(e,(Lwe(),Z9e)),Pme(e,m7e);break;default:Ise(e,(Lwe(),Z9e)),Ise(e,m7e)}}(o),function(e){var t,n,r,i,a,o,s;if(!e.w.dc()){if(e.w.Fc((x7(),k7e))&&(xL(QB(e.b,(Lwe(),Q9e)),121).k=!0,xL(QB(e.b,g7e),121).k=!0,t=e.q!=(Hie(),U9e)&&e.q!=F9e,gh(xL(QB(e.b,Z9e),121),t),gh(xL(QB(e.b,m7e),121),t),gh(e.g,t),e.w.Fc(C7e)&&(xL(QB(e.b,Q9e),121).j=!0,xL(QB(e.b,g7e),121).j=!0,xL(QB(e.b,Z9e),121).k=!0,xL(QB(e.b,m7e),121).k=!0,e.g.k=!0)),e.w.Fc(A7e))for(e.a.j=!0,e.a.k=!0,e.g.j=!0,e.g.k=!0,s=e.A.Fc((Tpe(),D7e)),a=0,o=(i=Tee()).length;a2?(a3(l=new $b,new PG(p,1,p.b)),L2(g=new Qle(xve(l,b+e.a)),t),n.c[n.c.length]=g):g=xL(qj(e.b,i?Dae(t):jae(t)),265),s=Dae(t),i&&(s=jae(t)),o=function(e,t){var n,i,a;return a=bxe,ete(),i=nBe,a=r.Math.abs(e.b),(n=r.Math.abs(t.f-e.b))>16==-10?n=xL(e.Cb,283).ik(t,n):e.Db>>16==-15&&(!t&&(Fve(),t=tnt),!s&&(Fve(),s=tnt),e.Cb.ih()&&(o=new fZ(e.Cb,1,13,s,t,dte(dZ(xL(e.Cb,58)),e),!1),n?n.zi(o):n=o));else if(RM(e.Cb,87))e.Db>>16==-23&&(RM(t,87)||(Fve(),t=int),RM(s,87)||(Fve(),s=int),e.Cb.ih()&&(o=new fZ(e.Cb,1,10,s,t,dte(XW(xL(e.Cb,26)),e),!1),n?n.zi(o):n=o));else if(RM(e.Cb,438))for(!(a=xL(e.Cb,814)).b&&(a.b=new Nb(new Ow)),i=new Rb(new F4(new Fh(a.b.a).a));i.a.b;)n=rwe(r=xL(JQ(i.a).ad(),86),nfe(r,a),n);return n}function iwe(e){var t,n,i,a,o,s,c,l,u,f,h,d;if((d=xL(gue(e,(Ove(),I6e)),21)).dc())return null;if(c=0,s=0,d.Fc((x7(),k7e))){for(f=xL(gue(e,Q6e),100),i=2,n=2,a=2,o=2,t=$H(e)?xL(gue($H(e),a6e),108):xL(gue(e,a6e),108),u=new gI((!e.c&&(e.c=new AU(Det,e,9,9)),e.c));u.e!=u.i.gc();)if(l=xL(aee(u),122),(h=xL(gue(l,a8e),61))==(Lwe(),b7e)&&(h=Ege(l,t),Zee(l,a8e,h)),f==(Hie(),F9e))switch(h.g){case 1:i=r.Math.max(i,l.i+l.g);break;case 2:n=r.Math.max(n,l.j+l.f);break;case 3:a=r.Math.max(a,l.i+l.g);break;case 4:o=r.Math.max(o,l.j+l.f)}else switch(h.g){case 1:i+=l.g+2;break;case 2:n+=l.f+2;break;case 3:a+=l.g+2;break;case 4:o+=l.f+2}c=r.Math.max(i,a),s=r.Math.max(n,o)}return $we(e,c,s,!0,!0)}function awe(e,t,n,i,a){var o,s,c,l,u,f,h,d,p,g,b,m,w,v,y,E;for(v=xL(bq(MQ(lz(new JD(null,new LG(t.d,16)),new $p(n)),new Hp(n)),rK(new U,new F,new re,m3(ay(rUe,1),Kye,132,0,[(o5(),YFe)]))),14),h=Jve,f=iEe,l=new td(t.b.j);l.a0)?l&&(u=g.p,o?++u:--u,f=!(Sfe(r=O3(xL($D(g.c.a,u),10)),y,n[0])||wU(r,y,n[0]))):f=!0),h=!1,(v=t.D.i)&&v.c&&s.e&&(o&&v.p>0||!o&&v.p0&&(t.a+=rye),lwe(xL(aee(o),160),t);for(t.a+=hTe,s=new AO((!r.c&&(r.c=new VR(ket,r,5,8)),r.c));s.e!=s.i.gc();)s.e>0&&(t.a+=rye),lwe(xL(aee(s),160),t);t.a+=")"}}}function uwe(e,t,n){var r,i,a,o,s,c,l,u;for(L2(l=new Lte(n),t),q3(l,(Nve(),QWe),t),l.o.a=t.g,l.o.b=t.f,l.n.a=t.i,l.n.b=t.j,SL(n.a,l),zB(e.a,t,l),(0!=(!t.a&&(t.a=new AU(Let,t,10,11)),t.a).i||Av(ON(gue(t,(mve(),RKe)))))&&q3(l,_We,(pO(),!0)),c=xL(Hae(n,DWe),21),(u=xL(Hae(l,(mve(),yZe)),100))==(Hie(),z9e)?q3(l,yZe,B9e):u!=B9e&&c.Dc((Uhe(),QVe)),r=xL(Hae(n,hKe),108),s=new gI((!t.c&&(t.c=new AU(Det,t,9,9)),t.c));s.e!=s.i.gc();)Av(ON(gue(o=xL(aee(s),122),cZe)))||Awe(e,o,l,c,r,u);for(a=new gI((!t.n&&(t.n=new AU(Pet,t,1,7)),t.n));a.e!=a.i.gc();)!Av(ON(gue(i=xL(aee(a),137),cZe)))&&i.a&&SL(l.b,Y5(i));return Av(ON(Hae(l,KYe)))&&c.Dc((Uhe(),qVe)),Av(ON(Hae(l,NKe)))&&(c.Dc((Uhe(),ZVe)),c.Dc(KVe),q3(l,yZe,B9e)),l}function fwe(e,t,n){var r,i,a,o,s,c,l,u,f,h,d;if(a=xL(Hae(e,(Nve(),QWe)),80)){for(r=e.a,MR(i=new nM(n),function(e){var t,n,r,i;if(i=xL(Hae(e,(Nve(),SWe)),38)){for(r=new lE,t=xB(e.c.i);t!=i;)t=xB(n=t.e),XO(MR(MR(r,n.n),t.c),t.d.b,t.d.d);return r}return A$e}(e)),_2(e.d.i,e.c.i)?(h=e.c,IR(f=u4(m3(ay(v5e,1),kye,8,0,[h.n,h.a])),n)):f=jG(e.c),mq(r,f,r.a,r.a.a),d=jG(e.d),null!=Hae(e,wqe)&&MR(d,xL(Hae(e,wqe),8)),mq(r,d,r.c.b,r.c),VQ(r,i),p1(o=Rhe(a,!0,!0),xL(FQ((!a.b&&(a.b=new VR(ket,a,4,7)),a.b),0),93)),g1(o,xL(FQ((!a.c&&(a.c=new VR(ket,a,5,8)),a.c),0),93)),Lge(r,o),u=new td(e.b);u.ao?1:bC(isNaN(0),isNaN(o)))<0&&(eJ(LCe),(r.Math.abs(o-1)<=LCe||1==o||isNaN(o)&&isNaN(1)?0:o<1?-1:o>1?1:bC(isNaN(o),isNaN(1)))<0)&&(eJ(LCe),(r.Math.abs(0-s)<=LCe||0==s||isNaN(0)&&isNaN(s)?0:0s?1:bC(isNaN(0),isNaN(s)))<0)&&(eJ(LCe),(r.Math.abs(s-1)<=LCe||1==s||isNaN(s)&&isNaN(1)?0:s<1?-1:s>1?1:bC(isNaN(s),isNaN(1)))<0))}function dwe(e){US(e,new cae(qy(zy(Wy(By(Vy(Hy(new hs,Rxe),"ELK Force"),"Force-based algorithm provided by the Eclipse Layout Kernel. Implements methods that follow physical analogies by simulating forces that move the nodes into a balanced distribution. Currently the original Eades model and the Fruchterman - Reingold model are supported."),new bt),Rxe),EF(($le(),Get),m3(ay(Yet,1),Kye,237,0,[$et]))))),BV(e,Rxe,Pxe,G6(1)),BV(e,Rxe,Lxe,80),BV(e,Rxe,Dxe,5),BV(e,Rxe,hxe,Nxe),BV(e,Rxe,Fxe,G6(1)),BV(e,Rxe,Uxe,(pO(),!0)),BV(e,Rxe,dxe,YBe),BV(e,Rxe,jxe,Mee(VBe)),BV(e,Rxe,Bxe,Mee(KBe)),BV(e,Rxe,zxe,!1),BV(e,Rxe,Txe,Mee(qBe)),BV(e,Rxe,Cxe,Mee(ize)),BV(e,Rxe,Axe,Mee(WBe)),BV(e,Rxe,Ixe,Mee(JBe)),BV(e,Rxe,kxe,Mee(eze))}function pwe(e,t){var n;if(e.e)throw Jb(new Pv((CN(vUe),X_e+vUe.k+Y_e)));if(!function(e,t){return QI(e.e,t)}(e.a,t))throw Jb(new sv(K_e+t+Z_e));if(t==e.d)return e;switch(n=e.d,e.d=t,n.g){case 0:switch(t.g){case 2:Sne(e);break;case 1:a4(e),Sne(e);break;case 4:gie(e),Sne(e);break;case 3:gie(e),a4(e),Sne(e)}break;case 2:switch(t.g){case 1:a4(e),Lde(e);break;case 4:gie(e),Sne(e);break;case 3:gie(e),a4(e),Sne(e)}break;case 1:switch(t.g){case 2:a4(e),Lde(e);break;case 4:a4(e),gie(e),Sne(e);break;case 3:a4(e),gie(e),a4(e),Sne(e)}break;case 4:switch(t.g){case 2:gie(e),Sne(e);break;case 1:gie(e),a4(e),Sne(e);break;case 3:a4(e),Lde(e)}break;case 3:switch(t.g){case 2:a4(e),gie(e),Sne(e);break;case 1:a4(e),gie(e),a4(e),Sne(e);break;case 4:a4(e),Lde(e)}}return e}function gwe(e,t){var n;if(e.d)throw Jb(new Pv((CN(Gze),X_e+Gze.k+Y_e)));if(!function(e,t){return QI(e.c,t)}(e.a,t))throw Jb(new sv(K_e+t+Z_e));if(t==e.c)return e;switch(n=e.c,e.c=t,n.g){case 0:switch(t.g){case 2:T4(e);break;case 1:o4(e),T4(e);break;case 4:bie(e),T4(e);break;case 3:bie(e),o4(e),T4(e)}break;case 2:switch(t.g){case 1:o4(e),Dde(e);break;case 4:bie(e),T4(e);break;case 3:bie(e),o4(e),T4(e)}break;case 1:switch(t.g){case 2:o4(e),Dde(e);break;case 4:o4(e),bie(e),T4(e);break;case 3:o4(e),bie(e),o4(e),T4(e)}break;case 4:switch(t.g){case 2:bie(e),T4(e);break;case 1:bie(e),o4(e),T4(e);break;case 3:o4(e),Dde(e)}break;case 3:switch(t.g){case 2:o4(e),bie(e),T4(e);break;case 1:o4(e),bie(e),o4(e),T4(e);break;case 4:o4(e),Dde(e)}}return e}function bwe(e,t,n){var i,a,o,s,c,l,u,f,h,d,p,g;for(d=n.d,h=n.c,s=(o=new HA(n.f.a+n.d.b+n.d.c,n.f.b+n.d.d+n.d.a)).b,u=new td(e.a);u.a0&&(e.a[t.c.p][t.p].d+=Fue(e.f,24)*x_e*.07000000029802322-.03500000014901161,e.a[t.c.p][t.p].a=e.a[t.c.p][t.p].d/e.a[t.c.p][t.p].b)}}function vwe(e,t,n,r){var i,a,o,s,c,l,u,f,h,d,p,g;for(c=new HA(r.i+r.g/2,r.j+r.f/2),h=eme(r),d=xL(gue(t,(mve(),yZe)),100),g=xL(gue(r,TZe),61),ck(Uee(r),vZe)||(p=0==r.i&&0==r.j?0:function(e,t){var n;if(!kH(e))throw Jb(new Pv(VIe));switch(n=kH(e),t.g){case 1:return-(e.j+e.f);case 2:return e.i-n.g;case 3:return e.j-n.f;case 4:return-(e.i+e.g)}return 0}(r,g),Zee(r,vZe,p)),q3(i=rve(r,d,g,h,new HA(t.g,t.f),c,new HA(r.g,r.f),xL(Hae(n,hKe),108),n),(Nve(),QWe),r),function(e,t){e.c=t}(a=xL($D(i.j,0),11),function(e){var t,n,r,i,a;for(a=kH(e),i=new gI((!e.e&&(e.e=new VR(Cet,e,7,4)),e.e));i.e!=i.i.gc();)if(r=xL(aee(i),80),!DQ(Jie(xL(FQ((!r.c&&(r.c=new VR(ket,r,5,8)),r.c),0),93)),a))return!0;for(n=new gI((!e.d&&(e.d=new VR(Cet,e,8,5)),e.d));n.e!=n.i.gc();)if(t=xL(aee(n),80),!DQ(Jie(xL(FQ((!t.b&&(t.b=new VR(ket,t,4,7)),t.b),0),93)),a))return!0;return!1}(r)),q3(i,SZe,(lae(),T8(q9e))),u=xL(gue(t,SZe),174).Fc(V9e),s=new gI((!r.n&&(r.n=new AU(Pet,r,1,7)),r.n));s.e!=s.i.gc();)if(!Av(ON(gue(o=xL(aee(s),137),cZe)))&&o.a&&(f=Y5(o),SL(a.f,f),!u))switch(l=0,vU(xL(gue(t,SZe),21))&&(l=Hce(new HA(o.i,o.j),new HA(o.g,o.f),new HA(r.g,r.f),0,g)),g.g){case 2:case 4:f.o.a=l;break;case 1:case 3:f.o.b=l}q3(i,WZe,NN(gue($H(t),WZe))),q3(i,GZe,NN(gue($H(t),GZe))),SL(n.a,i),zB(e.a,r,i)}function ywe(e,t,n,i,a){var o,s,c,l,u,f,h,d,p,g,b,m,w,v,y,E,_,S;for(S=0,p=0,h=new td(t.e);h.a=u&&_>=m&&(d+=g.n.b+b.n.b+b.a.b-E,++c));if(n)for(s=new td(v.e);s.a=u&&_>=m&&(d+=g.n.b+b.n.b+b.a.b-E,++c))}c>0&&(S+=d/c,++p)}p>0?(t.a=a*S/p,t.g=p):(t.a=0,t.g=0)}function Ewe(e,t){var n,i,a,o,s,c,l,u,f,h;for(i=new td(e.a.b);i.at_e||t.o==p1e&&u1||O2(oH(EF(G9e,m3(ay(w7e,1),Kye,291,0,[X9e])),e))>1)}(this.t))throw Jb(new Gv("Invalid port label placement: "+this.t));if(this.u=Av(ON(e.Xe(i8e))),this.j=xL(e.Xe(C6e),21),!function(e){return mue(),!(O2(oH(EF(_9e,m3(ay(P9e,1),Kye,92,0,[S9e])),e))>1||O2(oH(EF(v9e,m3(ay(P9e,1),Kye,92,0,[w9e,E9e])),e))>1||O2(oH(EF(A9e,m3(ay(P9e,1),Kye,92,0,[T9e,x9e])),e))>1)}(this.j))throw Jb(new Gv("Invalid node label placement: "+this.j));this.n=xL(lre(e,A6e),115),this.k=Mv(NN(lre(e,E8e))),this.d=Mv(NN(lre(e,y8e))),this.v=Mv(NN(lre(e,k8e))),this.s=Mv(NN(lre(e,_8e))),this.B=xL(lre(e,T8e),141),this.c=2*this.d,t=!this.A.Fc((Tpe(),O7e)),this.f=new tee(0,t,0),this.g=new tee(1,t,0),pv(this.f,(NQ(),XUe),this.g)}function Swe(e,t,n){var i,a,o,s,c,l,u,f,h,d,p,g,b,m,w;if(b=e.n,m=e.o,d=e.d,h=Mv(NN(q9(e,(mve(),LZe)))),t){for(f=h*(t.gc()-1),p=0,l=t.Ic();l.Ob();)f+=(s=xL(l.Pb(),10)).o.a,p=r.Math.max(p,s.o.b);for(w=b.a-(f-m.a)/2,o=b.b-d.d+p,a=i=m.a/(t.gc()+1),c=t.Ic();c.Ob();)(s=xL(c.Pb(),10)).n.a=w,s.n.b=o-s.o.b,w+=s.o.a+h,(u=lfe(s)).n.a=s.o.a/2-u.a.a,u.n.b=s.o.b,(g=xL(Hae(s,(Nve(),EWe)),11)).e.c.length+g.g.c.length==1&&(g.n.a=a-g.a.a,g.n.b=0,wG(g,e)),a+=i}if(n){for(f=h*(n.gc()-1),p=0,l=n.Ic();l.Ob();)f+=(s=xL(l.Pb(),10)).o.a,p=r.Math.max(p,s.o.b);for(w=b.a-(f-m.a)/2,o=b.b+m.b+d.a-p,a=i=m.a/(n.gc()+1),c=n.Ic();c.Ob();)(s=xL(c.Pb(),10)).n.a=w,s.n.b=o,w+=s.o.a+h,(u=lfe(s)).n.a=s.o.a/2-u.a.a,u.n.b=0,(g=xL(Hae(s,(Nve(),EWe)),11)).e.c.length+g.g.c.length==1&&(g.n.a=a-g.a.a,g.n.b=m.b,wG(g,e)),a+=i}}function xwe(e,t,n){var r,i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v;for(Qie(n,"Processor arrange level",1),u=0,i$(),J1(t,new bb((Sme(),d0e))),a=t.b,s=xee(t,t.b),l=!0;l&&s.b.b!=s.d.a;)b=xL(CV(s),83),0==xL(Hae(b,d0e),20).a?--a:l=!1;if(o=new TP(new PG(t,0,a)),c=new TP(new PG(t,a,t.b)),0==o.b)for(d=xee(c,0);d.b!=d.d.c;)q3(xL(_W(d),83),y0e,G6(u++));else for(f=o.b,v=xee(o,0);v.b!=v.d.c;){for(q3(w=xL(_W(v),83),y0e,G6(u++)),xwe(e,r=y3(w),P0(n,1/f|0)),J1(r,sz(new bb(y0e))),h=new iS,m=xee(r,0);m.b!=m.d.c;)for(b=xL(_W(m),83),g=xee(w.d,0);g.b!=g.d.c;)(p=xL(_W(g),188)).c==b&&mq(h,p,h.c.b,h.c);for(qz(w.d),w0(w.d,h),s=xee(c,c.b),i=w.d.b,l=!0;00&&(pG(0,e.length),45!=(t=e.charCodeAt(0))&&43!=t||(e=e.substr(1),--a,c=45==t)),0==a)throw Jb(new cy(JEe+l+'"'));for(;e.length>0&&(pG(0,e.length),48==e.charCodeAt(0));)e=e.substr(1),--a;if(a>(ige(),jDe)[10])throw Jb(new cy(JEe+l+'"'));for(i=0;i0&&(f=-parseInt(e.substr(0,r),10),e=e.substr(r),a-=r,n=!1);a>=o;){if(r=parseInt(e.substr(0,o),10),e=e.substr(o),a-=o,n)n=!1;else{if(K4(f,s)<0)throw Jb(new cy(JEe+l+'"'));f=A6(f,u)}f=k6(f,r)}if(K4(f,0)>0)throw Jb(new cy(JEe+l+'"'));if(!c&&K4(f=nK(f),0)<0)throw Jb(new cy(JEe+l+'"'));return f}function Awe(e,t,n,r,i,a){var o,s,c,l,u,f;for(L2(l=new Poe,t),mce(l,xL(gue(t,(mve(),TZe)),61)),q3(l,(Nve(),QWe),t),wG(l,n),(f=l.o).a=t.g,f.b=t.f,(u=l.n).a=t.i,u.b=t.j,zB(e.a,t,l),(o=tX(uz(DZ(new JD(null,(!t.e&&(t.e=new VR(Cet,t,7,4)),new LG(t.e,16))),new Gt),new $t),new ip(t)))||(o=tX(uz(DZ(new JD(null,(!t.d&&(t.d=new VR(Cet,t,8,5)),new LG(t.d,16))),new Vt),new Ht),new ap(t))),o||(o=tX(new JD(null,(!t.e&&(t.e=new VR(Cet,t,7,4)),new LG(t.e,16))),new Wt)),q3(l,jWe,(pO(),!!o)),function(e,t,n,r){var i,a,o,s,c,l;if((s=e.j)==(Lwe(),b7e)&&t!=(Hie(),B9e)&&t!=(Hie(),z9e)&&(mce(e,s=Kpe(e,n)),!(e.q?e.q:(i$(),i$(),pFe))._b((mve(),vZe))&&s!=b7e&&(0!=e.n.a||0!=e.n.b)&&q3(e,vZe,function(e,t){var n;switch(n=e.i,t.g){case 1:return-(e.n.b+e.o.b);case 2:return e.n.a-n.o.a;case 3:return e.n.b-n.o.b;case 4:return-(e.n.a+e.o.a)}return 0}(e,s))),t==(Hie(),U9e)){switch(l=0,s.g){case 1:case 3:(a=e.i.o.a)>0&&(l=e.n.a/a);break;case 2:case 4:(i=e.i.o.b)>0&&(l=e.n.b/i)}q3(e,(Nve(),sqe),l)}if(c=e.o,o=e.a,r)o.a=r.a,o.b=r.b,e.d=!0;else if(t!=B9e&&t!=z9e&&s!=b7e)switch(s.g){case 1:o.a=c.a/2;break;case 2:o.a=c.a,o.b=c.b/2;break;case 3:o.a=c.a/2,o.b=c.b;break;case 4:o.b=c.b/2}else o.a=c.a/2,o.b=c.b/2}(l,a,i,xL(gue(t,wZe),8)),c=new gI((!t.n&&(t.n=new AU(Pet,t,1,7)),t.n));c.e!=c.i.gc();)!Av(ON(gue(s=xL(aee(c),137),cZe)))&&s.a&&SL(l.f,Y5(s));switch(i.g){case 2:case 1:(l.j==(Lwe(),Q9e)||l.j==g7e)&&r.Dc((Uhe(),JVe));break;case 4:case 3:(l.j==(Lwe(),Z9e)||l.j==m7e)&&r.Dc((Uhe(),JVe))}return l}function kwe(e,t,n,i,a,o,s){var c,l,u,f,h,d,p,g,b,m,w,v;for(h=null,i==(W$(),H1e)?h=t:i==G1e&&(h=n),g=h.a.ec().Ic();g.Ob();){for(p=xL(g.Pb(),11),b=u4(m3(ay(v5e,1),kye,8,0,[p.i.n,p.n,p.a])).b,v=new Om,c=new Om,u=new GX(p.b);vM(u.a)||vM(u.b);)if(Av(ON(Hae(l=xL(vM(u.a)?iV(u.a):iV(u.b),18),(Nve(),fqe))))==a&&-1!=YK(o,l,0)){if(m=l.d==p?l.c:l.d,w=u4(m3(ay(v5e,1),kye,8,0,[m.i.n,m.n,m.a])).b,r.Math.abs(w-b)<.2)continue;w1)for(Jq(v,new jA(e,d=new ume(p,v,i))),s.c[s.c.length]=d,f=v.a.ec().Ic();f.Ob();)KK(o,xL(f.Pb(),46).b);if(c.a.gc()>1)for(Jq(c,new BA(e,d=new ume(p,c,i))),s.c[s.c.length]=d,f=c.a.ec().Ic();f.Ob();)KK(o,xL(f.Pb(),46).b)}}function Cwe(e,t){var n,i,a,o,s,c,l,u,f,h,d,p;for(n=0,i=function(e,t){switch(t.g){case 1:return e.f.n.d+e.s;case 3:return e.f.n.a+e.s;case 2:return e.f.n.c+e.s;case 4:return e.f.n.b+e.s;default:return 0}}(e,t),d=e.s,u=xL(xL(MX(e.r,t),21),81).Ic();u.Ob();)if((l=xL(u.Pb(),110)).c&&!(l.c.d.c.length<=0)){switch(p=l.b.pf(),c=l.b.Ye((Ove(),Z6e))?Mv(NN(l.b.Xe(Z6e))):0,(h=(f=l.c).i).b=(s=f.n,f.e.a+s.b+s.c),h.a=(o=f.n,f.e.b+o.d+o.a),t.g){case 1:h.c=l.a?(p.a-h.b)/2:p.a+d,h.d=p.b+c+i,lK(f,(IK(),JUe)),PN(f,(CZ(),cje));break;case 3:h.c=l.a?(p.a-h.b)/2:p.a+d,h.d=-c-i-h.a,lK(f,(IK(),JUe)),PN(f,(CZ(),oje));break;case 2:h.c=-c-i-h.b,l.a?(a=e.u?h.a:xL($D(f.d,0),183).pf().b,h.d=(p.b-a)/2):h.d=p.b+d,lK(f,(IK(),tje)),PN(f,(CZ(),sje));break;case 4:h.c=p.a+c+i,l.a?(a=e.u?h.a:xL($D(f.d,0),183).pf().b,h.d=(p.b-a)/2):h.d=p.b+d,lK(f,(IK(),eje)),PN(f,(CZ(),sje))}(t==(Lwe(),Q9e)||t==g7e)&&(n=r.Math.max(n,h.a))}n>0&&(xL(QB(e.b,t),121).a.b=n)}function Mwe(e,t){var n,r,i,a,o,s,c;if(qL(),this.a=new pI(this),this.b=e,this.c=t,this.f=nj(gZ((yse(),$nt),t)),this.f.dc())if((s=Yre($nt,e))==t)for(this.e=!0,this.d=new $b,this.f=new dc,this.f.Dc(IPe),xL(Wbe(pZ($nt,WQ(e)),""),26)==e&&this.f.Dc(UF($nt,WQ(e))),i=ope($nt,e).Ic();i.Ob();)switch(r=xL(i.Pb(),170),UB(gZ($nt,r))){case 4:this.d.Dc(r);break;case 5:this.f.Ec(nj(gZ($nt,r)))}else if(YS(),xL(t,65).Jj())for(this.e=!0,this.f=null,this.d=new $b,o=0,c=(null==e.i&&Oge(e),e.i).length;o=0&&o0&&(pG(0,t.length),64!=(s=t.charCodeAt(0)))){if(37==s&&(c=!1,0!=(u=t.lastIndexOf("%"))&&(u==f-1||(pG(u+1,t.length),c=46==t.charCodeAt(u+1))))){if(w=eP("%",o=t.substr(1,u-1))?null:jwe(o),r=0,c)try{r=kpe(t.substr(u+2),iEe,Jve)}catch(e){throw RM(e=H2(e),127)?Jb(new uZ(e)):Jb(e)}for(g=P1(e.Rg());g.Ob();)if(RM(d=C2(g),502)&&(m=(i=xL(d,581)).d,(null==w?null==m:eP(w,m))&&0==r--))return i;return null}if(h=-1==(l=t.lastIndexOf("."))?t:t.substr(0,l),n=0,-1!=l)try{n=kpe(t.substr(l+1),iEe,Jve)}catch(e){if(!RM(e=H2(e),127))throw Jb(e);h=t}for(h=eP("%",h)?null:jwe(h),p=P1(e.Rg());p.Ob();)if(RM(d=C2(p),191)&&(b=(a=xL(d,191)).ne(),(null==h?null==b:eP(h,b))&&0==n--))return a;return null}return vme(e,t)}function Owe(){var e,t,n;for(Owe=S,new WZ(1,0),new WZ(10,0),new WZ(0,0),WDe=HY(sFe,kye,239,11,0,1),qDe=HY(yit,dEe,24,100,15,1),XDe=m3(ay(Tit,1),o_e,24,15,[1,5,25,125,625,3125,15625,78125,390625,1953125,9765625,48828125,244140625,1220703125,6103515625,30517578125,152587890625,762939453125,3814697265625,19073486328125,95367431640625,476837158203125,0x878678326eac9]),YDe=HY(Eit,kEe,24,XDe.length,15,1),KDe=m3(ay(Tit,1),o_e,24,15,[1,10,100,Jye,1e4,s_e,1e6,1e7,1e8,XEe,1e10,1e11,1e12,1e13,1e14,1e15,1e16]),ZDe=HY(Eit,kEe,24,KDe.length,15,1),QDe=HY(sFe,kye,239,11,0,1),e=0;ei+2&&t3((pG(i+1,e.length),e.charCodeAt(i+1)),wtt,vtt)&&t3((pG(i+2,e.length),e.charCodeAt(i+2)),wtt,vtt))if(n=FL((pG(i+1,e.length),e.charCodeAt(i+1)),(pG(i+2,e.length),e.charCodeAt(i+2))),i+=2,r>0?128==(192&n)?t[s++]=n<<24>>24:r=0:n>=128&&(192==(224&n)?(t[s++]=n<<24>>24,r=2):224==(240&n)?(t[s++]=n<<24>>24,r=3):240==(248&n)&&(t[s++]=n<<24>>24,r=4)),r>0){if(s==r){switch(s){case 2:Wj(c,((31&t[0])<<6|63&t[1])&pEe);break;case 3:Wj(c,((15&t[0])<<12|(63&t[1])<<6|63&t[2])&pEe)}s=0,r=0}}else{for(a=0;a0){if(o+r>e.length)return!1;s=Yce(e.substr(0,o+r),t)}else s=Yce(e,t);switch(a){case 71:return s=yae(e,o,m3(ay(eFe,1),kye,2,6,[CEe,MEe]),t),i.e=s,!0;case 77:case 76:return function(e,t,n,r,i){return r<0?((r=yae(e,i,m3(ay(eFe,1),kye,2,6,[gEe,bEe,mEe,wEe,vEe,yEe,EEe,_Ee,SEe,xEe,TEe,AEe]),t))<0&&(r=yae(e,i,m3(ay(eFe,1),kye,2,6,["Jan","Feb","Mar","Apr",vEe,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),t)),!(r<0||(n.k=r,0))):r>0&&(n.k=r-1,!0)}(e,t,i,s,o);case 69:case 99:return function(e,t,n,r){var i;return(i=yae(e,n,m3(ay(eFe,1),kye,2,6,[IEe,OEe,NEe,REe,PEe,LEe,DEe]),t))<0&&(i=yae(e,n,m3(ay(eFe,1),kye,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),t)),!(i<0||(r.d=i,0))}(e,t,o,i);case 97:return s=yae(e,o,m3(ay(eFe,1),kye,2,6,["AM","PM"]),t),i.b=s,!0;case 121:return function(e,t,n,r,i,a){var o,s,c;if(s=32,r<0){if(t[0]>=e.length)return!1;if(43!=(s=ez(e,t[0]))&&45!=s)return!1;if(++t[0],(r=Yce(e,t))<0)return!1;45==s&&(r=-r)}return 32==s&&t[0]-n==2&&2==i.b&&(o=(c=(new JS).q.getFullYear()-Tye+Tye-80)%100,a.a=r==o,r+=100*(c/100|0)+(r3;)i*=10,--a;e=(e+(i>>1))/i|0}return r.i=e,!0}(s,o,t[0],i);case 104:12==s&&(s=0);case 75:case 72:return!(s<0||(i.f=s,i.g=!1,0));case 107:return!(s<0||(i.f=s,i.g=!0,0));case 109:return!(s<0||(i.j=s,0));case 115:return!(s<0||(i.n=s,0));case 90:if(o=0&&eP(e.substr(t,3),"GMT")||t>=0&&eP(e.substr(t,3),"UTC")?(n[0]=t+3,Lpe(e,n,r)):Lpe(e,n,r)}(e,o,t,i);default:return!1}}function zwe(e,t,n){var r,i,a,o,s,c,l,u,f,h;if(e.e.a.$b(),e.f.a.$b(),e.c.c=HY(LLe,aye,1,0,5,1),e.i.c=HY(LLe,aye,1,0,5,1),e.g.a.$b(),t)for(o=new td(t.a);o.a=1&&(_-u>0&&g>=0?(EJ(h,h.i+E),_J(h,h.j+l*u)):_-u<0&&p>=0&&(EJ(h,h.i+E*_),_J(h,h.j+l)));return Zee(e,(Ove(),I6e),(x7(),new PP(o=xL(NE(B7e),9),xL(lR(o,o.length),9),0))),new HA(S,f)}function Hwe(e){var t,n,i,a,o,s,c,l,u,f,h;if(f=$H(Jie(xL(FQ((!e.b&&(e.b=new VR(ket,e,4,7)),e.b),0),93)))==$H(Jie(xL(FQ((!e.c&&(e.c=new VR(ket,e,5,8)),e.c),0),93))),s=new lE,(t=xL(gue(e,(c5(),e9e)),74))&&t.b>=2){if(0==(!e.a&&(e.a=new AU(Met,e,6,6)),e.a).i)yE(),n=new Zs,cK((!e.a&&(e.a=new AU(Met,e,6,6)),e.a),n);else if((!e.a&&(e.a=new AU(Met,e,6,6)),e.a).i>1)for(h=new AO((!e.a&&(e.a=new AU(Met,e,6,6)),e.a));h.e!=h.i.gc();)qre(h);Lge(t,xL(FQ((!e.a&&(e.a=new AU(Met,e,6,6)),e.a),0),201))}if(f)for(i=new gI((!e.a&&(e.a=new AU(Met,e,6,6)),e.a));i.e!=i.i.gc();)for(l=new gI((!(n=xL(aee(i),201)).a&&(n.a=new iI(xet,n,5)),n.a));l.e!=l.i.gc();)c=xL(aee(l),463),s.a=r.Math.max(s.a,c.a),s.b=r.Math.max(s.b,c.b);for(o=new gI((!e.n&&(e.n=new AU(Pet,e,1,7)),e.n));o.e!=o.i.gc();)a=xL(aee(o),137),(u=xL(gue(a,o9e),8))&&DC(a,u.a,u.b),f&&(s.a=r.Math.max(s.a,a.i+a.g),s.b=r.Math.max(s.b,a.j+a.f));return s}function Gwe(e,t,n){var r,i,a,o,s;switch(r=t.i,a=e.i.o,i=e.i.d,s=e.n,o=u4(m3(ay(v5e,1),kye,8,0,[s,e.a])),e.j.g){case 1:PN(t,(CZ(),oje)),r.d=-i.d-n-r.a,xL(xL($D(t.d,0),183).Xe((Nve(),GWe)),284)==(are(),h9e)?(lK(t,(IK(),tje)),r.c=o.a-Mv(NN(Hae(e,KWe)))-n-r.b):(lK(t,(IK(),eje)),r.c=o.a+Mv(NN(Hae(e,KWe)))+n);break;case 2:lK(t,(IK(),eje)),r.c=a.a+i.c+n,xL(xL($D(t.d,0),183).Xe((Nve(),GWe)),284)==(are(),h9e)?(PN(t,(CZ(),oje)),r.d=o.b-Mv(NN(Hae(e,KWe)))-n-r.a):(PN(t,(CZ(),cje)),r.d=o.b+Mv(NN(Hae(e,KWe)))+n);break;case 3:PN(t,(CZ(),cje)),r.d=a.b+i.a+n,xL(xL($D(t.d,0),183).Xe((Nve(),GWe)),284)==(are(),h9e)?(lK(t,(IK(),tje)),r.c=o.a-Mv(NN(Hae(e,KWe)))-n-r.b):(lK(t,(IK(),eje)),r.c=o.a+Mv(NN(Hae(e,KWe)))+n);break;case 4:lK(t,(IK(),tje)),r.c=-i.b-n-r.b,xL(xL($D(t.d,0),183).Xe((Nve(),GWe)),284)==(are(),h9e)?(PN(t,(CZ(),oje)),r.d=o.b-Mv(NN(Hae(e,KWe)))-n-r.a):(PN(t,(CZ(),cje)),r.d=o.b+Mv(NN(Hae(e,KWe)))+n)}}function Vwe(e,t){var n,r,i,a,o,s,c,l,u,f;for(c=xL(xL(MX(e.r,t),21),81),a=function(e,t){var n,r,i,a;return uR(),(i=xL(xL(MX(e.r,t),21),81)).gc()>=2&&(r=xL(i.Ic().Pb(),110),n=e.t.Fc((lae(),G9e)),a=e.t.Fc(X9e),!r.a&&!n&&(2==i.gc()||a))}(e,t),s=c.Ic();s.Ob();)if((o=xL(s.Pb(),110)).c&&!(o.c.d.c.length<=0)){switch(f=o.b.pf(),(u=(l=o.c).i).b=(i=l.n,l.e.a+i.b+i.c),u.a=(r=l.n,l.e.b+r.d+r.a),t.g){case 1:o.a?(u.c=(f.a-u.b)/2,lK(l,(IK(),JUe))):a?(u.c=-u.b-e.s,lK(l,(IK(),tje))):(u.c=f.a+e.s,lK(l,(IK(),eje))),u.d=-u.a-e.s,PN(l,(CZ(),oje));break;case 3:o.a?(u.c=(f.a-u.b)/2,lK(l,(IK(),JUe))):a?(u.c=-u.b-e.s,lK(l,(IK(),tje))):(u.c=f.a+e.s,lK(l,(IK(),eje))),u.d=f.b+e.s,PN(l,(CZ(),cje));break;case 2:o.a?(n=e.u?u.a:xL($D(l.d,0),183).pf().b,u.d=(f.b-n)/2,PN(l,(CZ(),sje))):a?(u.d=-u.a-e.s,PN(l,(CZ(),oje))):(u.d=f.b+e.s,PN(l,(CZ(),cje))),u.c=f.a+e.s,lK(l,(IK(),eje));break;case 4:o.a?(n=e.u?u.a:xL($D(l.d,0),183).pf().b,u.d=(f.b-n)/2,PN(l,(CZ(),sje))):a?(u.d=-u.a-e.s,PN(l,(CZ(),oje))):(u.d=f.b+e.s,PN(l,(CZ(),cje))),u.c=-u.b-e.s,lK(l,(IK(),tje))}a=!1}}function Wwe(e){var t,n,i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v,y,E;if(1==e.gc())return xL(e.Xb(0),229);if(e.gc()<=0)return new VX;for(a=e.Ic();a.Ob();){for(n=xL(a.Pb(),229),g=0,f=Jve,h=Jve,l=iEe,u=iEe,p=new td(n.e);p.ac&&(y=0,E+=s+w,s=0),ype(b,n,y,E),t=r.Math.max(t,y+m.a),s=r.Math.max(s,m.b),y+=m.a+w;return b}function qwe(e,t){var n,r,i,a,o,s,c,l,u,f,h,d,p;switch(u=new mw,e.a.g){case 3:h=xL(Hae(t.e,(Nve(),bqe)),14),d=xL(Hae(t.j,bqe),14),p=xL(Hae(t.f,bqe),14),n=xL(Hae(t.e,pqe),14),r=xL(Hae(t.j,pqe),14),i=xL(Hae(t.f,pqe),14),a3(o=new $b,h),d.Hc(new ba),a3(o,RM(d,151)?OX(xL(d,151)):RM(d,131)?xL(d,131).a:RM(d,53)?new rv(d):new M_(d)),a3(o,p),a3(a=new $b,n),a3(a,RM(r,151)?OX(xL(r,151)):RM(r,131)?xL(r,131).a:RM(r,53)?new rv(r):new M_(r)),a3(a,i),q3(t.f,bqe,o),q3(t.f,pqe,a),q3(t.f,mqe,t.f),q3(t.e,bqe,null),q3(t.e,pqe,null),q3(t.j,bqe,null),q3(t.j,pqe,null);break;case 1:w0(u,t.e.a),oD(u,t.i.n),w0(u,t2(t.j.a)),oD(u,t.a.n),w0(u,t.f.a);break;default:w0(u,t.e.a),w0(u,t2(t.j.a)),w0(u,t.f.a)}qz(t.f.a),w0(t.f.a,u),bG(t.f,t.e.c),s=xL(Hae(t.e,(mve(),FKe)),74),l=xL(Hae(t.j,FKe),74),c=xL(Hae(t.f,FKe),74),(s||l||c)&&(rj(f=new mw,c),rj(f,l),rj(f,s),q3(t.f,FKe,f)),bG(t.j,null),gG(t.j,null),bG(t.e,null),gG(t.e,null),mG(t.a,null),mG(t.i,null),t.g&&qwe(e,t.g)}function Xwe(e,t,n){var i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v,y,E,_,S,x,T;return y=e.c[(dG(0,t.c.length),xL(t.c[0],18)).p],x=e.c[(dG(1,t.c.length),xL(t.c[1],18)).p],!(y.a.e.e-y.a.a-(y.b.e.e-y.b.a)==0&&x.a.e.e-x.a.a-(x.b.e.e-x.b.a)==0||!RM(w=y.b.e.f,10)||(m=xL(w,10),_=e.i[m.p],S=m.c?YK(m.c.a,m,0):-1,o=e_e,S>0&&(a=xL($D(m.c.a,S-1),10),s=e.i[a.p],T=r.Math.ceil(xM(e.n,a,m)),o=_.a.e-m.d.d-(s.a.e+a.o.b+a.d.a)-T),u=e_e,S0&&x.a.e.e-x.a.a-(x.b.e.e-x.b.a)<0,g=y.a.e.e-y.a.a-(y.b.e.e-y.b.a)<0&&x.a.e.e-x.a.a-(x.b.e.e-x.b.a)>0,p=y.a.e.e+y.b.ax.b.e.e+x.a.a,E=0,!b&&!g&&(d?o+h>0?E=h:u-i>0&&(E=i):p&&(o+c>0?E=c:u-v>0&&(E=v))),_.a.e+=E,_.b&&(_.d.e+=E),1)))}function Ywe(e,t,n){var i,a,o,s,c,l,u,f,h,d;if(i=new Sz(t.of().a,t.of().b,t.pf().a,t.pf().b),a=new HC,e.c)for(s=new td(t.uf());s.al&&(r.a+=WM(HY(yit,dEe,24,-l,15,1))),r.a+="Is",mC(c,_ae(32))>=0)for(i=0;i=r.o.b/2}m?(b=xL(Hae(r,(Nve(),vqe)),14))?h?a=b:(i=xL(Hae(r,vWe),14))?a=b.gc()<=i.gc()?b:i:(a=new $b,q3(r,vWe,a)):(a=new $b,q3(r,vqe,a)):(i=xL(Hae(r,(Nve(),vWe)),14))?f?a=i:(b=xL(Hae(r,vqe),14))?a=i.gc()<=b.gc()?i:b:(a=new $b,q3(r,vqe,a)):(a=new $b,q3(r,vWe,a)),a.Dc(e),q3(e,(Nve(),EWe),n),t.d==n?(gG(t,null),n.e.c.length+n.g.c.length==0&&wG(n,null),function(e){var t,n;(t=xL(Hae(e,(Nve(),oqe)),10))&&(KK((n=t.c).a,t),0==n.a.c.length&&KK(xB(t).b,n))}(n)):(bG(t,null),n.e.c.length+n.g.c.length==0&&wG(n,null)),qz(t.a)}function Qwe(e){US(e,new cae(Wy(By(Vy(Hy(new hs,DMe),"ELK Rectangle Packing"),"Algorithm for packing of unconnected boxes, i.e. graphs without edges. The given order of the boxes is always preserved and the main reading direction of the boxes is left to right. The algorithm is divided into two phases. One phase approximates the width in which the rectangles can be placed. The next phase places the rectangles in rows using the previously calculated width as bounding width and bundles rectangles with a similar height in blocks. A compaction step reduces the size of the drawing. Finally, the rectangles are expanded to fill their bounding box and eliminate empty unused spaces."),new Ko))),BV(e,DMe,hxe,1.3),BV(e,DMe,LMe,Mee(p3e)),BV(e,DMe,dxe,_3e),BV(e,DMe,Lxe,15),BV(e,DMe,uCe,Mee(f3e)),BV(e,DMe,kMe,Mee(y3e)),BV(e,DMe,CMe,Mee(w3e)),BV(e,DMe,OMe,Mee(v3e)),BV(e,DMe,NMe,Mee(S3e)),BV(e,DMe,RMe,Mee(g3e)),BV(e,DMe,jxe,Mee(b3e)),BV(e,DMe,SCe,Mee(m3e)),BV(e,DMe,IMe,Mee(d3e)),BV(e,DMe,MMe,Mee(h3e)),BV(e,DMe,PMe,Mee(T3e))}function Jwe(e,t){var n,r,i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v;if(g=0!=e.i,w=!1,b=null,NC(e.e)){if((u=t.gc())>0){for(h=u<100?null:new oE(u),p=new J0(t).g,b=HY(Eit,kEe,24,u,15,1),r=0,v=new yQ(u),i=0;i=0;)if(null!=d?C6(d,p[c]):Ak(d)===Ak(p[c])){b.length<=r&&Abe(b,0,b=HY(Eit,kEe,24,2*b.length,15,1),0,r),b[r++]=i,cK(v,p[c]);break e}if(Ak(d)===Ak(s))break}}if(l=v,p=v.g,u=r,r>b.length&&Abe(b,0,b=HY(Eit,kEe,24,r,15,1),0,r),r>0){for(w=!0,a=0;a=0;)Vne(e,b[o]);if(r!=u){for(i=u;--i>=r;)Vne(l,i);Abe(b,0,b=HY(Eit,kEe,24,r,15,1),0,r)}t=l}}}else for(t=function(e,t){var n,r,i;if(t.dc())return mN(),mN(),ott;for(n=new KN(e,t.gc()),i=new gI(e);i.e!=i.i.gc();)r=aee(i),t.Fc(r)&&cK(n,r);return n}(e,t),i=e.i;--i>=0;)t.Fc(e.g[i])&&(Vne(e,i),w=!0);if(w){if(null!=b){for(f=1==(n=t.gc())?WH(e,4,t.Ic().Pb(),null,b[0],g):WH(e,6,t,b,b[0],g),h=n<100?null:new oE(n),i=t.Ic();i.Ob();)h=yP(e,xL(d=i.Pb(),71),h);h?(h.zi(f),h.Ai()):E2(e.e,f)}else{for(h=function(e){return e<100?null:new oE(e)}(t.gc()),i=t.Ic();i.Ob();)h=yP(e,xL(d=i.Pb(),71),h);h&&h.Ai()}return!0}return!1}function eve(e,t){var n,i,a,o,s,c,l,u,f,h,d,g,b,m,w,v,y;for((n=new pte(t)).a||function(e){var t,n,i,a,o;switch(a=xL($D(e.a,0),10),t=new Lte(e),SL(e.a,t),t.o.a=r.Math.max(1,a.o.a),t.o.b=r.Math.max(1,a.o.b),t.n.a=a.n.a,t.n.b=a.n.b,xL(Hae(a,(Nve(),RWe)),61).g){case 4:t.n.a+=2;break;case 1:t.n.b+=2;break;case 2:t.n.a-=2;break;case 3:t.n.b-=2}wG(i=new Poe,t),bG(n=new _$,o=xL($D(a.j,0),11)),gG(n,i),MR(Kk(i.n),o.n),MR(Kk(i.a),o.a)}(t),u=function(e){var t,n,r,i,a,o,s;for(s=new nX,o=new td(e.a);o.a=s.b.c)&&(s.b=t),(!s.c||t.c<=s.c.c)&&(s.d=s.c,s.c=t),(!s.e||t.d>=s.e.d)&&(s.e=t),(!s.f||t.d<=s.f.d)&&(s.f=t);return r=new Bee((U3(),Wze)),OV(e,t$e,new Uv(m3(ay(Vze,1),aye,366,0,[r]))),o=new Bee(Yze),OV(e,e$e,new Uv(m3(ay(Vze,1),aye,366,0,[o]))),i=new Bee(qze),OV(e,Jze,new Uv(m3(ay(Vze,1),aye,366,0,[i]))),a=new Bee(Xze),OV(e,Qze,new Uv(m3(ay(Vze,1),aye,366,0,[a]))),cfe(r.c,Wze),cfe(i.c,qze),cfe(a.c,Xze),cfe(o.c,Yze),s.a.c=HY(LLe,aye,1,0,5,1),a3(s.a,r.c),a3(s.a,t2(i.c)),a3(s.a,a.c),a3(s.a,t2(o.c)),s}(u)),n}function tve(e,t,n){var i,a,o,s,c,l,u,f,h,d,p,g;if(null==n.p[t.p]){c=!0,n.p[t.p]=0,s=t,g=n.o==(PH(),p1e)?t_e:e_e;do{a=e.b.e[s.p],o=s.c.a.c.length,n.o==p1e&&a>0||n.o==g1e&&a0?p9(s):o8(p9(s)),e.Ze(TZe,d)),l=new lE,h=!1,e.Ye(wZe)?(KO(l,xL(e.Xe(wZe),8)),h=!0):function(e,t,n){e.a=t,e.b=n}(l,o.a/2,o.b/2),d.g){case 4:q3(u,BKe,(s9(),Eqe)),q3(u,kWe,(D3(),gVe)),u.o.b=o.b,g<0&&(u.o.a=-g),mce(f,(Lwe(),Z9e)),h||(l.a=o.a),l.a-=o.a;break;case 2:q3(u,BKe,(s9(),Sqe)),q3(u,kWe,(D3(),dVe)),u.o.b=o.b,g<0&&(u.o.a=-g),mce(f,(Lwe(),m7e)),h||(l.a=0);break;case 1:q3(u,BWe,(MZ(),fWe)),u.o.a=o.a,g<0&&(u.o.b=-g),mce(f,(Lwe(),g7e)),h||(l.b=o.b),l.b-=o.b;break;case 3:q3(u,BWe,(MZ(),lWe)),u.o.a=o.a,g<0&&(u.o.b=-g),mce(f,(Lwe(),Q9e)),h||(l.b=0)}if(KO(f.n,l),q3(u,wZe,l),t==D9e||t==U9e||t==F9e){if(p=0,t==D9e&&e.Ye(EZe))switch(d.g){case 1:case 2:p=xL(e.Xe(EZe),20).a;break;case 3:case 4:p=-xL(e.Xe(EZe),20).a}else switch(d.g){case 4:case 2:p=a.b,t==U9e&&(p/=i.b);break;case 1:case 3:p=a.a,t==U9e&&(p/=i.a)}q3(u,sqe,p)}return q3(u,RWe,d),u}function ive(e,t,n,i,a,o,s){var c,l,u,f,h,d,p,g,b,m,w,v,y,E,_,S,x,T,A,k,C,M,I,O;for(b=0,k=0,u=new td(e.b);u.ab&&(o&&(Vk(S,p),Vk(T,G6(f.b-1)),SL(e.d,g),c.c=HY(LLe,aye,1,0,5,1)),I=n.b,O+=p+t,p=0,h=r.Math.max(h,n.b+n.c+M)),c.c[c.c.length]=l,Pee(l,I,O),h=r.Math.max(h,I+M+n.c),p=r.Math.max(p,d),I+=M+t,g=l;if(a3(e.a,c),SL(e.d,xL($D(c,c.c.length-1),157)),h=r.Math.max(h,i),(C=O+p+n.a)1&&(s=r.Math.min(s,r.Math.abs(xL(Iee(c.a,1),8).b-f.b)))));else for(g=new td(t.j);g.aa&&(o=d.a-a,s=Jve,i.c=HY(LLe,aye,1,0,5,1),a=d.a),d.a>=a&&(i.c[i.c.length]=c,c.a.b>1&&(s=r.Math.min(s,r.Math.abs(xL(Iee(c.a,c.a.b-2),8).b-d.b)))));if(0!=i.c.length&&o>t.o.a/2&&s>t.o.b/2){for(wG(p=new Poe,t),mce(p,(Lwe(),Q9e)),p.n.a=t.o.a/2,wG(b=new Poe,t),mce(b,g7e),b.n.a=t.o.a/2,b.n.b=t.o.b,l=new td(i);l.a=u.b?bG(c,b):bG(c,p)):(u=xL(gL(c.a),8),(0==c.a.b?jG(c.c):xL(LO(c.a),8)).b>=u.b?gG(c,b):gG(c,p)),(h=xL(Hae(c,(mve(),FKe)),74))&&A9(h,u,!0);t.n.a=a-t.o.a/2}}function ove(e,t,n){var r,i,a,o,s,c,l,u,f,h,d;if(l=t,d1(c=zW(e,jW(n),l),hW(l,qOe)),u=xL(BQ(e.g,Oce(sH(l,COe))),34),r=null,(o=sH(l,"sourcePort"))&&(r=Oce(o)),f=xL(BQ(e.j,r),122),!u)throw Jb(new Wv("An edge must have a source node (edge id: '"+S7(l)+QOe));if(f&&!pB(kH(f),u))throw Jb(new Wv("The source port of an edge must be a port of the edge's source node (edge id: '"+hW(l,qOe)+QOe));if(!c.b&&(c.b=new VR(ket,c,4,7)),cK(c.b,f||u),h=xL(BQ(e.g,Oce(sH(l,tNe))),34),i=null,(s=sH(l,"targetPort"))&&(i=Oce(s)),d=xL(BQ(e.j,i),122),!h)throw Jb(new Wv("An edge must have a target node (edge id: '"+S7(l)+QOe));if(d&&!pB(kH(d),h))throw Jb(new Wv("The target port of an edge must be a port of the edge's target node (edge id: '"+hW(l,qOe)+QOe));if(!c.c&&(c.c=new VR(ket,c,5,8)),cK(c.c,d||h),0==(!c.b&&(c.b=new VR(ket,c,4,7)),c.b).i||0==(!c.c&&(c.c=new VR(ket,c,5,8)),c.c).i)throw a=hW(l,qOe),Jb(new Wv(ZOe+a+QOe));return uae(l,c),function(e,t){var n,r,i,a,o,s;a=null,(nNe in(o=e).a||rNe in o.a||BOe in o.a)&&(s=M3(t),r=uW(o,nNe),function(e,t){var n,r;t&&(n=PJ(t,"x"),SJ(new ab(e).a,(sB(n),n)),r=PJ(t,"y"),kJ(new sb(e).a,(sB(r),r)))}(new Qg(s).a,r),i=uW(o,rNe),function(e,t){var n,r;t&&(n=PJ(t,"x"),TJ(new lb(e).a,(sB(n),n)),r=PJ(t,"y"),AJ(new ub(e).a,(sB(r),r)))}(new cb(s).a,i),n=lW(o,BOe),function(e,t){var n,r,i;if(t)for(i=((n=new qF(t.a.length)).b-n.a)*n.c<0?(QS(),pit):new bI(n);i.Ob();)r=fW(t,xL(i.Pb(),20).a),az(new $g(e).a,r)}(new fb(s).a,n),a=n)}(l,c),h4(e,l,c)}function sve(e,t){var n,i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v,y,E,_,S,x,T,A,k;return h=function(e,t){var n,i,a,o,s,c,l,u,f,h,d;if(e.dc())return new lE;for(l=0,f=0,i=e.Ic();i.Ob();)a=xL(i.Pb(),38).f,l=r.Math.max(l,a.a),f+=a.a*a.b;for(l=r.Math.max(l,r.Math.sqrt(f)*Mv(NN(Hae(xL(e.Ic().Pb(),38),(mve(),YYe))))),h=0,d=0,c=0,n=t,s=e.Ic();s.Ob();)h+(u=(o=xL(s.Pb(),38)).f).a>l&&(h=0,d+=c+t,c=0),Vde(o,h,d),n=r.Math.max(n,h+u.a),c=r.Math.max(c,u.b),h+=u.a+t;return new HA(n+t,d+c+t)}(cO(e,(Lwe(),r7e)),t),g=One(cO(e,i7e),t),E=One(cO(e,h7e),t),T=Nne(cO(e,p7e),t),d=Nne(cO(e,J9e),t),v=One(cO(e,f7e),t),b=One(cO(e,a7e),t),S=One(cO(e,d7e),t),_=One(cO(e,e7e),t),A=Nne(cO(e,n7e),t),w=One(cO(e,l7e),t),y=One(cO(e,c7e),t),x=One(cO(e,t7e),t),k=Nne(cO(e,u7e),t),p=Nne(cO(e,o7e),t),m=One(cO(e,s7e),t),n=f4(m3(ay(Tit,1),o_e,24,15,[v.a,T.a,S.a,k.a])),i=f4(m3(ay(Tit,1),o_e,24,15,[g.a,h.a,E.a,m.a])),a=w.a,o=f4(m3(ay(Tit,1),o_e,24,15,[b.a,d.a,_.a,p.a])),u=f4(m3(ay(Tit,1),o_e,24,15,[v.b,g.b,b.b,y.b])),l=f4(m3(ay(Tit,1),o_e,24,15,[T.b,h.b,d.b,m.b])),f=A.b,c=f4(m3(ay(Tit,1),o_e,24,15,[S.b,E.b,_.b,x.b])),hK(cO(e,r7e),n+a,u+f),hK(cO(e,s7e),n+a,u+f),hK(cO(e,i7e),n+a,0),hK(cO(e,h7e),n+a,u+f+l),hK(cO(e,p7e),0,u+f),hK(cO(e,J9e),n+a+i,u+f),hK(cO(e,a7e),n+a+i,0),hK(cO(e,d7e),0,u+f+l),hK(cO(e,e7e),n+a+i,u+f+l),hK(cO(e,n7e),0,u),hK(cO(e,l7e),n,0),hK(cO(e,t7e),0,u+f+l),hK(cO(e,o7e),n+a+i,0),(s=new lE).a=f4(m3(ay(Tit,1),o_e,24,15,[n+i+a+o,A.a,y.a,x.a])),s.b=f4(m3(ay(Tit,1),o_e,24,15,[u+l+f+c,w.b,k.b,p.b])),s}function cve(e,t,n){var i,a,o,s,c,l,u;if(Qie(n,"Network simplex node placement",1),e.e=t,e.n=xL(Hae(t,(Nve(),dqe)),302),function(e){var t,n,i,a,o,s,c,l,u,f,h,d;for(e.f=new Pm,c=0,i=0,a=new td(e.e.b);a.a=l.c.c.length?gq((yoe(),p$e),d$e):gq((yoe(),d$e),d$e),u*=2,a=n.a.g,n.a.g=r.Math.max(a,a+(u-a)),o=n.b.g,n.b.g=r.Math.max(o,o+(u-o)),i=t}else lue(s),Vbe((dG(0,s.c.length),xL(s.c[0],18)).d.i)||SL(e.o,s)}(e),Toe(o)),function(e){var t,n,r,i;for(n=0,r=new td(e.a);r.a1&&(i=function(e,t){var n,r,i;for(n=aO(new Fm,e),i=new td(t);i.a0)if(i=f.gc(),l=dH(r.Math.floor((i+1)/2))-1,a=dH(r.Math.ceil((i+1)/2))-1,t.o==g1e)for(u=a;u>=l;u--)t.a[y.p]==y&&(g=xL(f.Xb(u),46),p=xL(g.a,10),!V_(n,g.b)&&d>e.b.e[p.p]&&(t.a[p.p]=y,t.g[y.p]=t.g[p.p],t.a[y.p]=t.g[y.p],t.f[t.g[y.p].p]=(pO(),!!(Av(t.f[t.g[y.p].p])&y.k==(yoe(),d$e))),d=e.b.e[p.p]));else for(u=l;u<=a;u++)t.a[y.p]==y&&(m=xL(f.Xb(u),46),b=xL(m.a,10),!V_(n,m.b)&&d=48&&t<=57))throw Jb(new Xv(Bve((cM(),KNe))));for(r=t-48;i=48&&t<=57;)if((r=10*r+t-48)<0)throw Jb(new Xv(Bve((cM(),eRe))));if(n=r,44==t){if(i>=e.j)throw Jb(new Xv(Bve((cM(),QNe))));if((t=ez(e.i,i++))>=48&&t<=57){for(n=t-48;i=48&&t<=57;)if((n=10*n+t-48)<0)throw Jb(new Xv(Bve((cM(),eRe))));if(r>n)throw Jb(new Xv(Bve((cM(),JNe))))}else n=-1}if(125!=t)throw Jb(new Xv(Bve((cM(),ZNe))));e.nl(i)?(Lve(),Lve(),a=new nq(9,a),e.d=i+1):(Lve(),Lve(),a=new nq(3,a),e.d=i),a.$l(r),a.Zl(n),Tve(e)}}return a}function hve(e,t,n,r,i){var a,o,s,c,l,u,f,h,d,p,g,b,m,w,v,y,E,_,S,x,T;for(p=new dY(t.b),w=new dY(t.b),h=new dY(t.b),_=new dY(t.b),g=new dY(t.b),E=xee(t,0);E.b!=E.d.c;)for(s=new td((v=xL(_W(E),11)).g);s.a0,b=v.g.c.length>0,l&&b?h.c[h.c.length]=v:l?p.c[p.c.length]=v:b&&(w.c[w.c.length]=v);for(d=new td(p);d.al&&0==(dG(l,t.c.length),xL(t.c[l],180)).a.c.length;)KK(t,(dG(l,t.c.length),t.c[l]));if(!(t.c.length>l)){c=null;break}c=xL($D((dG(l,t.c.length),xL(t.c[l],180)).a,0),181)}if(!c)continue;if(Jde(t,u,i,c,h,n,l)){f=!0;continue}if(h){if(kbe(t,u,i,c,n,l)){f=!0;continue}if(B5(u,i)){i.c=!0,f=!0;continue}}else if(B5(u,i)){i.c=!0,f=!0;continue}if(f)continue}B5(u,i)?(i.c=!0,f=!0,c&&(c.k=!1)):Q9(i.q)}else Y_(),H7(u,i),--a,f=!0;return f}function gve(e,t,n){var r,i,a,o,s,c,l,u,f,h,d,p,g,b;if(null==n)return null;if(e.a!=t.vj())throw Jb(new Rv(yOe+t.ne()+EOe));if(RM(t,450)){if(g=function(e,t){var n,r,i;if(null==t){for(!e.a&&(e.a=new AU(Ftt,e,9,5)),r=new gI(e.a);r.e!=r.i.gc();)if(null==(null==(i=(n=xL(aee(r),666)).c)?n.zb:i))return n}else for(!e.a&&(e.a=new AU(Ftt,e,9,5)),r=new gI(e.a);r.e!=r.i.gc();)if(eP(t,null==(i=(n=xL(aee(r),666)).c)?n.zb:i))return n;return null}(xL(t,659),n),!g)throw Jb(new Rv(_Oe+n+"' is not a valid enumerator of '"+t.ne()+"'"));return g}switch(S6((yse(),$nt),t).Zk()){case 2:n=pbe(n,!1);break;case 3:n=pbe(n,!0)}if(r=S6($nt,t).Vk())return r.vj().Ih().Fh(r,n);if(f=S6($nt,t).Xk()){for(g=new $b,l=0,u=(c=$4(n)).length;lrEe)&&c<10);Ay(e.c,new vt),jme(e),function(e){gwe(e,(K6(),M8e)),e.d=!0}(e.c),function(e){var t,n,i,a,o,s,c,l;for(o=new td(e.a.b);o.a1)for(d=new AO((!e.a&&(e.a=new AU(Met,e,6,6)),e.a));d.e!=d.i.gc();)qre(d);for(g=C,C>y+v?g=y+v:CE+p?b=E+p:My-v&&gE-p&&bC+k?S=C+k:yM+_?x=M+_:EC-k&&SM-_&&xn&&(f=n-1),(h=R+Fue(t,24)*x_e*u-u/2)<0?h=1:h>i&&(h=i-1),yE(),CJ(a=new ec,f),xJ(a,h),cK((!s.a&&(s.a=new iI(xet,s,5)),s.a),a)}function Eve(e,t){var n,r,i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v,y,E,_,S,x,T,A,k,C;if(Cbe(),x=e.e,p=e.d,i=e.a,0==x)switch(t){case 0:return"0";case 1:return f_e;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return(_=new fy).a+=t<0?"0E+":"0E",_.a+=-t,_.a}if(y=HY(yit,dEe,24,1+(v=10*p+1+7),15,1),n=v,1==p)if((s=i[0])<0){C=lH(s,l_e);do{g=C,C=_re(C,10),y[--n]=48+zD(k6(g,A6(C,10)))&pEe}while(0!=K4(C,0))}else{C=s;do{g=C,C=C/10|0,y[--n]=g-10*C+48&pEe}while(0!=C)}else{Abe(i,0,A=HY(Eit,kEe,24,p,15,1),0,k=p);e:for(;;){for(S=0,l=k-1;l>=0;l--)m=Kre(T6(uD(S,32),lH(A[l],l_e))),A[l]=zD(m),S=zD(lD(m,32));w=zD(S),b=n;do{y[--n]=48+w%10&pEe}while(0!=(w=w/10|0)&&0!=n);for(r=9-b+n,c=0;c0;c++)y[--n]=48;for(f=k-1;0==A[f];f--)if(0==f)break e;k=f+1}for(;48==y[n];)++n}if(d=x<0,o=v-n-t-1,0==t)return d&&(y[--n]=45),A7(y,n,v-n);if(t>0&&o>=-6){if(o>=0){for(u=n+o,h=v-1;h>=u;h--)y[h+1]=y[h];return y[++u]=46,d&&(y[--n]=45),A7(y,n,v-n+1)}for(f=2;f<1-o;f++)y[--n]=48;return y[--n]=46,y[--n]=48,d&&(y[--n]=45),A7(y,n,v-n)}return T=n+1,a=v,E=new hy,d&&(E.a+="-"),a-T>=1?(Wj(E,y[n]),E.a+=".",E.a+=A7(y,n+1,v-n-1)):E.a+=A7(y,n,v-n),E.a+="E",o>0&&(E.a+="+"),E.a+=""+o,E.a}function _ve(e,t){var n,i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v,y,E;switch(e.c=t,e.g=new Hb,S9(new Ld(new vv(e.c))),w=RN(gue(e.c,(qae(),s4e))),s=xL(gue(e.c,l4e),313),y=xL(gue(e.c,u4e),423),a=xL(gue(e.c,n4e),476),v=xL(gue(e.c,c4e),424),e.j=Mv(NN(gue(e.c,f4e))),o=e.a,s.g){case 0:o=e.a;break;case 1:o=e.b;break;case 2:o=e.i;break;case 3:o=e.e;break;case 4:o=e.f;break;default:throw Jb(new Rv(UMe+(null!=s.f?s.f:""+s.g)))}if(e.d=new yH(o,y,a),q3(e.d,(g2(),Jje),ON(gue(e.c,i4e))),e.d.c=Av(ON(gue(e.c,r4e))),0==c$(e.c).i)return e.d;for(u=new gI(c$(e.c));u.e!=u.i.gc();){for(h=(l=xL(aee(u),34)).g/2,f=l.f/2,E=new HA(l.i+h,l.j+f);UU(e.g,E);)XO(E,(r.Math.random()-.5)*Mxe,(r.Math.random()-.5)*Mxe);p=xL(gue(l,(Ove(),x6e)),141),g=new tG(E,new Sz(E.a-h-e.j/2-p.b,E.b-f-e.j/2-p.d,l.g+e.j+(p.b+p.c),l.f+e.j+(p.d+p.a))),SL(e.d.i,g),zB(e.g,E,new GA(g,l))}switch(v.g){case 0:if(null==w)e.d.d=xL($D(e.d.i,0),63);else for(m=new td(e.d.i);m.a1&&mq(f,w,f.c.b,f.c),CQ(a)));w=v}return f}function xve(e,t){var n,r,i,a,o,s,c,l,u,f,h,d,p,g,b,m;for(r=new $b,s=new $b,b=t/2,d=e.gc(),i=xL(e.Xb(0),8),m=xL(e.Xb(1),8),SL(r,(dG(0,(p=pue(i.a,i.b,m.a,m.b,b)).c.length),xL(p.c[0],8))),SL(s,(dG(1,p.c.length),xL(p.c[1],8))),l=2;l=0;c--)oD(n,(dG(c,o.c.length),xL(o.c[c],8)));return n}function Tve(e){var t,n,r;if(e.d>=e.j)return e.a=-1,void(e.c=1);if(t=ez(e.i,e.d++),e.a=t,1!=e.b){switch(t){case 124:r=2;break;case 42:r=3;break;case 43:r=4;break;case 63:r=5;break;case 41:r=7;break;case 46:r=8;break;case 91:r=9;break;case 94:r=11;break;case 36:r=12;break;case 40:if(r=6,e.d>=e.j)break;if(63!=ez(e.i,e.d))break;if(++e.d>=e.j)throw Jb(new Xv(Bve((cM(),yNe))));switch(t=ez(e.i,e.d++)){case 58:r=13;break;case 61:r=14;break;case 33:r=15;break;case 91:r=19;break;case 62:r=18;break;case 60:if(e.d>=e.j)throw Jb(new Xv(Bve((cM(),yNe))));if(61==(t=ez(e.i,e.d++)))r=16;else{if(33!=t)throw Jb(new Xv(Bve((cM(),ENe))));r=17}break;case 35:for(;e.d=e.j)throw Jb(new Xv(Bve((cM(),vNe))));e.a=ez(e.i,e.d++);break;default:r=0}e.c=r}else{switch(t){case 92:if(r=10,e.d>=e.j)throw Jb(new Xv(Bve((cM(),vNe))));e.a=ez(e.i,e.d++);break;case 45:512==(512&e.e)&&e.da)throw Jb(new Xv(Bve((cM(),HNe))));Ahe(o,n,a)}}}i=!1}if(1==e.c)throw Jb(new Xv(Bve((cM(),LNe))));return kue(o),Qbe(o),e.b=0,Tve(e),o}function kve(e,t){switch(e.e){case 0:case 2:case 4:case 6:case 42:case 44:case 46:case 48:case 8:case 10:case 12:case 14:case 16:case 18:case 20:case 22:case 24:case 26:case 28:case 30:case 32:case 34:case 36:case 38:return new C$(e.b,e.a,t,e.c);case 1:return new aI(e.a,t,k9(t.Og(),e.c));case 43:return new uI(e.a,t,k9(t.Og(),e.c));case 3:return new iI(e.a,t,k9(t.Og(),e.c));case 45:return new lI(e.a,t,k9(t.Og(),e.c));case 41:return new iK(xL(Ere(e.c),26),e.a,t,k9(t.Og(),e.c));case 50:return new a1(xL(Ere(e.c),26),e.a,t,k9(t.Og(),e.c));case 5:return new UR(e.a,t,k9(t.Og(),e.c),e.d.n);case 47:return new jR(e.a,t,k9(t.Og(),e.c),e.d.n);case 7:return new AU(e.a,t,k9(t.Og(),e.c),e.d.n);case 49:return new RR(e.a,t,k9(t.Og(),e.c),e.d.n);case 9:return new cI(e.a,t,k9(t.Og(),e.c));case 11:return new sI(e.a,t,k9(t.Og(),e.c));case 13:return new oI(e.a,t,k9(t.Og(),e.c));case 15:return new GL(e.a,t,k9(t.Og(),e.c));case 17:return new dI(e.a,t,k9(t.Og(),e.c));case 19:return new hI(e.a,t,k9(t.Og(),e.c));case 21:return new fI(e.a,t,k9(t.Og(),e.c));case 23:return new HL(e.a,t,k9(t.Og(),e.c));case 25:return new WR(e.a,t,k9(t.Og(),e.c),e.d.n);case 27:return new VR(e.a,t,k9(t.Og(),e.c),e.d.n);case 29:return new HR(e.a,t,k9(t.Og(),e.c),e.d.n);case 31:return new BR(e.a,t,k9(t.Og(),e.c),e.d.n);case 33:return new GR(e.a,t,k9(t.Og(),e.c),e.d.n);case 35:return new $R(e.a,t,k9(t.Og(),e.c),e.d.n);case 37:return new zR(e.a,t,k9(t.Og(),e.c),e.d.n);case 39:return new CU(e.a,t,k9(t.Og(),e.c),e.d.n);case 40:return new Z0(t,k9(t.Og(),e.c));default:throw Jb(new sv("Unknown feature style: "+e.e))}}function Cve(e,t,n){var i,a,o,s,c,l,u,f,h,d,g,b,m,w,v,y,E,_,S;switch(Qie(n,"Brandes & Koepf node placement",1),e.a=t,e.c=function(e){var t,n,r,i,a,o,s,c,l,u,f;for((f=new no).d=0,o=new td(e.b);o.ao&&(o=i,l.c=HY(LLe,aye,1,0,5,1)),i==o&&SL(l,new GA(n.c.i,n)));i$(),wM(l,e.c),mF(e.b,s.p,l)}}(f,e),f.f=PO(f.d),function(e,t){var n,r,i,a,o,s,c,l;for(a=new td(t.b);a.ao&&(o=i,l.c=HY(LLe,aye,1,0,5,1)),i==o&&SL(l,new GA(n.d.i,n)));i$(),wM(l,e.c),mF(e.f,s.p,l)}}(f,e),f}(t),i=xL(Hae(t,(mve(),JKe)),272),g=Av(ON(Hae(t,eZe))),e.d=i==(aie(),RVe)&&!g||i==IVe,function(e,t){var n,r,i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v;if(!((g=t.b.c.length)<3)){for(d=HY(Eit,kEe,24,g,15,1),f=0,u=new td(t.b);u.ao)&&ZU(e.b,xL(b.b,18));++s}a=o}}}(e,t),_=null,S=null,w=null,v=null,JJ(4,Yye),m=new dY(4),xL(Hae(t,JKe),272).g){case 3:w=new bpe(t,e.c.d,(PH(),p1e),(q$(),u1e)),m.c[m.c.length]=w;break;case 1:v=new bpe(t,e.c.d,(PH(),g1e),(q$(),u1e)),m.c[m.c.length]=v;break;case 4:_=new bpe(t,e.c.d,(PH(),p1e),(q$(),f1e)),m.c[m.c.length]=_;break;case 2:S=new bpe(t,e.c.d,(PH(),g1e),(q$(),f1e)),m.c[m.c.length]=S;break;default:w=new bpe(t,e.c.d,(PH(),p1e),(q$(),u1e)),v=new bpe(t,e.c.d,g1e,u1e),_=new bpe(t,e.c.d,p1e,f1e),S=new bpe(t,e.c.d,g1e,f1e),m.c[m.c.length]=_,m.c[m.c.length]=S,m.c[m.c.length]=w,m.c[m.c.length]=v}for(a=new qT(t,e.c),c=new td(m);c.aS[l]&&(g=l),f=new td(e.a.b);f.aSue(o))&&(h=o);for(!h&&(dG(0,m.c.length),h=xL(m.c[0],182)),b=new td(t.b);b.a=-1900?1:0,Bk(e,n>=4?m3(ay(eFe,1),kye,2,6,[CEe,MEe])[s]:m3(ay(eFe,1),kye,2,6,["BC","AD"])[s]);break;case 121:!function(e,t,n){var r;switch((r=n.q.getFullYear()-Tye+Tye)<0&&(r=-r),t){case 1:e.a+=r;break;case 2:_Z(e,r%100,2);break;default:_Z(e,r,t)}}(e,n,i);break;case 77:!function(e,t,n){var r;switch(r=n.q.getMonth(),t){case 5:Bk(e,m3(ay(eFe,1),kye,2,6,["J","F","M","A","M","J","J","A","S","O","N","D"])[r]);break;case 4:Bk(e,m3(ay(eFe,1),kye,2,6,[gEe,bEe,mEe,wEe,vEe,yEe,EEe,_Ee,SEe,xEe,TEe,AEe])[r]);break;case 3:Bk(e,m3(ay(eFe,1),kye,2,6,["Jan","Feb","Mar","Apr",vEe,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])[r]);break;default:_Z(e,r+1,t)}}(e,n,i);break;case 107:_Z(e,0==(c=a.q.getHours())?24:c,n);break;case 83:!function(e,t,n){var i,a;K4(i=e2(n.q.getTime()),0)<0?(a=Jye-zD(a9(nK(i),Jye)))==Jye&&(a=0):a=zD(a9(i,Jye)),1==t?Wj(e,48+(a=r.Math.min((a+50)/100|0,9))&pEe):2==t?_Z(e,a=r.Math.min((a+5)/10|0,99),2):(_Z(e,a,3),t>3&&_Z(e,0,t-3))}(e,n,a);break;case 69:l=i.q.getDay(),Bk(e,5==n?m3(ay(eFe,1),kye,2,6,["S","M","T","W","T","F","S"])[l]:4==n?m3(ay(eFe,1),kye,2,6,[IEe,OEe,NEe,REe,PEe,LEe,DEe])[l]:m3(ay(eFe,1),kye,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[l]);break;case 97:a.q.getHours()>=12&&a.q.getHours()<24?Bk(e,m3(ay(eFe,1),kye,2,6,["AM","PM"])[1]):Bk(e,m3(ay(eFe,1),kye,2,6,["AM","PM"])[0]);break;case 104:_Z(e,0==(u=a.q.getHours()%12)?12:u,n);break;case 75:_Z(e,a.q.getHours()%12,n);break;case 72:_Z(e,a.q.getHours(),n);break;case 99:f=i.q.getDay(),5==n?Bk(e,m3(ay(eFe,1),kye,2,6,["S","M","T","W","T","F","S"])[f]):4==n?Bk(e,m3(ay(eFe,1),kye,2,6,[IEe,OEe,NEe,REe,PEe,LEe,DEe])[f]):3==n?Bk(e,m3(ay(eFe,1),kye,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[f]):_Z(e,f,1);break;case 76:h=i.q.getMonth(),5==n?Bk(e,m3(ay(eFe,1),kye,2,6,["J","F","M","A","M","J","J","A","S","O","N","D"])[h]):4==n?Bk(e,m3(ay(eFe,1),kye,2,6,[gEe,bEe,mEe,wEe,vEe,yEe,EEe,_Ee,SEe,xEe,TEe,AEe])[h]):3==n?Bk(e,m3(ay(eFe,1),kye,2,6,["Jan","Feb","Mar","Apr",vEe,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])[h]):_Z(e,h+1,n);break;case 81:d=i.q.getMonth()/3|0,Bk(e,n<4?m3(ay(eFe,1),kye,2,6,["Q1","Q2","Q3","Q4"])[d]:m3(ay(eFe,1),kye,2,6,["1st quarter","2nd quarter","3rd quarter","4th quarter"])[d]);break;case 100:_Z(e,i.q.getDate(),n);break;case 109:_Z(e,a.q.getMinutes(),n);break;case 115:_Z(e,a.q.getSeconds(),n);break;case 122:Bk(e,n<4?o.c[0]:o.c[1]);break;case 118:Bk(e,o.b);break;case 90:Bk(e,n<3?function(e){var t,n;return n=-e.a,t=m3(ay(yit,1),dEe,24,15,[43,48,48,48,48]),n<0&&(t[0]=45,n=-n),t[1]=t[1]+((n/60|0)/10|0)&pEe,t[2]=t[2]+(n/60|0)%10&pEe,t[3]=t[3]+(n%60/10|0)&pEe,t[4]=t[4]+n%10&pEe,A7(t,0,t.length)}(o):3==n?function(e){var t,n;return n=-e.a,t=m3(ay(yit,1),dEe,24,15,[43,48,48,58,48,48]),n<0&&(t[0]=45,n=-n),t[1]=t[1]+((n/60|0)/10|0)&pEe,t[2]=t[2]+(n/60|0)%10&pEe,t[4]=t[4]+(n%60/10|0)&pEe,t[5]=t[5]+n%10&pEe,A7(t,0,t.length)}(o):function(e){var t;return t=m3(ay(yit,1),dEe,24,15,[71,77,84,45,48,48,58,48,48]),e<=0&&(t[3]=43,e=-e),t[4]=t[4]+((e/60|0)/10|0)&pEe,t[5]=t[5]+(e/60|0)%10&pEe,t[7]=t[7]+(e%60/10|0)&pEe,t[8]=t[8]+e%10&pEe,A7(t,0,t.length)}(o.a));break;default:return!1}return!0}function Ive(e,t,n,r){var i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v,y,E,_,S,x,T,A,k,C;if(Bde(t),c=xL(FQ((!t.b&&(t.b=new VR(ket,t,4,7)),t.b),0),93),u=xL(FQ((!t.c&&(t.c=new VR(ket,t,5,8)),t.c),0),93),s=Jie(c),l=Jie(u),o=0==(!t.a&&(t.a=new AU(Met,t,6,6)),t.a).i?null:xL(FQ((!t.a&&(t.a=new AU(Met,t,6,6)),t.a),0),201),_=xL(qj(e.a,s),10),A=xL(qj(e.a,l),10),S=null,k=null,RM(c,199)&&(RM(E=xL(qj(e.a,c),299),11)?S=xL(E,11):RM(E,10)&&(_=xL(E,10),S=xL($D(_.j,0),11))),RM(u,199)&&(RM(T=xL(qj(e.a,u),299),11)?k=xL(T,11):RM(T,10)&&(A=xL(T,10),k=xL($D(A.j,0),11))),!_||!A)throw Jb(new Vv("The source or the target of edge "+t+" could not be found. This usually happens when an edge connects a node laid out by ELK Layered to a node in another level of hierarchy laid out by either another instance of ELK Layered or another layout algorithm alltogether. The former can be solved by setting the hierarchyHandling option to INCLUDE_CHILDREN."));for(L2(g=new _$,t),q3(g,(Nve(),QWe),t),q3(g,(mve(),FKe),null),d=xL(Hae(r,DWe),21),_==A&&d.Dc((Uhe(),tWe)),S||(t1(),y=tJe,x=null,o&&OC(xL(Hae(_,yZe),100))&&($W(x=new HA(o.j,o.k),AH(t)),Qq(x,n),DQ(l,s)&&(y=eJe,MR(x,_.n))),S=Pbe(_,x,y,r)),k||(t1(),y=eJe,C=null,o&&OC(xL(Hae(A,yZe),100))&&($W(C=new HA(o.b,o.c),AH(t)),Qq(C,n)),k=Pbe(A,C,y,xB(A))),bG(g,S),gG(g,k),(S.e.c.length>1||S.g.c.length>1||k.e.c.length>1||k.g.c.length>1)&&d.Dc((Uhe(),KVe)),h=new gI((!t.n&&(t.n=new AU(Pet,t,1,7)),t.n));h.e!=h.i.gc();)if(!Av(ON(gue(f=xL(aee(h),137),cZe)))&&f.a)switch(b=Y5(f),SL(g.b,b),xL(Hae(b,mKe),271).g){case 1:case 2:d.Dc((Uhe(),XVe));break;case 0:d.Dc((Uhe(),WVe)),q3(b,mKe,(mJ(),L8e))}if(a=xL(Hae(r,lKe),333),m=xL(Hae(r,iZe),312),i=a==(_q(),YGe)||m==(Fte(),MQe),o&&0!=(!o.a&&(o.a=new iI(xet,o,5)),o.a).i&&i){for(w=Voe(o),p=new mw,v=xee(w,0);v.b!=v.d.c;)oD(p,new nM(xL(_W(v),8)));q3(g,JWe,p)}return g}function Ove(){var e,t;Ove=S,X5e=new mb(wIe),u8e=new mb(vIe),mte(),Y5e=new rC(Xke,K5e=y5e),new Bb,Z5e=new rC(hxe,null),Q5e=new mb(yIe),Eie(),r6e=EF(V5e,m3(ay(R8e,1),Kye,290,0,[z5e])),n6e=new rC(uCe,r6e),i6e=new rC(qke,(pO(),!1)),K6(),a6e=new rC(Jke,o6e=O8e),o9(),u6e=new rC(_ke,f6e=H8e),p6e=new rC(LMe,!1),Z6(),g6e=new rC(mke,b6e=c9e),j6e=new tM(12),U6e=new rC(dxe,j6e),y6e=new rC(jxe,!1),E6e=new rC(SCe,!1),Hie(),Q6e=new rC(Bxe,J6e=z9e),s8e=new mb(yCe),c8e=new mb(Pxe),l8e=new mb(Fxe),h8e=new mb(Uxe),S6e=new mw,_6e=new rC(hCe,S6e),t6e=new rC(gCe,!1),m6e=new rC(bCe,!1),new mb(EIe),T6e=new ow,x6e=new rC(ECe,T6e),F6e=new rC(Vke,!1),new Bb,f8e=new rC(_Ie,1),new rC(SIe,!0),G6(0),new rC(xIe,G6(100)),new rC(TIe,!1),G6(0),new rC(AIe,G6(4e3)),G6(0),new rC(kIe,G6(400)),new rC(CIe,!1),new rC(MIe,!1),new rC(IIe,!0),new rC(OIe,!1),X9(),J5e=new rC(mIe,e6e=V7e),d8e=new rC(Pke,10),p8e=new rC(Lke,10),g8e=new rC(uxe,20),b8e=new rC(Dke,10),m8e=new rC(Dxe,2),w8e=new rC(Fke,10),y8e=new rC(Uke,0),E8e=new rC(Bke,5),_8e=new rC(jke,1),S8e=new rC(Lxe,20),x8e=new rC(zke,10),k8e=new rC($ke,10),v8e=new mb(Hke),A8e=new $C,T8e=new rC(_Ce,A8e),$6e=new mb(vCe),B6e=new rC(wCe,z6e=!1),k6e=new tM(5),A6e=new rC(tCe,k6e),mue(),t=xL(NE(P9e),9),M6e=new PP(t,xL(lR(t,t.length),9),0),C6e=new rC(eCe,M6e),Cee(),G6e=new rC(aCe,V6e=O9e),q6e=new mb(oCe),X6e=new mb(sCe),Y6e=new mb(cCe),W6e=new mb(lCe),e=xL(NE(B7e),9),O6e=new PP(e,xL(lR(e,e.length),9),0),I6e=new rC(Zke,O6e),D6e=T8((Tpe(),R7e)),L6e=new rC(Qke,D6e),P6e=new HA(0,0),R6e=new rC(fCe,P6e),N6e=new rC(NIe,!1),mJ(),c6e=new rC(dCe,l6e=L8e),s6e=new rC(zxe,!1),new mb(RIe),G6(1),new rC(PIe,null),K6e=new mb(mCe),e8e=new mb(pCe),Lwe(),a8e=new rC(Wke,o8e=b7e),Z6e=new mb(Gke),lae(),r8e=T8(q9e),n8e=new rC(nCe,r8e),t8e=new rC(rCe,!1),i8e=new rC(iCe,!0),w6e=new rC(Yke,!1),v6e=new rC(Kke,!1),h6e=new rC(fxe,1),xae(),new rC(LIe,d6e=K8e),H6e=!0}function Nve(){var e,t;Nve=S,QWe=new mb($xe),SWe=new mb("coordinateOrigin"),cqe=new mb("processors"),_We=new $N("compoundNode",(pO(),!1)),jWe=new $N("insideConnections",!1),JWe=new mb("originalBendpoints"),eqe=new mb("originalDummyNodePosition"),tqe=new mb("originalLabelEdge"),uqe=new mb("representedLabels"),CWe=new mb("endLabels"),MWe=new mb("endLabel.origin"),GWe=new $N("labelSide",(are(),g9e)),KWe=new $N("maxEdgeThickness",0),fqe=new $N("reversed",!1),lqe=new mb(Hxe),qWe=new $N("longEdgeSource",null),XWe=new $N("longEdgeTarget",null),WWe=new $N("longEdgeHasLabelDummies",!1),VWe=new $N("longEdgeBeforeLabelDummy",!1),kWe=new $N("edgeConstraint",(D3(),pVe)),zWe=new mb("inLayerLayoutUnit"),BWe=new $N("inLayerConstraint",(MZ(),uWe)),$We=new $N("inLayerSuccessorConstraint",new $b),HWe=new $N("inLayerSuccessorConstraintBetweenNonDummies",!1),oqe=new mb("portDummy"),xWe=new $N("crossingHint",G6(0)),DWe=new $N("graphProperties",new PP(t=xL(NE(sWe),9),xL(lR(t,t.length),9),0)),RWe=new $N("externalPortSide",(Lwe(),b7e)),PWe=new $N("externalPortSize",new lE),OWe=new mb("externalPortReplacedDummies"),NWe=new mb("externalPortReplacedDummy"),IWe=new $N("externalPortConnections",new PP(e=xL(NE(M7e),9),xL(lR(e,e.length),9),0)),sqe=new $N(NSe,0),wWe=new mb("barycenterAssociates"),vqe=new mb("TopSideComments"),vWe=new mb("BottomSideComments"),EWe=new mb("CommentConnectionPort"),UWe=new $N("inputCollect",!1),iqe=new $N("outputCollect",!1),AWe=new $N("cyclic",!1),TWe=new mb("crossHierarchyMap"),wqe=new mb("targetOffset"),new $N("splineLabelSize",new lE),dqe=new mb("spacings"),aqe=new $N("partitionConstraint",!1),yWe=new mb("breakingPoint.info"),mqe=new mb("splines.survivingEdge"),bqe=new mb("splines.route.start"),pqe=new mb("splines.edgeChain"),rqe=new mb("originalPortConstraints"),hqe=new mb("selfLoopHolder"),gqe=new mb("splines.nsPortY"),ZWe=new mb("modelOrder"),YWe=new mb("longEdgeTargetNode"),LWe=new $N("firstTryWithInitialOrder",!1),FWe=new mb("layerConstraints.hiddenNodes"),nqe=new mb("layerConstraints.opposidePort")}function Rve(){Rve=S,p4(),Rqe=new rC(tAe,Pqe=WQe),pQ(),Jqe=new rC(nAe,eXe=lVe),mXe=new rC(rAe,(pO(),!1)),RW(),EXe=new rC(iAe,_Xe=pWe),BXe=new rC(aAe,!1),zXe=new rC(oAe,!0),kqe=new rC(sAe,!1),cZ(),oYe=new rC(cAe,sYe=KQe),G6(1),gYe=new rC(lAe,G6(7)),bYe=new rC(uAe,!1),OQ(),Zqe=new rC(fAe,Qqe=aVe),sae(),UXe=new rC(hAe,jXe=wQe),s9(),CXe=new rC(dAe,MXe=xqe),G6(-1),kXe=new rC(pAe,G6(-1)),G6(-1),IXe=new rC(gAe,G6(-1)),G6(-1),OXe=new rC(bAe,G6(4)),G6(-1),RXe=new rC(mAe,G6(2)),Tfe(),DXe=new rC(wAe,FXe=zQe),G6(0),LXe=new rC(vAe,G6(0)),TXe=new rC(yAe,G6(Jve)),_q(),Yqe=new rC(EAe,Kqe=KGe),Hqe=new rC(_Ae,.1),qqe=new rC(SAe,!1),G6(-1),Vqe=new rC(xAe,G6(-1)),G6(-1),Wqe=new rC(TAe,G6(-1)),G6(0),Lqe=new rC(AAe,G6(40)),d2(),Bqe=new rC(kAe,zqe=oWe),Dqe=new rC(CAe,Fqe=iWe),Fte(),iYe=new rC(MAe,aYe=CQe),XXe=new mb(IAe),jK(),$Xe=new rC(OAe,HXe=AVe),aie(),VXe=new rC(NAe,WXe=RVe),new Bb,ZXe=new rC(RAe,.3),JXe=new mb(PAe),bte(),eYe=new rC(LAe,tYe=xQe),p2(),sXe=new rC(DAe,cXe=oJe),aY(),lXe=new rC(FAe,uXe=fJe),P5(),fXe=new rC(UAe,hXe=bJe),pXe=new rC(jAe,.2),aXe=new rC(BAe,2),fYe=new rC(zAe,null),dYe=new rC($Ae,10),hYe=new rC(HAe,10),pYe=new rC(GAe,20),G6(0),cYe=new rC(VAe,G6(0)),G6(0),lYe=new rC(WAe,G6(0)),G6(0),uYe=new rC(qAe,G6(0)),Cqe=new rC(XAe,!1),foe(),Oqe=new rC(YAe,Nqe=$Ve),jY(),Mqe=new rC(KAe,Iqe=WGe),vXe=new rC(ZAe,!1),G6(0),wXe=new rC(QAe,G6(16)),G6(0),yXe=new rC(JAe,G6(5)),Y2(),UYe=new rC(eke,jYe=TJe),mYe=new rC(tke,10),yYe=new rC(nke,1),n1(),CYe=new rC(rke,MYe=tVe),SYe=new mb(ike),AYe=G6(1),G6(0),TYe=new rC(ake,AYe),j0(),HYe=new rC(oke,GYe=vJe),BYe=new mb(ske),PYe=new rC(cke,!0),NYe=new rC(lke,2),DYe=new rC(uke,!0),Soe(),rXe=new rC(fke,iXe=_Ve),Sse(),tXe=new rC(hke,nXe=jGe),xXe=oVe,SXe=YGe,NXe=mQe,PXe=mQe,AXe=pQe,Z6(),Gqe=s9e,Xqe=KGe,$qe=KGe,Uqe=KGe,jqe=s9e,YXe=OQe,KXe=CQe,GXe=CQe,qXe=CQe,QXe=IQe,rYe=OQe,nYe=OQe,o9(),dXe=$8e,gXe=$8e,bXe=bJe,oXe=z8e,wYe=AJe,vYe=xJe,EYe=AJe,_Ye=xJe,IYe=AJe,OYe=xJe,xYe=eVe,kYe=tVe,VYe=AJe,WYe=xJe,zYe=AJe,$Ye=xJe,LYe=xJe,RYe=xJe,FYe=xJe}function Pve(){Pve=S,G$e=new Gx("DIRECTION_PREPROCESSOR",0),z$e=new Gx("COMMENT_PREPROCESSOR",1),V$e=new Gx("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER",2),sHe=new Gx("INTERACTIVE_EXTERNAL_PORT_POSITIONER",3),AHe=new Gx("PARTITION_PREPROCESSOR",4),fHe=new Gx("LABEL_DUMMY_INSERTER",5),NHe=new Gx("SELF_LOOP_PREPROCESSOR",6),bHe=new Gx("LAYER_CONSTRAINT_PREPROCESSOR",7),xHe=new Gx("PARTITION_MIDPROCESSOR",8),nHe=new Gx("HIGH_DEGREE_NODE_LAYER_PROCESSOR",9),yHe=new Gx("NODE_PROMOTION",10),gHe=new Gx("LAYER_CONSTRAINT_POSTPROCESSOR",11),THe=new Gx("PARTITION_POSTPROCESSOR",12),Q$e=new Gx("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR",13),PHe=new Gx("SEMI_INTERACTIVE_CROSSMIN_PROCESSOR",14),L$e=new Gx("BREAKING_POINT_INSERTER",15),vHe=new Gx("LONG_EDGE_SPLITTER",16),CHe=new Gx("PORT_SIDE_PROCESSOR",17),cHe=new Gx("INVERTED_PORT_PROCESSOR",18),kHe=new Gx("PORT_LIST_SORTER",19),DHe=new Gx("SORT_BY_INPUT_ORDER_OF_MODEL",20),_He=new Gx("NORTH_SOUTH_PORT_PREPROCESSOR",21),D$e=new Gx("BREAKING_POINT_PROCESSOR",22),SHe=new Gx(NTe,23),FHe=new Gx(RTe,24),IHe=new Gx("SELF_LOOP_PORT_RESTORER",25),LHe=new Gx("SINGLE_EDGE_GRAPH_WRAPPER",26),lHe=new Gx("IN_LAYER_CONSTRAINT_PROCESSOR",27),Y$e=new Gx("END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR",28),uHe=new Gx("LABEL_AND_NODE_SIZE_PROCESSOR",29),oHe=new Gx("INNERMOST_NODE_MARGIN_CALCULATOR",30),RHe=new Gx("SELF_LOOP_ROUTER",31),j$e=new Gx("COMMENT_NODE_MARGIN_CALCULATOR",32),q$e=new Gx("END_LABEL_PREPROCESSOR",33),dHe=new Gx("LABEL_DUMMY_SWITCHER",34),U$e=new Gx("CENTER_LABEL_MANAGEMENT_PROCESSOR",35),pHe=new Gx("LABEL_SIDE_SELECTOR",36),iHe=new Gx("HYPEREDGE_DUMMY_MERGER",37),J$e=new Gx("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR",38),mHe=new Gx("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR",39),tHe=new Gx("HIERARCHICAL_PORT_POSITION_PROCESSOR",40),$$e=new Gx("CONSTRAINTS_POSTPROCESSOR",41),B$e=new Gx("COMMENT_POSTPROCESSOR",42),aHe=new Gx("HYPERNODE_PROCESSOR",43),eHe=new Gx("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER",44),wHe=new Gx("LONG_EDGE_JOINER",45),OHe=new Gx("SELF_LOOP_POSTPROCESSOR",46),F$e=new Gx("BREAKING_POINT_REMOVER",47),EHe=new Gx("NORTH_SOUTH_PORT_POSTPROCESSOR",48),rHe=new Gx("HORIZONTAL_COMPACTOR",49),hHe=new Gx("LABEL_DUMMY_REMOVER",50),K$e=new Gx("FINAL_SPLINE_BENDPOINTS_CALCULATOR",51),X$e=new Gx("END_LABEL_SORTER",52),MHe=new Gx("REVERSED_EDGE_RESTORER",53),W$e=new Gx("END_LABEL_POSTPROCESSOR",54),Z$e=new Gx("HIERARCHICAL_NODE_RESIZER",55),H$e=new Gx("DIRECTION_POSTPROCESSOR",56)}function Lve(){Lve=S,Qrt=new jb(7),Jrt=new sF(8,94),new sF(8,64),eit=new sF(8,36),oit=new sF(8,65),sit=new sF(8,122),cit=new sF(8,90),fit=new sF(8,98),iit=new sF(8,66),lit=new sF(8,60),hit=new sF(8,62),Zrt=new jb(11),Ahe(Krt=new VG(4),48,57),Ahe(uit=new VG(4),48,57),Ahe(uit,65,90),Ahe(uit,95,95),Ahe(uit,97,122),Ahe(ait=new VG(4),9,9),Ahe(ait,10,10),Ahe(ait,12,12),Ahe(ait,13,13),Ahe(ait,32,32),tit=_ge(Krt),rit=_ge(uit),nit=_ge(ait),Wrt=new Hb,qrt=new Hb,Xrt=m3(ay(eFe,1),kye,2,6,["Cn","Lu","Ll","Lt","Lm","Lo","Mn","Me","Mc","Nd","Nl","No","Zs","Zl","Zp","Cc","Cf",null,"Co","Cs","Pd","Ps","Pe","Pc","Po","Sm","Sc","Sk","So","Pi","Pf","L","M","N","Z","C","P","S"]),Vrt=m3(ay(eFe,1),kye,2,6,["Basic Latin","Latin-1 Supplement","Latin Extended-A","Latin Extended-B","IPA Extensions","Spacing Modifier Letters","Combining Diacritical Marks","Greek","Cyrillic","Armenian","Hebrew","Arabic","Syriac","Thaana","Devanagari","Bengali","Gurmukhi","Gujarati","Oriya","Tamil","Telugu","Kannada","Malayalam","Sinhala","Thai","Lao","Tibetan","Myanmar","Georgian","Hangul Jamo","Ethiopic","Cherokee","Unified Canadian Aboriginal Syllabics","Ogham","Runic","Khmer","Mongolian","Latin Extended Additional","Greek Extended","General Punctuation","Superscripts and Subscripts","Currency Symbols","Combining Marks for Symbols","Letterlike Symbols","Number Forms","Arrows","Mathematical Operators","Miscellaneous Technical","Control Pictures","Optical Character Recognition","Enclosed Alphanumerics","Box Drawing","Block Elements","Geometric Shapes","Miscellaneous Symbols","Dingbats","Braille Patterns","CJK Radicals Supplement","Kangxi Radicals","Ideographic Description Characters","CJK Symbols and Punctuation","Hiragana","Katakana","Bopomofo","Hangul Compatibility Jamo","Kanbun","Bopomofo Extended","Enclosed CJK Letters and Months","CJK Compatibility","CJK Unified Ideographs Extension A","CJK Unified Ideographs","Yi Syllables","Yi Radicals","Hangul Syllables",yLe,"CJK Compatibility Ideographs","Alphabetic Presentation Forms","Arabic Presentation Forms-A","Combining Half Marks","CJK Compatibility Forms","Small Form Variants","Arabic Presentation Forms-B","Specials","Halfwidth and Fullwidth Forms","Old Italic","Gothic","Deseret","Byzantine Musical Symbols","Musical Symbols","Mathematical Alphanumeric Symbols","CJK Unified Ideographs Extension B","CJK Compatibility Ideographs Supplement","Tags"]),Yrt=m3(ay(Eit,1),kEe,24,15,[66304,66351,66352,66383,66560,66639,118784,119039,119040,119295,119808,120831,131072,173782,194560,195103,917504,917631])}function Dve(){Dve=S,Ije=new C0("OUT_T_L",0,(IK(),eje),(CZ(),oje),(NQ(),qUe),qUe,m3(ay(BLe,1),aye,21,0,[EF((mue(),S9e),m3(ay(P9e,1),Kye,92,0,[A9e,v9e]))])),Mje=new C0("OUT_T_C",1,JUe,oje,qUe,XUe,m3(ay(BLe,1),aye,21,0,[EF(S9e,m3(ay(P9e,1),Kye,92,0,[A9e,w9e])),EF(S9e,m3(ay(P9e,1),Kye,92,0,[A9e,w9e,y9e]))])),Oje=new C0("OUT_T_R",2,tje,oje,qUe,YUe,m3(ay(BLe,1),aye,21,0,[EF(S9e,m3(ay(P9e,1),Kye,92,0,[A9e,E9e]))])),Eje=new C0("OUT_B_L",3,eje,cje,YUe,qUe,m3(ay(BLe,1),aye,21,0,[EF(S9e,m3(ay(P9e,1),Kye,92,0,[x9e,v9e]))])),yje=new C0("OUT_B_C",4,JUe,cje,YUe,XUe,m3(ay(BLe,1),aye,21,0,[EF(S9e,m3(ay(P9e,1),Kye,92,0,[x9e,w9e])),EF(S9e,m3(ay(P9e,1),Kye,92,0,[x9e,w9e,y9e]))])),_je=new C0("OUT_B_R",5,tje,cje,YUe,YUe,m3(ay(BLe,1),aye,21,0,[EF(S9e,m3(ay(P9e,1),Kye,92,0,[x9e,E9e]))])),Tje=new C0("OUT_L_T",6,tje,cje,qUe,qUe,m3(ay(BLe,1),aye,21,0,[EF(S9e,m3(ay(P9e,1),Kye,92,0,[v9e,A9e,y9e]))])),xje=new C0("OUT_L_C",7,tje,sje,XUe,qUe,m3(ay(BLe,1),aye,21,0,[EF(S9e,m3(ay(P9e,1),Kye,92,0,[v9e,T9e])),EF(S9e,m3(ay(P9e,1),Kye,92,0,[v9e,T9e,y9e]))])),Sje=new C0("OUT_L_B",8,tje,oje,YUe,qUe,m3(ay(BLe,1),aye,21,0,[EF(S9e,m3(ay(P9e,1),Kye,92,0,[v9e,x9e,y9e]))])),Cje=new C0("OUT_R_T",9,eje,cje,qUe,YUe,m3(ay(BLe,1),aye,21,0,[EF(S9e,m3(ay(P9e,1),Kye,92,0,[E9e,A9e,y9e]))])),kje=new C0("OUT_R_C",10,eje,sje,XUe,YUe,m3(ay(BLe,1),aye,21,0,[EF(S9e,m3(ay(P9e,1),Kye,92,0,[E9e,T9e])),EF(S9e,m3(ay(P9e,1),Kye,92,0,[E9e,T9e,y9e]))])),Aje=new C0("OUT_R_B",11,eje,oje,YUe,YUe,m3(ay(BLe,1),aye,21,0,[EF(S9e,m3(ay(P9e,1),Kye,92,0,[E9e,x9e,y9e]))])),wje=new C0("IN_T_L",12,eje,cje,qUe,qUe,m3(ay(BLe,1),aye,21,0,[EF(_9e,m3(ay(P9e,1),Kye,92,0,[A9e,v9e])),EF(_9e,m3(ay(P9e,1),Kye,92,0,[A9e,v9e,y9e]))])),mje=new C0("IN_T_C",13,JUe,cje,qUe,XUe,m3(ay(BLe,1),aye,21,0,[EF(_9e,m3(ay(P9e,1),Kye,92,0,[A9e,w9e])),EF(_9e,m3(ay(P9e,1),Kye,92,0,[A9e,w9e,y9e]))])),vje=new C0("IN_T_R",14,tje,cje,qUe,YUe,m3(ay(BLe,1),aye,21,0,[EF(_9e,m3(ay(P9e,1),Kye,92,0,[A9e,E9e])),EF(_9e,m3(ay(P9e,1),Kye,92,0,[A9e,E9e,y9e]))])),gje=new C0("IN_C_L",15,eje,sje,XUe,qUe,m3(ay(BLe,1),aye,21,0,[EF(_9e,m3(ay(P9e,1),Kye,92,0,[T9e,v9e])),EF(_9e,m3(ay(P9e,1),Kye,92,0,[T9e,v9e,y9e]))])),pje=new C0("IN_C_C",16,JUe,sje,XUe,XUe,m3(ay(BLe,1),aye,21,0,[EF(_9e,m3(ay(P9e,1),Kye,92,0,[T9e,w9e])),EF(_9e,m3(ay(P9e,1),Kye,92,0,[T9e,w9e,y9e]))])),bje=new C0("IN_C_R",17,tje,sje,XUe,YUe,m3(ay(BLe,1),aye,21,0,[EF(_9e,m3(ay(P9e,1),Kye,92,0,[T9e,E9e])),EF(_9e,m3(ay(P9e,1),Kye,92,0,[T9e,E9e,y9e]))])),hje=new C0("IN_B_L",18,eje,oje,YUe,qUe,m3(ay(BLe,1),aye,21,0,[EF(_9e,m3(ay(P9e,1),Kye,92,0,[x9e,v9e])),EF(_9e,m3(ay(P9e,1),Kye,92,0,[x9e,v9e,y9e]))])),fje=new C0("IN_B_C",19,JUe,oje,YUe,XUe,m3(ay(BLe,1),aye,21,0,[EF(_9e,m3(ay(P9e,1),Kye,92,0,[x9e,w9e])),EF(_9e,m3(ay(P9e,1),Kye,92,0,[x9e,w9e,y9e]))])),dje=new C0("IN_B_R",20,tje,oje,YUe,YUe,m3(ay(BLe,1),aye,21,0,[EF(_9e,m3(ay(P9e,1),Kye,92,0,[x9e,E9e])),EF(_9e,m3(ay(P9e,1),Kye,92,0,[x9e,E9e,y9e]))])),Nje=new C0(kSe,21,null,null,null,null,m3(ay(BLe,1),aye,21,0,[]))}function Fve(){Fve=S,Wtt=(Ij(),Gtt).b,xL(FQ(u$(Gtt.b),0),32),xL(FQ(u$(Gtt.b),1),17),Vtt=Gtt.a,xL(FQ(u$(Gtt.a),0),32),xL(FQ(u$(Gtt.a),1),17),xL(FQ(u$(Gtt.a),2),17),xL(FQ(u$(Gtt.a),3),17),xL(FQ(u$(Gtt.a),4),17),qtt=Gtt.o,xL(FQ(u$(Gtt.o),0),32),xL(FQ(u$(Gtt.o),1),32),Ytt=xL(FQ(u$(Gtt.o),2),17),xL(FQ(u$(Gtt.o),3),17),xL(FQ(u$(Gtt.o),4),17),xL(FQ(u$(Gtt.o),5),17),xL(FQ(u$(Gtt.o),6),17),xL(FQ(u$(Gtt.o),7),17),xL(FQ(u$(Gtt.o),8),17),xL(FQ(u$(Gtt.o),9),17),xL(FQ(u$(Gtt.o),10),17),xL(FQ(u$(Gtt.o),11),17),xL(FQ(u$(Gtt.o),12),17),xL(FQ(u$(Gtt.o),13),17),xL(FQ(u$(Gtt.o),14),17),xL(FQ(u$(Gtt.o),15),17),xL(FQ(l$(Gtt.o),0),58),xL(FQ(l$(Gtt.o),1),58),xL(FQ(l$(Gtt.o),2),58),xL(FQ(l$(Gtt.o),3),58),xL(FQ(l$(Gtt.o),4),58),xL(FQ(l$(Gtt.o),5),58),xL(FQ(l$(Gtt.o),6),58),xL(FQ(l$(Gtt.o),7),58),xL(FQ(l$(Gtt.o),8),58),xL(FQ(l$(Gtt.o),9),58),Xtt=Gtt.p,xL(FQ(u$(Gtt.p),0),32),xL(FQ(u$(Gtt.p),1),32),xL(FQ(u$(Gtt.p),2),32),xL(FQ(u$(Gtt.p),3),32),xL(FQ(u$(Gtt.p),4),17),xL(FQ(u$(Gtt.p),5),17),xL(FQ(l$(Gtt.p),0),58),xL(FQ(l$(Gtt.p),1),58),Ktt=Gtt.q,xL(FQ(u$(Gtt.q),0),32),Ztt=Gtt.v,xL(FQ(u$(Gtt.v),0),17),xL(FQ(l$(Gtt.v),0),58),xL(FQ(l$(Gtt.v),1),58),xL(FQ(l$(Gtt.v),2),58),Qtt=Gtt.w,xL(FQ(u$(Gtt.w),0),32),xL(FQ(u$(Gtt.w),1),32),xL(FQ(u$(Gtt.w),2),32),xL(FQ(u$(Gtt.w),3),17),Jtt=Gtt.B,xL(FQ(u$(Gtt.B),0),17),xL(FQ(l$(Gtt.B),0),58),xL(FQ(l$(Gtt.B),1),58),xL(FQ(l$(Gtt.B),2),58),nnt=Gtt.Q,xL(FQ(u$(Gtt.Q),0),17),xL(FQ(l$(Gtt.Q),0),58),rnt=Gtt.R,xL(FQ(u$(Gtt.R),0),32),int=Gtt.S,xL(FQ(l$(Gtt.S),0),58),xL(FQ(l$(Gtt.S),1),58),xL(FQ(l$(Gtt.S),2),58),xL(FQ(l$(Gtt.S),3),58),xL(FQ(l$(Gtt.S),4),58),xL(FQ(l$(Gtt.S),5),58),xL(FQ(l$(Gtt.S),6),58),xL(FQ(l$(Gtt.S),7),58),xL(FQ(l$(Gtt.S),8),58),xL(FQ(l$(Gtt.S),9),58),xL(FQ(l$(Gtt.S),10),58),xL(FQ(l$(Gtt.S),11),58),xL(FQ(l$(Gtt.S),12),58),xL(FQ(l$(Gtt.S),13),58),xL(FQ(l$(Gtt.S),14),58),ant=Gtt.T,xL(FQ(u$(Gtt.T),0),17),xL(FQ(u$(Gtt.T),2),17),ont=xL(FQ(u$(Gtt.T),3),17),xL(FQ(u$(Gtt.T),4),17),xL(FQ(l$(Gtt.T),0),58),xL(FQ(l$(Gtt.T),1),58),xL(FQ(u$(Gtt.T),1),17),snt=Gtt.U,xL(FQ(u$(Gtt.U),0),32),xL(FQ(u$(Gtt.U),1),32),xL(FQ(u$(Gtt.U),2),17),xL(FQ(u$(Gtt.U),3),17),xL(FQ(u$(Gtt.U),4),17),xL(FQ(u$(Gtt.U),5),17),xL(FQ(l$(Gtt.U),0),58),cnt=Gtt.V,xL(FQ(u$(Gtt.V),0),17),lnt=Gtt.W,xL(FQ(u$(Gtt.W),0),32),xL(FQ(u$(Gtt.W),1),32),xL(FQ(u$(Gtt.W),2),32),xL(FQ(u$(Gtt.W),3),17),xL(FQ(u$(Gtt.W),4),17),xL(FQ(u$(Gtt.W),5),17),fnt=Gtt.bb,xL(FQ(u$(Gtt.bb),0),32),xL(FQ(u$(Gtt.bb),1),32),xL(FQ(u$(Gtt.bb),2),32),xL(FQ(u$(Gtt.bb),3),32),xL(FQ(u$(Gtt.bb),4),32),xL(FQ(u$(Gtt.bb),5),32),xL(FQ(u$(Gtt.bb),6),32),xL(FQ(u$(Gtt.bb),7),17),xL(FQ(l$(Gtt.bb),0),58),xL(FQ(l$(Gtt.bb),1),58),hnt=Gtt.eb,xL(FQ(u$(Gtt.eb),0),32),xL(FQ(u$(Gtt.eb),1),32),xL(FQ(u$(Gtt.eb),2),32),xL(FQ(u$(Gtt.eb),3),32),xL(FQ(u$(Gtt.eb),4),32),xL(FQ(u$(Gtt.eb),5),32),xL(FQ(u$(Gtt.eb),6),17),xL(FQ(u$(Gtt.eb),7),17),unt=Gtt.ab,xL(FQ(u$(Gtt.ab),0),32),xL(FQ(u$(Gtt.ab),1),32),ent=Gtt.H,xL(FQ(u$(Gtt.H),0),17),xL(FQ(u$(Gtt.H),1),17),xL(FQ(u$(Gtt.H),2),17),xL(FQ(u$(Gtt.H),3),17),xL(FQ(u$(Gtt.H),4),17),xL(FQ(u$(Gtt.H),5),17),xL(FQ(l$(Gtt.H),0),58),dnt=Gtt.db,xL(FQ(u$(Gtt.db),0),17),tnt=Gtt.M}function Uve(e){US(e,new cae(qy(zy(Wy(By(Vy(Hy(new hs,STe),"ELK Layered"),"Layer-based algorithm provided by the Eclipse Layout Kernel. Arranges as many edges as possible into one direction by placing nodes into subsequent layers. This implementation supports different routing styles (straight, orthogonal, splines); if orthogonal routing is selected, arbitrary port constraints are respected, thus enabling the layout of block diagrams such as actor-oriented models or circuit schematics. Furthermore, full layout of compound graphs with cross-hierarchy edges is supported when the respective option is activated on the top level."),new Sa),STe),EF(($le(),Wet),m3(ay(Yet,1),Kye,237,0,[Het,Get,$et,Vet,Bet,jet]))))),BV(e,STe,Pke,Mee(LZe)),BV(e,STe,Lke,Mee(DZe)),BV(e,STe,uxe,Mee(FZe)),BV(e,STe,Dke,Mee(UZe)),BV(e,STe,Dxe,Mee(BZe)),BV(e,STe,Fke,Mee(zZe)),BV(e,STe,Uke,Mee(GZe)),BV(e,STe,jke,Mee(WZe)),BV(e,STe,Bke,Mee(VZe)),BV(e,STe,Lxe,Mee(qZe)),BV(e,STe,zke,Mee(YZe)),BV(e,STe,$ke,Mee(ZZe)),BV(e,STe,Hke,Mee(HZe)),BV(e,STe,zAe,Mee(PZe)),BV(e,STe,HAe,Mee(jZe)),BV(e,STe,$Ae,Mee($Ze)),BV(e,STe,GAe,Mee(XZe)),BV(e,STe,Pxe,G6(0)),BV(e,STe,VAe,Mee(MZe)),BV(e,STe,WAe,Mee(IZe)),BV(e,STe,qAe,Mee(OZe)),BV(e,STe,eke,Mee(cQe)),BV(e,STe,tke,Mee(eQe)),BV(e,STe,nke,Mee(tQe)),BV(e,STe,rke,Mee(iQe)),BV(e,STe,ike,Mee(nQe)),BV(e,STe,ake,Mee(rQe)),BV(e,STe,oke,Mee(uQe)),BV(e,STe,ske,Mee(lQe)),BV(e,STe,cke,Mee(oQe)),BV(e,STe,lke,Mee(aQe)),BV(e,STe,uke,Mee(sQe)),BV(e,STe,PAe,Mee(nZe)),BV(e,STe,LAe,Mee(rZe)),BV(e,STe,UAe,Mee(xKe)),BV(e,STe,jAe,Mee(TKe)),BV(e,STe,dxe,uZe),BV(e,STe,_ke,yKe),BV(e,STe,Gke,0),BV(e,STe,Fxe,G6(1)),BV(e,STe,hxe,Nxe),BV(e,STe,Vke,Mee(cZe)),BV(e,STe,Bxe,Mee(yZe)),BV(e,STe,Wke,Mee(TZe)),BV(e,STe,qke,Mee(fKe)),BV(e,STe,Xke,Mee(qYe)),BV(e,STe,mke,Mee(CKe)),BV(e,STe,Uxe,(pO(),!0)),BV(e,STe,Yke,Mee(RKe)),BV(e,STe,Kke,Mee(PKe)),BV(e,STe,Zke,Mee(aZe)),BV(e,STe,Qke,Mee(sZe)),BV(e,STe,Jke,pKe),BV(e,STe,eCe,Mee(ZKe)),BV(e,STe,tCe,Mee(KKe)),BV(e,STe,nCe,Mee(SZe)),BV(e,STe,rCe,Mee(_Ze)),BV(e,STe,iCe,Mee(xZe)),BV(e,STe,aCe,dZe),BV(e,STe,oCe,Mee(gZe)),BV(e,STe,sCe,Mee(bZe)),BV(e,STe,cCe,Mee(mZe)),BV(e,STe,lCe,Mee(pZe)),BV(e,STe,uAe,Mee(JZe)),BV(e,STe,hAe,Mee(WKe)),BV(e,STe,wAe,Mee(VKe)),BV(e,STe,lAe,Mee(QZe)),BV(e,STe,dAe,Mee(BKe)),BV(e,STe,fAe,Mee(uKe)),BV(e,STe,EAe,Mee(lKe)),BV(e,STe,AAe,Mee(nKe)),BV(e,STe,kAe,Mee(iKe)),BV(e,STe,CAe,Mee(rKe)),BV(e,STe,SAe,Mee(cKe)),BV(e,STe,aAe,Mee(XKe)),BV(e,STe,oAe,Mee(YKe)),BV(e,STe,iAe,Mee(DKe)),BV(e,STe,MAe,Mee(iZe)),BV(e,STe,NAe,Mee(JKe)),BV(e,STe,rAe,Mee(kKe)),BV(e,STe,RAe,Mee(tZe)),BV(e,STe,DAe,Mee(_Ke)),BV(e,STe,FAe,Mee(SKe)),BV(e,STe,uCe,Mee(tKe)),BV(e,STe,OAe,Mee(QKe)),BV(e,STe,YAe,Mee(JYe)),BV(e,STe,KAe,Mee(QYe)),BV(e,STe,XAe,Mee(ZYe)),BV(e,STe,ZAe,Mee(IKe)),BV(e,STe,QAe,Mee(MKe)),BV(e,STe,JAe,Mee(OKe)),BV(e,STe,fCe,Mee(oZe)),BV(e,STe,hCe,Mee(FKe)),BV(e,STe,fxe,Mee(AKe)),BV(e,STe,dCe,Mee(mKe)),BV(e,STe,zxe,Mee(bKe)),BV(e,STe,_Ae,Mee(aKe)),BV(e,STe,pCe,Mee(EZe)),BV(e,STe,gCe,Mee(KYe)),BV(e,STe,bCe,Mee(NKe)),BV(e,STe,mCe,Mee(wZe)),BV(e,STe,wCe,Mee(fZe)),BV(e,STe,vCe,Mee(hZe)),BV(e,STe,bAe,Mee($Ke)),BV(e,STe,mAe,Mee(HKe)),BV(e,STe,yCe,Mee(kZe)),BV(e,STe,sAe,Mee(XYe)),BV(e,STe,vAe,Mee(GKe)),BV(e,STe,fke,Mee(wKe)),BV(e,STe,hke,Mee(gKe)),BV(e,STe,ECe,Mee(qKe)),BV(e,STe,yAe,Mee(UKe)),BV(e,STe,IAe,Mee(eZe)),BV(e,STe,_Ce,Mee(KZe)),BV(e,STe,nAe,Mee(dKe)),BV(e,STe,cAe,Mee(AZe)),BV(e,STe,BAe,Mee(EKe)),BV(e,STe,pAe,Mee(jKe)),BV(e,STe,xAe,Mee(oKe)),BV(e,STe,SCe,Mee(LKe)),BV(e,STe,gAe,Mee(zKe)),BV(e,STe,TAe,Mee(sKe)),BV(e,STe,tAe,Mee(eKe))}function jve(e,t){var n;return Hrt||(Hrt=new Hb,Grt=new Hb,Lve(),Lve(),Z9(n=new VG(4),"\t\n\r\r "),rG(Hrt,gLe,n),rG(Grt,gLe,_ge(n)),Z9(n=new VG(4),wLe),rG(Hrt,dLe,n),rG(Grt,dLe,_ge(n)),Z9(n=new VG(4),wLe),rG(Hrt,dLe,n),rG(Grt,dLe,_ge(n)),Z9(n=new VG(4),vLe),Mbe(n,xL(fH(Hrt,dLe),117)),rG(Hrt,pLe,n),rG(Grt,pLe,_ge(n)),Z9(n=new VG(4),"-.0:AZ__az··ÀÖØöøıĴľŁňŊžƀǃǍǰǴǵǺȗɐʨʻˁːˑ̀͠͡ͅΆΊΌΌΎΡΣώϐϖϚϚϜϜϞϞϠϠϢϳЁЌЎяёќўҁ҃҆ҐӄӇӈӋӌӐӫӮӵӸӹԱՖՙՙաֆֹֻֽֿֿׁׂ֑֣֡ׄׄאתװײءغـْ٠٩ٰڷںھۀێېۓە۪ۭۨ۰۹ँःअह़्॑॔क़ॣ०९ঁঃঅঌএঐওনপরললশহ়়াৄেৈো্ৗৗড়ঢ়য়ৣ০ৱਂਂਅਊਏਐਓਨਪਰਲਲ਼ਵਸ਼ਸਹ਼਼ਾੂੇੈੋ੍ਖ਼ੜਫ਼ਫ਼੦ੴઁઃઅઋઍઍએઑઓનપરલળવહ઼ૅેૉો્ૠૠ૦૯ଁଃଅଌଏଐଓନପରଲଳଶହ଼ୃେୈୋ୍ୖୗଡ଼ଢ଼ୟୡ୦୯ஂஃஅஊஎஐஒகஙசஜஜஞடணதநபமவஷஹாூெைொ்ௗௗ௧௯ఁఃఅఌఎఐఒనపళవహాౄెైొ్ౕౖౠౡ౦౯ಂಃಅಌಎಐಒನಪಳವಹಾೄೆೈೊ್ೕೖೞೞೠೡ೦೯ംഃഅഌഎഐഒനപഹാൃെൈൊ്ൗൗൠൡ൦൯กฮะฺเ๎๐๙ກຂຄຄງຈຊຊຍຍດທນຟມຣລລວວສຫອຮະູົຽເໄໆໆ່ໍ໐໙༘༙༠༩༹༹༵༵༷༷༾ཇཉཀྵ྄ཱ྆ྋྐྕྗྗྙྭྱྷྐྵྐྵႠჅაჶᄀᄀᄂᄃᄅᄇᄉᄉᄋᄌᄎᄒᄼᄼᄾᄾᅀᅀᅌᅌᅎᅎᅐᅐᅔᅕᅙᅙᅟᅡᅣᅣᅥᅥᅧᅧᅩᅩᅭᅮᅲᅳᅵᅵᆞᆞᆨᆨᆫᆫᆮᆯᆷᆸᆺᆺᆼᇂᇫᇫᇰᇰᇹᇹḀẛẠỹἀἕἘἝἠὅὈὍὐὗὙὙὛὛὝὝὟώᾀᾴᾶᾼιιῂῄῆῌῐΐῖΊῠῬῲῴῶῼ⃐⃜⃡⃡ΩΩKÅ℮℮ↀↂ々々〇〇〡〯〱〵ぁゔ゙゚ゝゞァヺーヾㄅㄬ一龥가힣"),rG(Hrt,bLe,n),rG(Grt,bLe,_ge(n)),Z9(n=new VG(4),vLe),Ahe(n,95,95),Ahe(n,58,58),rG(Hrt,mLe,n),rG(Grt,mLe,_ge(n))),xL(fH(t?Hrt:Grt,e),136)}function Bve(e){return eP("_UI_EMFDiagnostic_marker",e)?"EMF Problem":eP("_UI_CircularContainment_diagnostic",e)?"An object may not circularly contain itself":eP(mNe,e)?"Wrong character.":eP(wNe,e)?"Invalid reference number.":eP(vNe,e)?"A character is required after \\.":eP(yNe,e)?"'?' is not expected. '(?:' or '(?=' or '(?!' or '(?<' or '(?#' or '(?>'?":eP(ENe,e)?"'(?<' or '(? toIndex: ",U_e=", toIndex: ",j_e="Index: ",B_e=", Size: ",z_e="org.eclipse.elk.alg.common",$_e={62:1},H_e="org.eclipse.elk.alg.common.compaction",G_e="Scanline/EventHandler",V_e="org.eclipse.elk.alg.common.compaction.oned",W_e="CNode belongs to another CGroup.",q_e="ISpacingsHandler/1",X_e="The ",Y_e=" instance has been finished already.",K_e="The direction ",Z_e=" is not supported by the CGraph instance.",Q_e="OneDimensionalCompactor",J_e="OneDimensionalCompactor/lambda$0$Type",eSe="Quadruplet",tSe="ScanlineConstraintCalculator",nSe="ScanlineConstraintCalculator/ConstraintsScanlineHandler",rSe="ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type",iSe="ScanlineConstraintCalculator/Timestamp",aSe="ScanlineConstraintCalculator/lambda$0$Type",oSe={169:1,45:1},sSe="org.eclipse.elk.alg.common.compaction.options",cSe="org.eclipse.elk.core.data",lSe="org.eclipse.elk.polyomino.traversalStrategy",uSe="org.eclipse.elk.polyomino.lowLevelSort",fSe="org.eclipse.elk.polyomino.highLevelSort",hSe="org.eclipse.elk.polyomino.fill",dSe={130:1},pSe="polyomino",gSe="org.eclipse.elk.alg.common.networksimplex",bSe={177:1,3:1,4:1},mSe="org.eclipse.elk.alg.common.nodespacing",wSe="org.eclipse.elk.alg.common.nodespacing.cellsystem",vSe="CENTER",ySe={210:1,324:1},ESe={3:1,4:1,5:1,586:1},_Se="LEFT",SSe="RIGHT",xSe="Vertical alignment cannot be null",TSe="BOTTOM",ASe="org.eclipse.elk.alg.common.nodespacing.internal",kSe="UNDEFINED",CSe=.01,MSe="org.eclipse.elk.alg.common.nodespacing.internal.algorithm",ISe="LabelPlacer/lambda$0$Type",OSe="LabelPlacer/lambda$1$Type",NSe="portRatioOrPosition",RSe="org.eclipse.elk.alg.common.overlaps",PSe="DOWN",LSe="org.eclipse.elk.alg.common.polyomino",DSe="NORTH",FSe="EAST",USe="SOUTH",jSe="WEST",BSe="org.eclipse.elk.alg.common.polyomino.structures",zSe="Direction",$Se="Grid is only of size ",HSe=". Requested point (",GSe=") is out of bounds.",VSe=" Given center based coordinates were (",WSe="org.eclipse.elk.graph.properties",qSe="IPropertyHolder",XSe={3:1,94:1,134:1},YSe="org.eclipse.elk.alg.common.spore",KSe="org.eclipse.elk.alg.common.utils",ZSe={207:1},QSe="org.eclipse.elk.core",JSe="Connected Components Compaction",exe="org.eclipse.elk.alg.disco",txe="org.eclipse.elk.alg.disco.graph",nxe="org.eclipse.elk.alg.disco.options",rxe="CompactionStrategy",ixe="org.eclipse.elk.disco.componentCompaction.strategy",axe="org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm",oxe="org.eclipse.elk.disco.debug.discoGraph",sxe="org.eclipse.elk.disco.debug.discoPolys",cxe="componentCompaction",lxe="org.eclipse.elk.disco",uxe="org.eclipse.elk.spacing.componentComponent",fxe="org.eclipse.elk.edge.thickness",hxe="org.eclipse.elk.aspectRatio",dxe="org.eclipse.elk.padding",pxe="org.eclipse.elk.alg.disco.transform",gxe=1.5707963267948966,bxe=17976931348623157e292,mxe={3:1,4:1,5:1,192:1},wxe={3:1,6:1,4:1,5:1,105:1,125:1},vxe="org.eclipse.elk.alg.force",yxe="ComponentsProcessor",Exe="ComponentsProcessor/1",_xe="org.eclipse.elk.alg.force.graph",Sxe="Component Layout",xxe="org.eclipse.elk.alg.force.model",Txe="org.eclipse.elk.force.model",Axe="org.eclipse.elk.force.iterations",kxe="org.eclipse.elk.force.repulsivePower",Cxe="org.eclipse.elk.force.temperature",Mxe=.001,Ixe="org.eclipse.elk.force.repulsion",Oxe="org.eclipse.elk.alg.force.options",Nxe=1.600000023841858,Rxe="org.eclipse.elk.force",Pxe="org.eclipse.elk.priority",Lxe="org.eclipse.elk.spacing.nodeNode",Dxe="org.eclipse.elk.spacing.edgeLabel",Fxe="org.eclipse.elk.randomSeed",Uxe="org.eclipse.elk.separateConnectedComponents",jxe="org.eclipse.elk.interactive",Bxe="org.eclipse.elk.portConstraints",zxe="org.eclipse.elk.edgeLabels.inline",$xe="origin",Hxe="random",Gxe="boundingBox.upLeft",Vxe="boundingBox.lowRight",Wxe="org.eclipse.elk.stress.fixed",qxe="org.eclipse.elk.stress.desiredEdgeLength",Xxe="org.eclipse.elk.stress.dimension",Yxe="org.eclipse.elk.stress.epsilon",Kxe="org.eclipse.elk.stress.iterationLimit",Zxe="org.eclipse.elk.stress",Qxe="ELK Stress",Jxe="org.eclipse.elk.alg.force.stress",eTe="Layered layout",tTe="org.eclipse.elk.alg.layered",nTe="org.eclipse.elk.alg.layered.compaction.components",rTe="org.eclipse.elk.alg.layered.compaction.oned",iTe="org.eclipse.elk.alg.layered.compaction.oned.algs",aTe="org.eclipse.elk.alg.layered.compaction.recthull",oTe="org.eclipse.elk.alg.layered.components",sTe={3:1,6:1,4:1,9:1,5:1,120:1},cTe={3:1,6:1,4:1,5:1,153:1,105:1,125:1},lTe="org.eclipse.elk.alg.layered.compound",uTe={52:1},fTe="org.eclipse.elk.alg.layered.graph",hTe=" -> ",dTe="Not supported by LGraph",pTe={3:1,6:1,4:1,5:1,468:1,153:1,105:1,125:1},gTe={3:1,6:1,4:1,5:1,153:1,213:1,223:1,105:1,125:1},bTe={3:1,6:1,4:1,5:1,153:1,1915:1,223:1,105:1,125:1},mTe="([{\"' \t\r\n",wTe=")]}\"' \t\r\n",vTe="The given string contains parts that cannot be parsed as numbers.",yTe="org.eclipse.elk.core.math",ETe={3:1,4:1,141:1,205:1,409:1},_Te={3:1,4:1,115:1,205:1,409:1},STe="org.eclipse.elk.layered",xTe="org.eclipse.elk.alg.layered.graph.transform",TTe="ElkGraphImporter",ATe="ElkGraphImporter/lambda$0$Type",kTe="ElkGraphImporter/lambda$1$Type",CTe="ElkGraphImporter/lambda$2$Type",MTe="ElkGraphImporter/lambda$4$Type",ITe="Node margin calculation",OTe="org.eclipse.elk.alg.layered.intermediate",NTe="ONE_SIDED_GREEDY_SWITCH",RTe="TWO_SIDED_GREEDY_SWITCH",PTe="No implementation is available for the layout processor ",LTe="IntermediateProcessorStrategy",DTe="Node '",FTe="NONE",UTe="FIRST_SEPARATE",jTe="LAST_SEPARATE",BTe="Odd port side processing",zTe="org.eclipse.elk.alg.layered.intermediate.compaction",$Te="org.eclipse.elk.alg.layered.intermediate.greedyswitch",HTe="org.eclipse.elk.alg.layered.p3order.counting",GTe={235:1},VTe="org.eclipse.elk.alg.layered.intermediate.loops",WTe="org.eclipse.elk.alg.layered.intermediate.loops.ordering",qTe="org.eclipse.elk.alg.layered.intermediate.loops.routing",XTe="org.eclipse.elk.alg.layered.intermediate.preserveorder",YTe="org.eclipse.elk.alg.layered.intermediate.wrapping",KTe="org.eclipse.elk.alg.layered.options",ZTe="INTERACTIVE",QTe="DEPTH_FIRST",JTe="EDGE_LENGTH",eAe="SELF_LOOPS",tAe="org.eclipse.elk.layered.considerModelOrder",nAe="org.eclipse.elk.layered.directionCongruency",rAe="org.eclipse.elk.layered.feedbackEdges",iAe="org.eclipse.elk.layered.interactiveReferencePoint",aAe="org.eclipse.elk.layered.mergeEdges",oAe="org.eclipse.elk.layered.mergeHierarchyEdges",sAe="org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides",cAe="org.eclipse.elk.layered.portSortingStrategy",lAe="org.eclipse.elk.layered.thoroughness",uAe="org.eclipse.elk.layered.unnecessaryBendpoints",fAe="org.eclipse.elk.layered.cycleBreaking.strategy",hAe="org.eclipse.elk.layered.layering.strategy",dAe="org.eclipse.elk.layered.layering.layerConstraint",pAe="org.eclipse.elk.layered.layering.layerChoiceConstraint",gAe="org.eclipse.elk.layered.layering.layerId",bAe="org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth",mAe="org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor",wAe="org.eclipse.elk.layered.layering.nodePromotion.strategy",vAe="org.eclipse.elk.layered.layering.nodePromotion.maxIterations",yAe="org.eclipse.elk.layered.layering.coffmanGraham.layerBound",EAe="org.eclipse.elk.layered.crossingMinimization.strategy",_Ae="org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness",SAe="org.eclipse.elk.layered.crossingMinimization.semiInteractive",xAe="org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint",TAe="org.eclipse.elk.layered.crossingMinimization.positionId",AAe="org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold",kAe="org.eclipse.elk.layered.crossingMinimization.greedySwitch.type",CAe="org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type",MAe="org.eclipse.elk.layered.nodePlacement.strategy",IAe="org.eclipse.elk.layered.nodePlacement.favorStraightEdges",OAe="org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening",NAe="org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment",RAe="org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening",PAe="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility",LAe="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default",DAe="org.eclipse.elk.layered.edgeRouting.selfLoopDistribution",FAe="org.eclipse.elk.layered.edgeRouting.selfLoopOrdering",UAe="org.eclipse.elk.layered.edgeRouting.splines.mode",jAe="org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor",BAe="org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth",zAe="org.eclipse.elk.layered.spacing.baseValue",$Ae="org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers",HAe="org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers",GAe="org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers",VAe="org.eclipse.elk.layered.priority.direction",WAe="org.eclipse.elk.layered.priority.shortness",qAe="org.eclipse.elk.layered.priority.straightness",XAe="org.eclipse.elk.layered.compaction.connectedComponents",YAe="org.eclipse.elk.layered.compaction.postCompaction.strategy",KAe="org.eclipse.elk.layered.compaction.postCompaction.constraints",ZAe="org.eclipse.elk.layered.highDegreeNodes.treatment",QAe="org.eclipse.elk.layered.highDegreeNodes.threshold",JAe="org.eclipse.elk.layered.highDegreeNodes.treeHeight",eke="org.eclipse.elk.layered.wrapping.strategy",tke="org.eclipse.elk.layered.wrapping.additionalEdgeSpacing",nke="org.eclipse.elk.layered.wrapping.correctionFactor",rke="org.eclipse.elk.layered.wrapping.cutting.strategy",ike="org.eclipse.elk.layered.wrapping.cutting.cuts",ake="org.eclipse.elk.layered.wrapping.cutting.msd.freedom",oke="org.eclipse.elk.layered.wrapping.validify.strategy",ske="org.eclipse.elk.layered.wrapping.validify.forbiddenIndices",cke="org.eclipse.elk.layered.wrapping.multiEdge.improveCuts",lke="org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty",uke="org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges",fke="org.eclipse.elk.layered.edgeLabels.sideSelection",hke="org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy",dke="layering",pke="layering.minWidth",gke="layering.nodePromotion",bke="crossingMinimization",mke="org.eclipse.elk.hierarchyHandling",wke="crossingMinimization.greedySwitch",vke="nodePlacement",yke="nodePlacement.bk",Eke="edgeRouting",_ke="org.eclipse.elk.edgeRouting",Ske="spacing",xke="priority",Tke="compaction",Ake="compaction.postCompaction",kke="Specifies whether and how post-process compaction is applied.",Cke="highDegreeNodes",Mke="wrapping",Ike="wrapping.cutting",Oke="wrapping.validify",Nke="wrapping.multiEdge",Rke="edgeLabels",Pke="org.eclipse.elk.spacing.commentComment",Lke="org.eclipse.elk.spacing.commentNode",Dke="org.eclipse.elk.spacing.edgeEdge",Fke="org.eclipse.elk.spacing.edgeNode",Uke="org.eclipse.elk.spacing.labelLabel",jke="org.eclipse.elk.spacing.labelPort",Bke="org.eclipse.elk.spacing.labelNode",zke="org.eclipse.elk.spacing.nodeSelfLoop",$ke="org.eclipse.elk.spacing.portPort",Hke="org.eclipse.elk.spacing.individual",Gke="org.eclipse.elk.port.borderOffset",Vke="org.eclipse.elk.noLayout",Wke="org.eclipse.elk.port.side",qke="org.eclipse.elk.debugMode",Xke="org.eclipse.elk.alignment",Yke="org.eclipse.elk.insideSelfLoops.activate",Kke="org.eclipse.elk.insideSelfLoops.yo",Zke="org.eclipse.elk.nodeSize.constraints",Qke="org.eclipse.elk.nodeSize.options",Jke="org.eclipse.elk.direction",eCe="org.eclipse.elk.nodeLabels.placement",tCe="org.eclipse.elk.nodeLabels.padding",nCe="org.eclipse.elk.portLabels.placement",rCe="org.eclipse.elk.portLabels.nextToPortIfPossible",iCe="org.eclipse.elk.portLabels.treatAsGroup",aCe="org.eclipse.elk.portAlignment.default",oCe="org.eclipse.elk.portAlignment.north",sCe="org.eclipse.elk.portAlignment.south",cCe="org.eclipse.elk.portAlignment.west",lCe="org.eclipse.elk.portAlignment.east",uCe="org.eclipse.elk.contentAlignment",fCe="org.eclipse.elk.nodeSize.minimum",hCe="org.eclipse.elk.junctionPoints",dCe="org.eclipse.elk.edgeLabels.placement",pCe="org.eclipse.elk.port.index",gCe="org.eclipse.elk.commentBox",bCe="org.eclipse.elk.hypernode",mCe="org.eclipse.elk.port.anchor",wCe="org.eclipse.elk.partitioning.activate",vCe="org.eclipse.elk.partitioning.partition",yCe="org.eclipse.elk.position",ECe="org.eclipse.elk.margins",_Ce="org.eclipse.elk.spacing.portsSurrounding",SCe="org.eclipse.elk.interactiveLayout",xCe="org.eclipse.elk.core.util",TCe={3:1,4:1,5:1,584:1},ACe="NETWORK_SIMPLEX",kCe={126:1,52:1},CCe="org.eclipse.elk.alg.layered.p1cycles",MCe="org.eclipse.elk.alg.layered.p2layers",ICe={451:1,235:1},OCe={811:1,3:1,4:1},NCe="org.eclipse.elk.alg.layered.p3order",RCe="org.eclipse.elk.alg.layered.p4nodes",PCe={3:1,4:1,5:1,819:1},LCe=1e-5,DCe="org.eclipse.elk.alg.layered.p4nodes.bk",FCe="org.eclipse.elk.alg.layered.p5edges",UCe="org.eclipse.elk.alg.layered.p5edges.orthogonal",jCe="org.eclipse.elk.alg.layered.p5edges.orthogonal.direction",BCe=1e-6,zCe="org.eclipse.elk.alg.layered.p5edges.splines",$Ce=.09999999999999998,HCe=1e-8,GCe=4.71238898038469,VCe=3.141592653589793,WCe="org.eclipse.elk.alg.mrtree",qCe="org.eclipse.elk.alg.mrtree.graph",XCe="org.eclipse.elk.alg.mrtree.intermediate",YCe="Set neighbors in level",KCe="DESCENDANTS",ZCe="org.eclipse.elk.mrtree.weighting",QCe="org.eclipse.elk.mrtree.searchOrder",JCe="org.eclipse.elk.alg.mrtree.options",eMe="org.eclipse.elk.mrtree",tMe="org.eclipse.elk.tree",nMe="org.eclipse.elk.alg.radial",rMe=6.283185307179586,iMe=5e-324,aMe="org.eclipse.elk.alg.radial.intermediate",oMe="org.eclipse.elk.alg.radial.intermediate.compaction",sMe={3:1,4:1,5:1,105:1},cMe="org.eclipse.elk.alg.radial.intermediate.optimization",lMe="No implementation is available for the layout option ",uMe="org.eclipse.elk.alg.radial.options",fMe="org.eclipse.elk.radial.orderId",hMe="org.eclipse.elk.radial.radius",dMe="org.eclipse.elk.radial.compactor",pMe="org.eclipse.elk.radial.compactionStepSize",gMe="org.eclipse.elk.radial.sorter",bMe="org.eclipse.elk.radial.wedgeCriteria",mMe="org.eclipse.elk.radial.optimizationCriteria",wMe="org.eclipse.elk.radial",vMe="org.eclipse.elk.alg.radial.p1position.wedge",yMe="org.eclipse.elk.alg.radial.sorting",EMe=5.497787143782138,_Me=3.9269908169872414,SMe=2.356194490192345,xMe="org.eclipse.elk.alg.rectpacking",TMe="org.eclipse.elk.alg.rectpacking.firstiteration",AMe="org.eclipse.elk.alg.rectpacking.options",kMe="org.eclipse.elk.rectpacking.optimizationGoal",CMe="org.eclipse.elk.rectpacking.lastPlaceShift",MMe="org.eclipse.elk.rectpacking.currentPosition",IMe="org.eclipse.elk.rectpacking.desiredPosition",OMe="org.eclipse.elk.rectpacking.onlyFirstIteration",NMe="org.eclipse.elk.rectpacking.rowCompaction",RMe="org.eclipse.elk.rectpacking.expandToAspectRatio",PMe="org.eclipse.elk.rectpacking.targetWidth",LMe="org.eclipse.elk.expandNodes",DMe="org.eclipse.elk.rectpacking",FMe="org.eclipse.elk.alg.rectpacking.util",UMe="No implementation available for ",jMe="org.eclipse.elk.alg.spore",BMe="org.eclipse.elk.alg.spore.options",zMe="org.eclipse.elk.sporeCompaction",$Me="org.eclipse.elk.underlyingLayoutAlgorithm",HMe="org.eclipse.elk.processingOrder.treeConstruction",GMe="org.eclipse.elk.processingOrder.spanningTreeCostFunction",VMe="org.eclipse.elk.processingOrder.preferredRoot",WMe="org.eclipse.elk.processingOrder.rootSelection",qMe="org.eclipse.elk.structure.structureExtractionStrategy",XMe="org.eclipse.elk.compaction.compactionStrategy",YMe="org.eclipse.elk.compaction.orthogonal",KMe="org.eclipse.elk.overlapRemoval.maxIterations",ZMe="org.eclipse.elk.overlapRemoval.runScanline",QMe="processingOrder",JMe="overlapRemoval",eIe="org.eclipse.elk.sporeOverlap",tIe="org.eclipse.elk.alg.spore.p1structure",nIe="org.eclipse.elk.alg.spore.p2processingorder",rIe="org.eclipse.elk.alg.spore.p3execution",iIe="Invalid index: ",aIe="org.eclipse.elk.core.alg",oIe={329:1},sIe={287:1},cIe="Make sure it's type is registered with the ",lIe=" utility class.",uIe="true",fIe="false",hIe="Couldn't clone property '",dIe=.05,pIe="org.eclipse.elk.core.options",gIe=1.2999999523162842,bIe="org.eclipse.elk.box",mIe="org.eclipse.elk.box.packingMode",wIe="org.eclipse.elk.algorithm",vIe="org.eclipse.elk.resolvedAlgorithm",yIe="org.eclipse.elk.bendPoints",EIe="org.eclipse.elk.labelManager",_Ie="org.eclipse.elk.scaleFactor",SIe="org.eclipse.elk.animate",xIe="org.eclipse.elk.animTimeFactor",TIe="org.eclipse.elk.layoutAncestors",AIe="org.eclipse.elk.maxAnimTime",kIe="org.eclipse.elk.minAnimTime",CIe="org.eclipse.elk.progressBar",MIe="org.eclipse.elk.validateGraph",IIe="org.eclipse.elk.validateOptions",OIe="org.eclipse.elk.zoomToFit",NIe="org.eclipse.elk.nodeSize.fixedGraphSize",RIe="org.eclipse.elk.font.name",PIe="org.eclipse.elk.font.size",LIe="org.eclipse.elk.edge.type",DIe="partitioning",FIe="nodeLabels",UIe="portAlignment",jIe="nodeSize",BIe="port",zIe="portLabels",$Ie="insideSelfLoops",HIe="org.eclipse.elk.fixed",GIe="org.eclipse.elk.random",VIe="port must have a parent node to calculate the port side",WIe="The edge needs to have exactly one edge section. Found: ",qIe="org.eclipse.elk.core.util.adapters",XIe="org.eclipse.emf.ecore",YIe="org.eclipse.elk.graph",KIe="EMapPropertyHolder",ZIe="ElkBendPoint",QIe="ElkGraphElement",JIe="ElkConnectableShape",eOe="ElkEdge",tOe="ElkEdgeSection",nOe="EModelElement",rOe="ENamedElement",iOe="ElkLabel",aOe="ElkNode",oOe="ElkPort",sOe={91:1,89:1},cOe="org.eclipse.emf.common.notify.impl",lOe="The feature '",uOe="' is not a valid changeable feature",fOe="Expecting null",hOe="' is not a valid feature",dOe="The feature ID",pOe=" is not a valid feature ID",gOe=32768,bOe={104:1,91:1,89:1,55:1,48:1,96:1},mOe="org.eclipse.emf.ecore.impl",wOe="org.eclipse.elk.graph.impl",vOe="Recursive containment not allowed for ",yOe="The datatype '",EOe="' is not a valid classifier",_Oe="The value '",SOe={190:1,3:1,4:1},xOe="The class '",TOe="http://www.eclipse.org/elk/ElkGraph",AOe="property",kOe="value",COe="source",MOe="properties",IOe="identifier",OOe="height",NOe="width",ROe="parent",POe="text",LOe="children",DOe="hierarchical",FOe="sources",UOe="targets",jOe="sections",BOe="bendPoints",zOe="outgoingShape",$Oe="incomingShape",HOe="outgoingSections",GOe="incomingSections",VOe="org.eclipse.emf.common.util",WOe="Severe implementation error in the Json to ElkGraph importer.",qOe="id",XOe="org.eclipse.elk.graph.json",YOe="Unhandled parameter types: ",KOe="startPoint",ZOe="An edge must have at least one source and one target (edge id: '",QOe="').",JOe="Referenced edge section does not exist: ",eNe=" (edge id: '",tNe="target",nNe="sourcePoint",rNe="targetPoint",iNe="group",aNe="name",oNe="connectableShape cannot be null",sNe="Passed edge is not 'simple'.",cNe="The 'no duplicates' constraint is violated",lNe="targetIndex=",uNe=", size=",fNe="sourceIndex=",hNe={3:1,4:1,19:1,28:1,51:1,15:1,14:1,53:1,66:1,60:1,57:1},dNe={3:1,4:1,19:1,28:1,51:1,15:1,49:1,14:1,53:1,66:1,60:1,57:1,579:1},pNe="org.eclipse.elk.graph.util",gNe="logging",bNe="measureExecutionTime",mNe="parser.parse.1",wNe="parser.parse.2",vNe="parser.next.1",yNe="parser.next.2",ENe="parser.next.3",_Ne="parser.next.4",SNe="parser.factor.1",xNe="parser.factor.2",TNe="parser.factor.3",ANe="parser.factor.4",kNe="parser.factor.5",CNe="parser.factor.6",MNe="parser.atom.1",INe="parser.atom.2",ONe="parser.atom.3",NNe="parser.atom.4",RNe="parser.atom.5",PNe="parser.cc.1",LNe="parser.cc.2",DNe="parser.cc.3",FNe="parser.cc.5",UNe="parser.cc.6",jNe="parser.cc.7",BNe="parser.cc.8",zNe="parser.ope.1",$Ne="parser.ope.2",HNe="parser.ope.3",GNe="parser.descape.1",VNe="parser.descape.2",WNe="parser.descape.3",qNe="parser.descape.4",XNe="parser.descape.5",YNe="parser.process.1",KNe="parser.quantifier.1",ZNe="parser.quantifier.2",QNe="parser.quantifier.3",JNe="parser.quantifier.4",eRe="parser.quantifier.5",tRe="org.eclipse.emf.common.notify",nRe={410:1,660:1},rRe={3:1,4:1,19:1,28:1,51:1,15:1,14:1,66:1,57:1},iRe={363:1,142:1},aRe="index=",oRe={3:1,4:1,5:1,124:1},sRe={3:1,4:1,19:1,28:1,51:1,15:1,14:1,53:1,66:1,57:1},cRe={3:1,6:1,4:1,5:1,192:1},lRe={3:1,4:1,5:1,164:1,364:1},uRe=1024,fRe=";/?:@&=+$,",hRe="invalid authority: ",dRe="EAnnotation",pRe="ETypedElement",gRe="EStructuralFeature",bRe="EAttribute",mRe="EClassifier",wRe="EEnumLiteral",vRe="EGenericType",yRe="EOperation",ERe="EParameter",_Re="EReference",SRe="ETypeParameter",xRe="org.eclipse.emf.ecore.util",TRe={76:1},ARe={3:1,19:1,15:1,14:1,57:1,580:1,76:1,67:1,95:1},kRe="org.eclipse.emf.ecore.util.FeatureMap$Entry",CRe=8192,MRe=2048,IRe="byte",ORe="char",NRe="double",RRe="float",PRe="int",LRe="long",DRe="short",FRe="java.lang.Object",URe={3:1,4:1,5:1,246:1},jRe={3:1,4:1,5:1,661:1},BRe={3:1,4:1,19:1,28:1,51:1,15:1,14:1,53:1,66:1,60:1,57:1,67:1},zRe={3:1,4:1,19:1,28:1,51:1,15:1,14:1,53:1,66:1,60:1,57:1,76:1,67:1,95:1},$Re="mixed",HRe="http:///org/eclipse/emf/ecore/util/ExtendedMetaData",GRe="kind",VRe={3:1,4:1,5:1,662:1},WRe={3:1,4:1,19:1,28:1,51:1,15:1,14:1,66:1,57:1,76:1,67:1,95:1},qRe={19:1,28:1,51:1,15:1,14:1,57:1,67:1},XRe={49:1,123:1,277:1},YRe={71:1,330:1},KRe="The value of type '",ZRe="' must be of type '",QRe=1287,JRe="http://www.eclipse.org/emf/2002/Ecore",ePe=-32768,tPe="constraints",nPe="baseType",rPe="getEStructuralFeature",iPe="getFeatureID",aPe="feature",oPe="getOperationID",sPe="operation",cPe="defaultValue",lPe="eTypeParameters",uPe="isInstance",fPe="getEEnumLiteral",hPe="eContainingClass",dPe={54:1},pPe={3:1,4:1,5:1,118:1},gPe="org.eclipse.emf.ecore.resource",bPe={91:1,89:1,582:1,1907:1},mPe="org.eclipse.emf.ecore.resource.impl",wPe="unspecified",vPe="simple",yPe="attribute",EPe="attributeWildcard",_Pe="element",SPe="elementWildcard",xPe="collapse",TPe="itemType",APe="namespace",kPe="##targetNamespace",CPe="whiteSpace",MPe="wildcards",IPe="http://www.eclipse.org/emf/2003/XMLType",OPe="##any",NPe="uninitialized",RPe="The multiplicity constraint is violated",PPe="org.eclipse.emf.ecore.xml.type",LPe="ProcessingInstruction",DPe="SimpleAnyType",FPe="XMLTypeDocumentRoot",UPe="org.eclipse.emf.ecore.xml.type.impl",jPe="INF",BPe="processing",zPe="ENTITIES_._base",$Pe="minLength",HPe="ENTITY",GPe="NCName",VPe="IDREFS_._base",WPe="integer",qPe="token",XPe="pattern",YPe="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*",KPe="\\i\\c*",ZPe="[\\i-[:]][\\c-[:]]*",QPe="nonPositiveInteger",JPe="maxInclusive",eLe="NMTOKEN",tLe="NMTOKENS_._base",nLe="nonNegativeInteger",rLe="minInclusive",iLe="normalizedString",aLe="unsignedByte",oLe="unsignedInt",sLe="18446744073709551615",cLe="unsignedShort",lLe="processingInstruction",uLe="org.eclipse.emf.ecore.xml.type.internal",fLe=1114111,hLe="Internal Error: shorthands: \\u",dLe="xml:isDigit",pLe="xml:isWord",gLe="xml:isSpace",bLe="xml:isNameChar",mLe="xml:isInitialNameChar",wLe="09٠٩۰۹०९০৯੦੯૦૯୦୯௧௯౦౯೦೯൦൯๐๙໐໙༠༩",vLe="AZazÀÖØöøıĴľŁňŊžƀǃǍǰǴǵǺȗɐʨʻˁΆΆΈΊΌΌΎΡΣώϐϖϚϚϜϜϞϞϠϠϢϳЁЌЎяёќўҁҐӄӇӈӋӌӐӫӮӵӸӹԱՖՙՙաֆאתװײءغفيٱڷںھۀێېۓەەۥۦअहऽऽक़ॡঅঌএঐওনপরললশহড়ঢ়য়ৡৰৱਅਊਏਐਓਨਪਰਲਲ਼ਵਸ਼ਸਹਖ਼ੜਫ਼ਫ਼ੲੴઅઋઍઍએઑઓનપરલળવહઽઽૠૠଅଌଏଐଓନପରଲଳଶହଽଽଡ଼ଢ଼ୟୡஅஊஎஐஒகஙசஜஜஞடணதநபமவஷஹఅఌఎఐఒనపళవహౠౡಅಌಎಐಒನಪಳವಹೞೞೠೡഅഌഎഐഒനപഹൠൡกฮะะาำเๅກຂຄຄງຈຊຊຍຍດທນຟມຣລລວວສຫອຮະະາຳຽຽເໄཀཇཉཀྵႠჅაჶᄀᄀᄂᄃᄅᄇᄉᄉᄋᄌᄎᄒᄼᄼᄾᄾᅀᅀᅌᅌᅎᅎᅐᅐᅔᅕᅙᅙᅟᅡᅣᅣᅥᅥᅧᅧᅩᅩᅭᅮᅲᅳᅵᅵᆞᆞᆨᆨᆫᆫᆮᆯᆷᆸᆺᆺᆼᇂᇫᇫᇰᇰᇹᇹḀẛẠỹἀἕἘἝἠὅὈὍὐὗὙὙὛὛὝὝὟώᾀᾴᾶᾼιιῂῄῆῌῐΐῖΊῠῬῲῴῶῼΩΩKÅ℮℮ↀↂ〇〇〡〩ぁゔァヺㄅㄬ一龥가힣",yLe="Private Use",ELe="ASSIGNED",_Le="\0€ÿĀſƀɏɐʯʰ˿̀ͯͰϿЀӿ԰֏֐׿؀ۿ܀ݏހ޿ऀॿঀ৿਀੿઀૿଀୿஀௿ఀ౿ಀ೿ഀൿ඀෿฀๿຀໿ༀ࿿က႟Ⴀჿᄀᇿሀ፿Ꭰ᏿᐀ᙿ ᚟ᚠ᛿ក៿᠀᢯Ḁỿἀ῿ ⁰₟₠⃏⃐⃿℀⅏⅐↏←⇿∀⋿⌀⏿␀␿⑀⑟①⓿─╿▀▟■◿☀⛿✀➿⠀⣿⺀⻿⼀⿟⿰⿿ 〿぀ゟ゠ヿ㄀ㄯ㄰㆏㆐㆟ㆠㆿ㈀㋿㌀㏿㐀䶵一鿿ꀀ꒏꒐꓏가힣豈﫿ffﭏﭐ﷿︠︯︰﹏﹐﹯ﹰ﻾\ufeff\ufeff＀￯",SLe="UNASSIGNED",xLe={3:1,117:1},TLe="org.eclipse.emf.ecore.xml.type.util",ALe={3:1,4:1,5:1,365:1},kLe="org.eclipse.xtext.xbase.lib",CLe="Cannot add elements to a Range",MLe="Cannot set elements in a Range",ILe="Cannot remove elements from a Range",OLe="locale",NLe="default",RLe="user.agent";r.goog=r.goog||{},r.goog.global=r.goog.global||r,Hve={},!Array.isArray&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!Date.now&&(Date.now=function(){return(new Date).getTime()}),Vle(1,null,{},a),$ve.Fb=function(e){return uC(this,e)},$ve.Gb=function(){return this.bm},$ve.Hb=function(){return eO(this)},$ve.Ib=function(){return LE(D4(this))+"@"+(L4(this)>>>0).toString(16)},$ve.equals=function(e){return this.Fb(e)},$ve.hashCode=function(){return this.Hb()},$ve.toString=function(){return this.Ib()},Vle(289,1,{289:1,1995:1},Z3),$ve.le=function(e){var t;return(t=new Z3).i=4,t.c=e>1?VH(this,e-1):this,t},$ve.me=function(){return CN(this),this.b},$ve.ne=function(){return LE(this)},$ve.oe=function(){return CN(this),this.k},$ve.pe=function(){return 0!=(4&this.i)},$ve.qe=function(){return 0!=(1&this.i)},$ve.Ib=function(){return zQ(this)},$ve.i=0;var PLe,LLe=$j(eye,"Object",1),DLe=$j(eye,"Class",289);Vle(1967,1,tye),$j(nye,"Optional",1967),Vle(1143,1967,tye,s),$ve.Fb=function(e){return e===this},$ve.Hb=function(){return 2040732332},$ve.Ib=function(){return"Optional.absent()"},$ve.Jb=function(e){return cj(e),Bw(),PLe},$j(nye,"Absent",1143),Vle(620,1,{},ty),$j(nye,"Joiner",620);var FLe=TD(nye,"Predicate");Vle(573,1,{169:1,573:1,3:1,45:1},Rf),$ve.Mb=function(e){return v4(this,e)},$ve.Lb=function(e){return v4(this,e)},$ve.Fb=function(e){var t;return!!RM(e,573)&&(t=xL(e,573),aue(this.a,t.a))},$ve.Hb=function(){return _4(this.a)+306654252},$ve.Ib=function(){return function(e){var t,n,r,i;for(t=Wj(Bk(new zI("Predicates."),"and"),40),n=!0,i=new Dh(e);i.b0},$ve.Pb=function(){if(this.c>=this.d)throw Jb(new mm);return this.Xb(this.c++)},$ve.Tb=function(){return this.c},$ve.Ub=function(){if(this.c<=0)throw Jb(new mm);return this.Xb(--this.c)},$ve.Vb=function(){return this.c-1},$ve.c=0,$ve.d=0,$j(uye,"AbstractIndexedListIterator",381),Vle(679,197,lye),$ve.Ob=function(){return C1(this)},$ve.Pb=function(){return VK(this)},$ve.e=1,$j(uye,"AbstractIterator",679),Vle(1958,1,{222:1}),$ve.Zb=function(){return this.f||(this.f=this.ac())},$ve.Fb=function(e){return V4(this,e)},$ve.Hb=function(){return L4(this.Zb())},$ve.dc=function(){return 0==this.gc()},$ve.ec=function(){return YF(this)},$ve.Ib=function(){return K8(this.Zb())},$j(uye,"AbstractMultimap",1958),Vle(713,1958,hye),$ve.$b=function(){u1(this)},$ve._b=function(e){return this.c._b(e)},$ve.ac=function(){return new a_(this,this.c)},$ve.ic=function(e){return this.hc()},$ve.bc=function(){return new mI(this,this.c)},$ve.jc=function(){return this.kc(this.hc())},$ve.cc=function(e){return MX(this,e)},$ve.fc=function(e){return Z5(this,e)},$ve.gc=function(){return this.d},$ve.kc=function(e){return i$(),new Qh(e)},$ve.lc=function(){return new AQ(this)},$ve.mc=function(){return wae(this.c.Ac().Lc(),new c,64,this.d)},$ve.nc=function(e,t){return new QX(this,e,t,null)},$ve.d=0,$j(uye,"AbstractMapBasedMultimap",713),Vle(1601,713,hye),$ve.hc=function(){return new dY(this.a)},$ve.jc=function(){return i$(),i$(),dFe},$ve.cc=function(e){return xL(MX(this,e),14)},$ve.fc=function(e){return xL(Z5(this,e),14)},$ve.Zb=function(){return this.f||(this.f=new a_(this,this.c))},$ve.Fb=function(e){return V4(this,e)},$ve.oc=function(e){return xL(MX(this,e),14)},$ve.pc=function(e){return xL(Z5(this,e),14)},$ve.kc=function(e){return g$(xL(e,14))},$ve.nc=function(e,t){return wW(this,e,xL(t,14),null)},$j(uye,"AbstractListMultimap",1601),Vle(1079,1,dye),$ve.Nb=function(e){NU(this,e)},$ve.Ob=function(){return this.c.Ob()||this.e.Ob()},$ve.Pb=function(){var e;return this.e.Ob()||(e=xL(this.c.Pb(),43),this.b=e.ad(),this.a=xL(e.bd(),15),this.e=this.a.Ic()),this.qc(this.b,this.e.Pb())},$ve.Qb=function(){this.e.Qb(),this.a.dc()&&this.c.Qb(),--this.d.d},$j(uye,"AbstractMapBasedMultimap/Itr",1079),Vle(1080,1079,dye,AQ),$ve.qc=function(e,t){return t},$j(uye,"AbstractMapBasedMultimap/1",1080),Vle(1081,1,{},c),$ve.Kb=function(e){return xL(e,15).Lc()},$j(uye,"AbstractMapBasedMultimap/1methodref$spliterator$Type",1081);var ULe=TD(pye,"Map");Vle(1949,1,gye),$ve.uc=function(e){K0(this,e)},$ve.wc=function(e,t,n){return I8(this,e,t,n)},$ve.$b=function(){this.tc().$b()},$ve.rc=function(e){return lne(this,e)},$ve._b=function(e){return!!Pie(this,e,!1)},$ve.sc=function(e){var t,n;for(t=this.tc().Ic();t.Ob();)if(n=xL(t.Pb(),43).bd(),Ak(e)===Ak(n)||null!=e&&C6(e,n))return!0;return!1},$ve.Fb=function(e){var t,n,r;if(e===this)return!0;if(!RM(e,84))return!1;if(r=xL(e,84),this.gc()!=r.gc())return!1;for(n=r.tc().Ic();n.Ob();)if(t=xL(n.Pb(),43),!this.rc(t))return!1;return!0},$ve.vc=function(e){return Tk(Pie(this,e,!1))},$ve.Hb=function(){return I3(this.tc())},$ve.dc=function(){return 0==this.gc()},$ve.ec=function(){return new Uh(this)},$ve.xc=function(e,t){throw Jb(new Fv("Put not supported on this map"))},$ve.yc=function(e){$0(this,e)},$ve.zc=function(e){return Tk(Pie(this,e,!0))},$ve.gc=function(){return this.tc().gc()},$ve.Ib=function(){return Wie(this)},$ve.Ac=function(){return new Vh(this)},$j(pye,"AbstractMap",1949),Vle(1959,1949,gye),$ve.bc=function(){return new A_(this)},$ve.tc=function(){return this.f||(this.f=this.Bc())},$ve.ec=function(){return this.g||(this.g=this.bc())},$ve.Ac=function(){return this.i||(this.i=new k_(this))},$j(uye,"Maps/ViewCachingAbstractMap",1959),Vle(316,1959,gye,a_),$ve.vc=function(e){return function(e,t){var n,r;return(n=xL(_5(e.d,t),15))?(r=t,e.e.nc(r,n)):null}(this,e)},$ve.zc=function(e){return function(e,t){var n,r;return(n=xL(e.d.zc(t),15))?((r=e.e.hc()).Ec(n),e.e.d-=n.gc(),n.$b(),r):null}(this,e)},$ve.$b=function(){this.d==this.e.c?this.e.$b():OD(new ID(this))},$ve._b=function(e){return q5(this.d,e)},$ve.Cc=function(){return new Lf(this)},$ve.Bc=function(){return this.Cc()},$ve.Fb=function(e){return this===e||C6(this.d,e)},$ve.Hb=function(){return L4(this.d)},$ve.ec=function(){return this.e.ec()},$ve.gc=function(){return this.d.gc()},$ve.Ib=function(){return K8(this.d)},$j(uye,"AbstractMapBasedMultimap/AsMap",316);var jLe=TD(eye,"Iterable");Vle(28,1,bye),$ve.Hc=function(e){Jq(this,e)},$ve.Jc=function(){return this.Mc()},$ve.Lc=function(){return new LG(this,0)},$ve.Mc=function(){return new JD(null,this.Lc())},$ve.Dc=function(e){throw Jb(new Fv("Add not supported on this collection"))},$ve.Ec=function(e){return w0(this,e)},$ve.$b=function(){Tz(this)},$ve.Fc=function(e){return A9(this,e,!1)},$ve.Gc=function(e){return o3(this,e)},$ve.dc=function(){return 0==this.gc()},$ve.Kc=function(e){return A9(this,e,!0)},$ve.Nc=function(){return nU(this)},$ve.Oc=function(e){return cne(this,e)},$ve.Ib=function(){return Yae(this)},$j(pye,"AbstractCollection",28);var BLe=TD(pye,"Set");Vle(mye,28,wye),$ve.Lc=function(){return new LG(this,1)},$ve.Fb=function(e){return F7(this,e)},$ve.Hb=function(){return I3(this)},$j(pye,"AbstractSet",mye),Vle(1939,mye,wye),$j(uye,"Sets/ImprovedAbstractSet",1939),Vle(1940,1939,wye),$ve.$b=function(){this.Pc().$b()},$ve.Fc=function(e){return V9(this,e)},$ve.dc=function(){return this.Pc().dc()},$ve.Kc=function(e){var t;return!!this.Fc(e)&&(t=xL(e,43),this.Pc().ec().Kc(t.ad()))},$ve.gc=function(){return this.Pc().gc()},$j(uye,"Maps/EntrySet",1940),Vle(1077,1940,wye,Lf),$ve.Fc=function(e){return W5(this.a.d.tc(),e)},$ve.Ic=function(){return new ID(this.a)},$ve.Pc=function(){return this.a},$ve.Kc=function(e){var t;return!!W5(this.a.d.tc(),e)&&(t=xL(e,43),function(e,t){var n,r;n=xL(function(e,t){cj(e);try{return e.zc(t)}catch(e){if(RM(e=H2(e),203)||RM(e,173))return null;throw Jb(e)}}(e.c,t),15),n&&(r=n.gc(),n.$b(),e.d-=r)}(this.a.e,t.ad()),!0)},$ve.Lc=function(){return dL(this.a.d.tc().Lc(),new Df(this.a))},$j(uye,"AbstractMapBasedMultimap/AsMap/AsMapEntries",1077),Vle(1078,1,{},Df),$ve.Kb=function(e){return eX(this.a,xL(e,43))},$j(uye,"AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type",1078),Vle(717,1,dye,ID),$ve.Nb=function(e){NU(this,e)},$ve.Pb=function(){var e;return e=xL(this.b.Pb(),43),this.a=xL(e.bd(),15),eX(this.c,e)},$ve.Ob=function(){return this.b.Ob()},$ve.Qb=function(){F0(!!this.a),this.b.Qb(),this.c.e.d-=this.a.gc(),this.a.$b(),this.a=null},$j(uye,"AbstractMapBasedMultimap/AsMap/AsMapIterator",717),Vle(524,1939,wye,A_),$ve.$b=function(){this.b.$b()},$ve.Fc=function(e){return this.b._b(e)},$ve.Hc=function(e){cj(e),this.b.uc(new eh(e))},$ve.dc=function(){return this.b.dc()},$ve.Ic=function(){return new iv(this.b.tc().Ic())},$ve.Kc=function(e){return!!this.b._b(e)&&(this.b.zc(e),!0)},$ve.gc=function(){return this.b.gc()},$j(uye,"Maps/KeySet",524),Vle(315,524,wye,mI),$ve.$b=function(){OD(new i_(this,this.b.tc().Ic()))},$ve.Gc=function(e){return this.b.ec().Gc(e)},$ve.Fb=function(e){return this===e||C6(this.b.ec(),e)},$ve.Hb=function(){return L4(this.b.ec())},$ve.Ic=function(){return new i_(this,this.b.tc().Ic())},$ve.Kc=function(e){var t,n;return n=0,(t=xL(this.b.zc(e),15))&&(n=t.gc(),t.$b(),this.a.d-=n),n>0},$ve.Lc=function(){return this.b.ec().Lc()},$j(uye,"AbstractMapBasedMultimap/KeySet",315),Vle(718,1,dye,i_),$ve.Nb=function(e){NU(this,e)},$ve.Ob=function(){return this.c.Ob()},$ve.Pb=function(){return this.a=xL(this.c.Pb(),43),this.a.ad()},$ve.Qb=function(){var e;F0(!!this.a),e=xL(this.a.bd(),15),this.c.Qb(),this.b.a.d-=e.gc(),e.$b(),this.a=null},$j(uye,"AbstractMapBasedMultimap/KeySet/1",718),Vle(484,316,{84:1,161:1},_N),$ve.bc=function(){return this.Qc()},$ve.ec=function(){return this.Rc()},$ve.Qc=function(){return new n_(this.c,this.Sc())},$ve.Rc=function(){return this.b||(this.b=this.Qc())},$ve.Sc=function(){return xL(this.d,161)},$j(uye,"AbstractMapBasedMultimap/SortedAsMap",484),Vle(536,484,vye,SN),$ve.bc=function(){return new r_(this.a,xL(xL(this.d,161),171))},$ve.Qc=function(){return new r_(this.a,xL(xL(this.d,161),171))},$ve.ec=function(){return xL(this.b||(this.b=new r_(this.a,xL(xL(this.d,161),171))),270)},$ve.Rc=function(){return xL(this.b||(this.b=new r_(this.a,xL(xL(this.d,161),171))),270)},$ve.Sc=function(){return xL(xL(this.d,161),171)},$j(uye,"AbstractMapBasedMultimap/NavigableAsMap",536),Vle(483,315,yye,n_),$ve.Lc=function(){return this.b.ec().Lc()},$j(uye,"AbstractMapBasedMultimap/SortedKeySet",483),Vle(385,483,Eye,r_),$j(uye,"AbstractMapBasedMultimap/NavigableKeySet",385),Vle(535,28,bye,QX),$ve.Dc=function(e){var t,n;return e9(this),n=this.d.dc(),(t=this.d.Dc(e))&&(++this.f.d,n&&FR(this)),t},$ve.Ec=function(e){var t,n,r;return!e.dc()&&(e9(this),r=this.d.gc(),(t=this.d.Ec(e))&&(n=this.d.gc(),this.f.d+=n-r,0==r&&FR(this)),t)},$ve.$b=function(){var e;e9(this),0!=(e=this.d.gc())&&(this.d.$b(),this.f.d-=e,fF(this))},$ve.Fc=function(e){return e9(this),this.d.Fc(e)},$ve.Gc=function(e){return e9(this),this.d.Gc(e)},$ve.Fb=function(e){return e===this||(e9(this),C6(this.d,e))},$ve.Hb=function(){return e9(this),L4(this.d)},$ve.Ic=function(){return e9(this),new bL(this)},$ve.Kc=function(e){var t;return e9(this),(t=this.d.Kc(e))&&(--this.f.d,fF(this)),t},$ve.gc=function(){return Hk(this)},$ve.Lc=function(){return e9(this),this.d.Lc()},$ve.Ib=function(){return e9(this),K8(this.d)},$j(uye,"AbstractMapBasedMultimap/WrappedCollection",535);var zLe=TD(pye,"List");Vle(715,535,{19:1,28:1,15:1,14:1},WF),$ve.$c=function(e){J1(this,e)},$ve.Lc=function(){return e9(this),this.d.Lc()},$ve.Tc=function(e,t){var n;e9(this),n=this.d.dc(),xL(this.d,14).Tc(e,t),++this.a.d,n&&FR(this)},$ve.Uc=function(e,t){var n,r,i;return!t.dc()&&(e9(this),i=this.d.gc(),(n=xL(this.d,14).Uc(e,t))&&(r=this.d.gc(),this.a.d+=r-i,0==i&&FR(this)),n)},$ve.Xb=function(e){return e9(this),xL(this.d,14).Xb(e)},$ve.Vc=function(e){return e9(this),xL(this.d,14).Vc(e)},$ve.Wc=function(){return e9(this),new pM(this)},$ve.Xc=function(e){return e9(this),new Fz(this,e)},$ve.Yc=function(e){var t;return e9(this),t=xL(this.d,14).Yc(e),--this.a.d,fF(this),t},$ve.Zc=function(e,t){return e9(this),xL(this.d,14).Zc(e,t)},$ve._c=function(e,t){return e9(this),wW(this.a,this.e,xL(this.d,14)._c(e,t),this.b?this.b:this)},$j(uye,"AbstractMapBasedMultimap/WrappedList",715),Vle(1076,715,{19:1,28:1,15:1,14:1,53:1},MO),$j(uye,"AbstractMapBasedMultimap/RandomAccessWrappedList",1076),Vle(610,1,dye,bL),$ve.Nb=function(e){NU(this,e)},$ve.Ob=function(){return Pz(this),this.b.Ob()},$ve.Pb=function(){return Pz(this),this.b.Pb()},$ve.Qb=function(){FI(this)},$j(uye,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",610),Vle(716,610,_ye,pM,Fz),$ve.Qb=function(){FI(this)},$ve.Rb=function(e){var t;t=0==Hk(this.a),(Pz(this),xL(this.b,123)).Rb(e),++this.a.a.d,t&&FR(this.a)},$ve.Sb=function(){return(Pz(this),xL(this.b,123)).Sb()},$ve.Tb=function(){return(Pz(this),xL(this.b,123)).Tb()},$ve.Ub=function(){return(Pz(this),xL(this.b,123)).Ub()},$ve.Vb=function(){return(Pz(this),xL(this.b,123)).Vb()},$ve.Wb=function(e){(Pz(this),xL(this.b,123)).Wb(e)},$j(uye,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",716),Vle(714,535,yye,yN),$ve.Lc=function(){return e9(this),this.d.Lc()},$j(uye,"AbstractMapBasedMultimap/WrappedSortedSet",714),Vle(1075,714,Eye,VC),$j(uye,"AbstractMapBasedMultimap/WrappedNavigableSet",1075),Vle(1074,535,wye,EN),$ve.Lc=function(){return e9(this),this.d.Lc()},$j(uye,"AbstractMapBasedMultimap/WrappedSet",1074);var $Le,HLe,GLe,VLe,WLe=TD(pye,"Map/Entry");Vle(342,1,Sye),$ve.Fb=function(e){var t;return!!RM(e,43)&&(t=xL(e,43),pB(this.ad(),t.ad())&&pB(this.bd(),t.bd()))},$ve.Hb=function(){var e,t;return e=this.ad(),t=this.bd(),(null==e?0:L4(e))^(null==t?0:L4(t))},$ve.cd=function(e){throw Jb(new _m)},$ve.Ib=function(){return this.ad()+"="+this.bd()},$j(uye,xye,342),Vle(1960,28,bye),$ve.$b=function(){ry(this.dd())},$ve.Fc=function(e){var t;return!!RM(e,43)&&(t=xL(e,43),function(e,t,n){var r,i;return!!(r=xL((i=e.f,i||(e.f=new a_(e,e.c))).vc(t),15))&&r.Fc(n)}(this.dd(),t.ad(),t.bd()))},$ve.Kc=function(e){var t;return!!RM(e,43)&&(t=xL(e,43),S0(this.dd(),t.ad(),t.bd()))},$ve.gc=function(){return this.dd().d},$j(uye,"Multimaps/Entries",1960),Vle(1082,1960,bye),$ve.Ic=function(){return new LI(this.a)},$ve.dd=function(){return this.a},$ve.Lc=function(){return mW(this.a)},$j(uye,"AbstractMultimap/Entries",1082),Vle(719,1082,wye,Ff),$ve.Lc=function(){return mW(this.a)},$ve.Fb=function(e){return Roe(this,e)},$ve.Hb=function(){return m0(this)},$j(uye,"AbstractMultimap/EntrySet",719),Vle(720,28,bye,Uf),$ve.$b=function(){this.a.$b()},$ve.Fc=function(e){return function(e,t){var n;for(n=e.Zb().Ac().Ic();n.Ob();)if(xL(n.Pb(),15).Fc(t))return!0;return!1}(this.a,e)},$ve.Ic=function(){return this.a.lc()},$ve.gc=function(){return this.a.d},$ve.Lc=function(){return this.a.mc()},$j(uye,"AbstractMultimap/Values",720),Vle(609,713,hye),$ve.hc=function(){return this.ed()},$ve.jc=function(){return this.fd()},$ve.cc=function(e){return this.gd(e)},$ve.fc=function(e){return this.hd(e)},$ve.Zb=function(){return this.f||(this.f=this.ac())},$ve.fd=function(){return i$(),i$(),gFe},$ve.Fb=function(e){return V4(this,e)},$ve.gd=function(e){return xL(MX(this,e),21)},$ve.hd=function(e){return xL(Z5(this,e),21)},$ve.kc=function(e){return i$(),new dy(xL(e,21))},$ve.nc=function(e,t){return new EN(this,e,xL(t,21))},$j(uye,"AbstractSetMultimap",609),Vle(1627,609,hye),$ve.hc=function(){return new VE(this.b)},$ve.ed=function(){return new VE(this.b)},$ve.jc=function(){return Zj(new VE(this.b))},$ve.fd=function(){return Zj(new VE(this.b))},$ve.cc=function(e){return xL(xL(MX(this,e),21),81)},$ve.gd=function(e){return xL(xL(MX(this,e),21),81)},$ve.fc=function(e){return xL(xL(Z5(this,e),21),81)},$ve.hd=function(e){return xL(xL(Z5(this,e),21),81)},$ve.kc=function(e){return RM(e,270)?Zj(xL(e,270)):(i$(),new WI(xL(e,81)))},$ve.Zb=function(){return this.f||(this.f=RM(this.c,171)?new SN(this,xL(this.c,171)):RM(this.c,161)?new _N(this,xL(this.c,161)):new a_(this,this.c))},$ve.nc=function(e,t){return RM(t,270)?new VC(this,e,xL(t,270)):new yN(this,e,xL(t,81))},$j(uye,"AbstractSortedSetMultimap",1627),Vle(1628,1627,hye),$ve.Zb=function(){return xL(xL(this.f||(this.f=RM(this.c,171)?new SN(this,xL(this.c,171)):RM(this.c,161)?new _N(this,xL(this.c,161)):new a_(this,this.c)),161),171)},$ve.ec=function(){return xL(xL(this.i||(this.i=RM(this.c,171)?new r_(this,xL(this.c,171)):RM(this.c,161)?new n_(this,xL(this.c,161)):new mI(this,this.c)),81),270)},$ve.bc=function(){return RM(this.c,171)?new r_(this,xL(this.c,171)):RM(this.c,161)?new n_(this,xL(this.c,161)):new mI(this,this.c)},$j(uye,"AbstractSortedKeySortedSetMultimap",1628),Vle(1979,1,{1919:1}),$ve.Fb=function(e){return function(e,t){var n;return t===e||!!RM(t,652)&&(n=xL(t,1919),F7(e.g||(e.g=new jf(e)),n.g||(n.g=new jf(n))))}(this,e)},$ve.Hb=function(){return I3(this.g||(this.g=new jf(this)))},$ve.Ib=function(){return Wie(this.f||(this.f=new SI(this)))},$j(uye,"AbstractTable",1979),Vle(653,mye,wye,jf),$ve.$b=function(){ey()},$ve.Fc=function(e){var t,n;return!!RM(e,462)&&(t=xL(e,669),!!(n=xL(_5(Dj(this.a),Rk(t.c.e,t.b)),84))&&W5(n.tc(),new v_(Rk(t.c.c,t.a),eY(t.c,t.b,t.a))))},$ve.Ic=function(){return new wI(e=this.a,e.e.Hd().gc()*e.c.Hd().gc());var e},$ve.Kc=function(e){var t,n;return!!RM(e,462)&&(t=xL(e,669),!!(n=xL(_5(Dj(this.a),Rk(t.c.e,t.b)),84))&&function(e,t){cj(e);try{return e.Kc(t)}catch(e){if(RM(e=H2(e),203)||RM(e,173))return!1;throw Jb(e)}}(n.tc(),new v_(Rk(t.c.c,t.a),eY(t.c,t.b,t.a))))},$ve.gc=function(){return MD(this.a)},$ve.Lc=function(){return CD((e=this.a).e.Hd().gc()*e.c.Hd().gc(),273,new zf(e));var e},$j(uye,"AbstractTable/CellSet",653),Vle(Tye,28,bye,Bf),$ve.$b=function(){ey()},$ve.Fc=function(e){return function(e,t){var n,r,i,a,o,s,c;for(s=0,c=(o=e.a).length;s=0?"+":"")+(n/60|0),t=gC(r.Math.abs(n)%60),(zae(),yFe)[this.q.getDay()]+" "+EFe[this.q.getMonth()]+" "+gC(this.q.getDate())+" "+gC(this.q.getHours())+":"+gC(this.q.getMinutes())+":"+gC(this.q.getSeconds())+" GMT"+e+t+" "+this.q.getFullYear()};var hDe,dDe,pDe,gDe,bDe,mDe,wDe,vDe,yDe,EDe,_De,SDe=$j(pye,"Date",198);Vle(1887,198,zEe,Ure),$ve.a=!1,$ve.b=0,$ve.c=0,$ve.d=0,$ve.e=0,$ve.f=0,$ve.g=!1,$ve.i=0,$ve.j=0,$ve.k=0,$ve.n=0,$ve.o=0,$ve.p=0,$j("com.google.gwt.i18n.shared.impl","DateRecord",1887),Vle(1938,1,{}),$ve.fe=function(){return null},$ve.ge=function(){return null},$ve.he=function(){return null},$ve.ie=function(){return null},$ve.je=function(){return null},$j($Ee,"JSONValue",1938),Vle(214,1938,{214:1},dh,sh),$ve.Fb=function(e){return!!RM(e,214)&&KG(this.a,xL(e,214).a)},$ve.ee=function(){return Xb},$ve.Hb=function(){return S$(this.a)},$ve.fe=function(){return this},$ve.Ib=function(){var e,t,n;for(n=new zI("["),t=0,e=this.a.length;t0&&(n.a+=","),jk(n,jZ(this,t));return n.a+="]",n.a},$j($Ee,"JSONArray",214),Vle(477,1938,{477:1},ch),$ve.ee=function(){return Yb},$ve.ge=function(){return this},$ve.Ib=function(){return pO(),""+this.a},$ve.a=!1,$j($Ee,"JSONBoolean",477),Vle(965,59,oEe,cv),$j($Ee,"JSONException",965),Vle(1011,1938,{},E),$ve.ee=function(){return em},$ve.Ib=function(){return cye},$j($Ee,"JSONNull",1011),Vle(257,1938,{257:1},lh),$ve.Fb=function(e){return!!RM(e,257)&&this.a==xL(e,257).a},$ve.ee=function(){return Kb},$ve.Hb=function(){return pC(this.a)},$ve.he=function(){return this},$ve.Ib=function(){return this.a+""},$ve.a=0,$j($Ee,"JSONNumber",257),Vle(185,1938,{185:1},lv,uh),$ve.Fb=function(e){return!!RM(e,185)&&KG(this.a,xL(e,185).a)},$ve.ee=function(){return Zb},$ve.Hb=function(){return S$(this.a)},$ve.ie=function(){return this},$ve.Ib=function(){var e,t,n,r,i,a;for(a=new zI("{"),e=!0,r=0,i=(n=D1(this,HY(eFe,kye,2,0,6,1))).length;r=0?":"+this.c:"")+")"},$ve.c=0;var GDe=$j(eye,"StackTraceElement",308);qve={3:1,469:1,36:1,2:1};var VDe,WDe,qDe,XDe,YDe,KDe,ZDe,QDe,JDe,eFe=$j(eye,cEe,2);Vle(106,412,{469:1},ly,uy,BI),$j(eye,"StringBuffer",106),Vle(98,412,{469:1},fy,hy,zI),$j(eye,"StringBuilder",98),Vle(674,73,ZEe,sy),$j(eye,"StringIndexOutOfBoundsException",674),Vle(2012,1,{}),Vle(823,1,{},M),$ve.Kb=function(e){return xL(e,78).e},$j(eye,"Throwable/lambda$0$Type",823),Vle(41,59,{3:1,102:1,59:1,78:1,41:1},_m,Fv),$j(eye,"UnsupportedOperationException",41),Vle(239,236,{3:1,36:1,236:1,239:1},WZ,QE),$ve.wd=function(e){return tge(this,xL(e,239))},$ve.ke=function(){return woe(rme(this))},$ve.Fb=function(e){var t;return this===e||!!RM(e,239)&&(t=xL(e,239),this.e==t.e&&0==tge(this,t))},$ve.Hb=function(){var e;return 0!=this.b?this.b:this.a<54?(e=e2(this.f),this.b=zD(lH(e,-1)),this.b=33*this.b+zD(lH(lD(e,32),-1)),this.b=17*this.b+dH(this.e),this.b):(this.b=17*H5(this.c)+dH(this.e),this.b)},$ve.Ib=function(){return rme(this)},$ve.a=0,$ve.b=0,$ve.d=0,$ve.e=0,$ve.f=0;var tFe,nFe,rFe,iFe,aFe,oFe,sFe=$j("java.math","BigDecimal",239);Vle(90,236,{3:1,36:1,236:1,90:1},Qee,JX,GU,hie,eee,XC),$ve.wd=function(e){return I7(this,xL(e,90))},$ve.ke=function(){return woe(Eve(this,0))},$ve.Fb=function(e){return w9(this,e)},$ve.Hb=function(){return H5(this)},$ve.Ib=function(){return Eve(this,0)},$ve.b=-2,$ve.c=0,$ve.d=0,$ve.e=0;var cFe,lFe,uFe,fFe,hFe=$j("java.math","BigInteger",90);Vle(480,1949,gye),$ve.$b=function(){zU(this)},$ve._b=function(e){return UU(this,e)},$ve.sc=function(e){return e5(this,e,this.g)||e5(this,e,this.f)},$ve.tc=function(){return new Fh(this)},$ve.vc=function(e){return qj(this,e)},$ve.xc=function(e,t){return zB(this,e,t)},$ve.zc=function(e){return BX(this,e)},$ve.gc=function(){return W_(this)},$j(pye,"AbstractHashMap",480),Vle(260,mye,wye,Fh),$ve.$b=function(){this.a.$b()},$ve.Fc=function(e){return $V(this,e)},$ve.Ic=function(){return new F4(this.a)},$ve.Kc=function(e){var t;return!!$V(this,e)&&(t=xL(e,43).ad(),this.a.zc(t),!0)},$ve.gc=function(){return this.a.gc()},$j(pye,"AbstractHashMap/EntrySet",260),Vle(261,1,dye,F4),$ve.Nb=function(e){NU(this,e)},$ve.Pb=function(){return JQ(this)},$ve.Ob=function(){return this.b},$ve.Qb=function(){uK(this)},$ve.b=!1,$j(pye,"AbstractHashMap/EntrySetIterator",261),Vle(411,1,dye,Dh),$ve.Nb=function(e){NU(this,e)},$ve.Ob=function(){return cx(this)},$ve.Pb=function(){return Kz(this)},$ve.Qb=function(){HB(this)},$ve.b=0,$ve.c=-1,$j(pye,"AbstractList/IteratorImpl",411),Vle(99,411,_ye,FV),$ve.Qb=function(){HB(this)},$ve.Rb=function(e){cR(this,e)},$ve.Sb=function(){return this.b>0},$ve.Tb=function(){return this.b},$ve.Ub=function(){return wO(this.b>0),this.a.Xb(this.c=--this.b)},$ve.Vb=function(){return this.b-1},$ve.Wb=function(e){mO(-1!=this.c),this.a.Zc(this.c,e)},$j(pye,"AbstractList/ListIteratorImpl",99),Vle(217,51,Zye,PG),$ve.Tc=function(e,t){MH(e,this.b),this.c.Tc(this.a+e,t),++this.b},$ve.Xb=function(e){return dG(e,this.b),this.c.Xb(this.a+e)},$ve.Yc=function(e){var t;return dG(e,this.b),t=this.c.Yc(this.a+e),--this.b,t},$ve.Zc=function(e,t){return dG(e,this.b),this.c.Zc(this.a+e,t)},$ve.gc=function(){return this.b},$ve.a=0,$ve.b=0,$j(pye,"AbstractList/SubList",217),Vle(380,mye,wye,Uh),$ve.$b=function(){this.a.$b()},$ve.Fc=function(e){return this.a._b(e)},$ve.Ic=function(){return new Gh(this.a.tc().Ic())},$ve.Kc=function(e){return!!this.a._b(e)&&(this.a.zc(e),!0)},$ve.gc=function(){return this.a.gc()},$j(pye,"AbstractMap/1",380),Vle(678,1,dye,Gh),$ve.Nb=function(e){NU(this,e)},$ve.Ob=function(){return this.a.Ob()},$ve.Pb=function(){return xL(this.a.Pb(),43).ad()},$ve.Qb=function(){this.a.Qb()},$j(pye,"AbstractMap/1/1",678),Vle(224,28,bye,Vh),$ve.$b=function(){this.a.$b()},$ve.Fc=function(e){return this.a.sc(e)},$ve.Ic=function(){return new Wh(this.a.tc().Ic())},$ve.gc=function(){return this.a.gc()},$j(pye,"AbstractMap/2",224),Vle(294,1,dye,Wh),$ve.Nb=function(e){NU(this,e)},$ve.Ob=function(){return this.a.Ob()},$ve.Pb=function(){return xL(this.a.Pb(),43).bd()},$ve.Qb=function(){this.a.Qb()},$j(pye,"AbstractMap/2/1",294),Vle(479,1,{479:1,43:1}),$ve.Fb=function(e){var t;return!!RM(e,43)&&(t=xL(e,43),ZB(this.d,t.ad())&&ZB(this.e,t.bd()))},$ve.ad=function(){return this.d},$ve.bd=function(){return this.e},$ve.Hb=function(){return YC(this.d)^YC(this.e)},$ve.cd=function(e){return oR(this,e)},$ve.Ib=function(){return this.d+"="+this.e},$j(pye,"AbstractMap/AbstractEntry",479),Vle(379,479,{479:1,379:1,43:1},tx),$j(pye,"AbstractMap/SimpleEntry",379),Vle(1954,1,h_e),$ve.Fb=function(e){var t;return!!RM(e,43)&&(t=xL(e,43),ZB(this.ad(),t.ad())&&ZB(this.bd(),t.bd()))},$ve.Hb=function(){return YC(this.ad())^YC(this.bd())},$ve.Ib=function(){return this.ad()+"="+this.bd()},$j(pye,xye,1954),Vle(1961,1949,vye),$ve.rc=function(e){return pX(this,e)},$ve._b=function(e){return mP(this,e)},$ve.tc=function(){return new ed(this)},$ve.vc=function(e){return Tk(M4(this,e))},$ve.ec=function(){return new qh(this)},$j(pye,"AbstractNavigableMap",1961),Vle(722,mye,wye,ed),$ve.Fc=function(e){return RM(e,43)&&pX(this.b,xL(e,43))},$ve.Ic=function(){return new fR(this.b)},$ve.Kc=function(e){var t;return!!RM(e,43)&&(t=xL(e,43),VY(this.b,t))},$ve.gc=function(){return this.b.c},$j(pye,"AbstractNavigableMap/EntrySet",722),Vle(485,mye,Eye,qh),$ve.Lc=function(){return new dx(this)},$ve.$b=function(){Ev(this.a)},$ve.Fc=function(e){return mP(this.a,e)},$ve.Ic=function(){return new Hh(new fR(new tO(this.a).b))},$ve.Kc=function(e){return!!mP(this.a,e)&&(gH(this.a,e),!0)},$ve.gc=function(){return this.a.c},$j(pye,"AbstractNavigableMap/NavigableKeySet",485),Vle(486,1,dye,Hh),$ve.Nb=function(e){NU(this,e)},$ve.Ob=function(){return cx(this.a.a)},$ve.Pb=function(){return GO(this.a).ad()},$ve.Qb=function(){kP(this.a)},$j(pye,"AbstractNavigableMap/NavigableKeySet/1",486),Vle(1973,28,bye),$ve.Dc=function(e){return hY(Aae(this,e)),!0},$ve.Ec=function(e){return sB(e),MP(e!=this,"Can't add a queue to itself"),w0(this,e)},$ve.$b=function(){for(;null!=$Z(this););},$j(pye,"AbstractQueue",1973),Vle(319,28,{4:1,19:1,28:1,15:1},zb,GG),$ve.Dc=function(e){return EW(this,e),!0},$ve.$b=function(){JW(this)},$ve.Fc=function(e){return l3(new VB(this),e)},$ve.dc=function(){return Bv(this)},$ve.Ic=function(){return new VB(this)},$ve.Kc=function(e){return function(e,t){return!!l3(e,t)&&(YJ(e),!0)}(new VB(this),e)},$ve.gc=function(){return this.c-this.b&this.a.length-1},$ve.Lc=function(){return new LG(this,272)},$ve.Oc=function(e){var t;return t=this.c-this.b&this.a.length-1,e.lengtht&&Gj(e,t,null),e},$ve.b=0,$ve.c=0,$j(pye,"ArrayDeque",319),Vle(440,1,dye,VB),$ve.Nb=function(e){NU(this,e)},$ve.Ob=function(){return this.a!=this.b},$ve.Pb=function(){return K5(this)},$ve.Qb=function(){YJ(this)},$ve.a=0,$ve.b=0,$ve.c=-1,$j(pye,"ArrayDeque/IteratorImpl",440),Vle(12,51,d_e,$b,dY,AP),$ve.Tc=function(e,t){mF(this,e,t)},$ve.Dc=function(e){return SL(this,e)},$ve.Uc=function(e,t){return m5(this,e,t)},$ve.Ec=function(e){return a3(this,e)},$ve.$b=function(){this.c=HY(LLe,aye,1,0,5,1)},$ve.Fc=function(e){return-1!=YK(this,e,0)},$ve.Hc=function(e){jQ(this,e)},$ve.Xb=function(e){return $D(this,e)},$ve.Vc=function(e){return YK(this,e,0)},$ve.dc=function(){return 0==this.c.length},$ve.Ic=function(){return new td(this)},$ve.Yc=function(e){return RX(this,e)},$ve.Kc=function(e){return KK(this,e)},$ve.Ud=function(e,t){RG(this,e,t)},$ve.Zc=function(e,t){return Kq(this,e,t)},$ve.gc=function(){return this.c.length},$ve.$c=function(e){wM(this,e)},$ve.Nc=function(){return WO(this)},$ve.Oc=function(e){return gee(this,e)};var dFe,pFe,gFe,bFe,mFe,wFe,vFe,yFe,EFe,_Fe=$j(pye,"ArrayList",12);Vle(7,1,dye,td),$ve.Nb=function(e){NU(this,e)},$ve.Ob=function(){return vM(this)},$ve.Pb=function(){return iV(this)},$ve.Qb=function(){$U(this)},$ve.a=0,$ve.b=-1,$j(pye,"ArrayList/1",7),Vle(1982,r.Function,{},I),$ve.te=function(e,t){return r8(e,t)},Vle(154,51,p_e,Uv),$ve.Fc=function(e){return-1!=f1(this,e)},$ve.Hc=function(e){var t,n,r,i;for(sB(e),r=0,i=(n=this.a).length;r>>0).toString(16))},$ve.f=0,$ve.i=t_e;var hUe,dUe,pUe,gUe,bUe=$j(V_e,"CNode",56);Vle(795,1,{},zm),$j(V_e,"CNode/CNodeBuilder",795),Vle(1495,1,{},he),$ve.Oe=function(e,t){return 0},$ve.Pe=function(e,t){return 0},$j(V_e,q_e,1495),Vle(1761,1,{},de),$ve.Le=function(e){var t,n,i,a,o,s,c,l,u,f,h,d,p,g,b;for(u=e_e,i=new td(e.a.b);i.an.d.c||n.d.c==i.d.c&&n.d.b0?e+this.n.d+this.n.a:0},$ve.Se=function(){var e,t,n,i,a;if(a=0,this.e)this.b?a=this.b.a:this.a[1][1]&&(a=this.a[1][1].Se());else if(this.g)a=E9(this,Sre(this,null,!0));else for(NQ(),n=0,i=(t=m3(ay(QUe,1),Kye,230,0,[qUe,XUe,YUe])).length;n0?a+this.n.b+this.n.c:0},$ve.Te=function(){var e,t,n,r,i;if(this.g)for(e=Sre(this,null,!1),NQ(),r=0,i=(n=m3(ay(QUe,1),Kye,230,0,[qUe,XUe,YUe])).length;r0&&(i[0]+=this.d,n-=i[0]),i[2]>0&&(i[2]+=this.d,n-=i[2]),this.c.a=r.Math.max(0,n),this.c.d=t.d+e.d+(this.c.a-n)/2,i[1]=r.Math.max(i[1],n),LX(this,XUe,t.d+e.d+i[0]-(i[1]-n)/2,i)},$ve.b=null,$ve.d=0,$ve.e=!1,$ve.f=!1,$ve.g=!1;var JUe,eje,tje,nje=0,rje=0;$j(wSe,"GridContainerCell",1442),Vle(455,22,{3:1,36:1,22:1,455:1},Ax);var ije,aje=BJ(wSe,"HorizontalLabelAlignment",455,KLe,(function(){return IK(),m3(ay(aje,1),Kye,455,0,[eje,JUe,tje])}),(function(e){return IK(),zZ((bY(),ije),e)}));Vle(304,210,{210:1,304:1},EH,SQ,iH),$ve.Re=function(){return wD(this)},$ve.Se=function(){return vD(this)},$ve.a=0,$ve.c=!1;var oje,sje,cje,lje=$j(wSe,"LabelCell",304);Vle(243,324,{210:1,324:1,243:1},tee),$ve.Re=function(){return Uce(this)},$ve.Se=function(){return jce(this)},$ve.Te=function(){kge(this)},$ve.Ue=function(){Nge(this)},$ve.b=0,$ve.c=0,$ve.d=!1,$j(wSe,"StripContainerCell",243),Vle(1596,1,tEe,ye),$ve.Mb=function(e){return function(e){return!!e&&e.k}(xL(e,210))},$j(wSe,"StripContainerCell/lambda$0$Type",1596),Vle(1597,1,{},Ee),$ve.Fe=function(e){return xL(e,210).Se()},$j(wSe,"StripContainerCell/lambda$1$Type",1597),Vle(1598,1,tEe,_e),$ve.Mb=function(e){return function(e){return!!e&&e.j}(xL(e,210))},$j(wSe,"StripContainerCell/lambda$2$Type",1598),Vle(1599,1,{},ve),$ve.Fe=function(e){return xL(e,210).Re()},$j(wSe,"StripContainerCell/lambda$3$Type",1599),Vle(456,22,{3:1,36:1,22:1,456:1},kx);var uje,fje,hje,dje,pje,gje,bje,mje,wje,vje,yje,Eje,_je,Sje,xje,Tje,Aje,kje,Cje,Mje,Ije,Oje,Nje,Rje=BJ(wSe,"VerticalLabelAlignment",456,KLe,(function(){return CZ(),m3(ay(Rje,1),Kye,456,0,[cje,sje,oje])}),(function(e){return CZ(),zZ((mY(),uje),e)}));Vle(772,1,{},_we),$ve.c=0,$ve.d=0,$ve.k=0,$ve.s=0,$ve.u=!1,$ve.v=0,$ve.C=!1,$j(ASe,"NodeContext",772),Vle(1440,1,$_e,Se),$ve.ue=function(e,t){return wC(xL(e,61),xL(t,61))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(ASe,"NodeContext/0methodref$comparePortSides$Type",1440),Vle(1441,1,$_e,xe),$ve.ue=function(e,t){return function(e,t){var n;if(0!=(n=wC(e.b.Ef(),t.b.Ef())))return n;switch(e.b.Ef().g){case 1:case 2:return _M(e.b.qf(),t.b.qf());case 3:case 4:return _M(t.b.qf(),e.b.qf())}return 0}(xL(e,110),xL(t,110))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(ASe,"NodeContext/1methodref$comparePortContexts$Type",1441),Vle(159,22,{3:1,36:1,22:1,159:1},C0);var Pje,Lje,Dje,Fje,Uje,jje,Bje,zje=BJ(ASe,"NodeLabelLocation",159,KLe,Tee,(function(e){return Dve(),zZ((Zk(),Pje),e)}));Vle(110,1,{110:1},ple),$ve.a=!1,$j(ASe,"PortContext",110),Vle(1446,1,Iye,Ae),$ve.td=function(e){x_(xL(e,304))},$j(MSe,ISe,1446),Vle(1447,1,tEe,ke),$ve.Mb=function(e){return!!xL(e,110).c},$j(MSe,OSe,1447),Vle(1448,1,Iye,Me),$ve.td=function(e){x_(xL(e,110).c)},$j(MSe,"LabelPlacer/lambda$2$Type",1448),Vle(1445,1,Iye,Ie),$ve.td=function(e){uR(),function(e){e.b.rf(e.e)}(xL(e,110))},$j(MSe,"NodeLabelAndSizeUtilities/lambda$0$Type",1445),Vle(1443,1,Iye,$P),$ve.td=function(e){!function(e,t,n,r){!function(e,t,n,r){var i;i=function(e){var t,n,r,i;for(Dve(),r=0,i=(n=Tee()).length;r0?ij(e.a,t,n):ij(e.b,t,n)}(this,xL(e,46),xL(t,167))},$j(LSe,"SuccessorCombination",760),Vle(634,1,{},Ve),$ve.Ce=function(e,t){var n;return function(e){var t,n,i,a,o;return n=a=xL(e.a,20).a,i=o=xL(e.b,20).a,t=r.Math.max(r.Math.abs(a),r.Math.abs(o)),a<=0&&a==o?(n=0,i=o-1):a==-t&&o!=t?(n=o,i=a,o>=0&&++n):(n=-o,i=a),new GA(G6(n),G6(i))}((n=xL(e,46),xL(t,167),n))},$j(LSe,"SuccessorJitter",634),Vle(633,1,{},We),$ve.Ce=function(e,t){var n;return function(e){var t,n;if(t=xL(e.a,20).a,n=xL(e.b,20).a,t>=0){if(t==n)return new GA(G6(-t-1),G6(-t-1));if(t==-n)return new GA(G6(-t),G6(n+1))}return r.Math.abs(t)>r.Math.abs(n)?new GA(G6(-t),G6(t<0?n:n+1)):new GA(G6(t+1),G6(n))}((n=xL(e,46),xL(t,167),n))},$j(LSe,"SuccessorLineByLine",633),Vle(561,1,{},qe),$ve.Ce=function(e,t){var n;return function(e){var t,n,r,i;return t=r=xL(e.a,20).a,n=i=xL(e.b,20).a,0==r&&0==i?n-=1:-1==r&&i<=0?(t=0,n-=2):r<=0&&i>0?(t-=1,n-=1):r>=0&&i<0?(t+=1,n+=1):r>0&&i>=0?(t-=1,n+=1):(t+=1,n-=1),new GA(G6(t),G6(n))}((n=xL(e,46),xL(t,167),n))},$j(LSe,"SuccessorManhattan",561),Vle(1327,1,{},Xe),$ve.Ce=function(e,t){var n;return function(e){var t,n,i;return n=xL(e.a,20).a,i=xL(e.b,20).a,n<(t=r.Math.max(r.Math.abs(n),r.Math.abs(i)))&&i==-t?new GA(G6(n+1),G6(i)):n==t&&i=-t&&i==t?new GA(G6(n-1),G6(i)):new GA(G6(n),G6(i-1))}((n=xL(e,46),xL(t,167),n))},$j(LSe,"SuccessorMaxNormWindingInMathPosSense",1327),Vle(396,1,{},jd),$ve.Ce=function(e,t){return ij(this,e,t)},$ve.c=!1,$ve.d=!1,$ve.e=!1,$ve.f=!1,$j(LSe,"SuccessorQuadrantsGeneric",396),Vle(1328,1,{},Ye),$ve.Kb=function(e){return xL(e,323).a},$j(LSe,"SuccessorQuadrantsGeneric/lambda$0$Type",1328),Vle(322,22,{3:1,36:1,22:1,322:1},Mx),$ve.a=!1;var Xje,Yje=BJ(BSe,zSe,322,KLe,(function(){return Jee(),m3(ay(Yje,1),Kye,322,0,[Gje,Hje,Vje,Wje])}),(function(e){return Jee(),zZ((RK(),Xje),e)}));Vle(1269,1,{}),$ve.Ib=function(){var e,t,n,r,i,a;for(n=" ",e=G6(0),i=0;i0&&EJ(m,y*_),E>0&&_J(m,E*S);for(K0(e.b,new lt),t=new $b,s=new F4(new Fh(e.c).a);s.b;)r=xL((o=JQ(s)).ad(),80),n=xL(o.bd(),391).a,i=Rhe(r,!1,!1),Lge(f=eae(Dae(r),Voe(i),n),i),(v=Fae(r))&&-1==YK(t,v,0)&&(t.c[t.c.length]=v,Zz(v,(wO(0!=f.b),xL(f.a.a.c,8)),n));for(b=new F4(new Fh(e.d).a);b.b;)r=xL((g=JQ(b)).ad(),80),n=xL(g.bd(),391).a,i=Rhe(r,!1,!1),f=eae(jae(r),A4(Voe(i)),n),Lge(f=A4(f),i),(v=Uae(r))&&-1==YK(t,v,0)&&(t.c[t.c.length]=v,Zz(v,(wO(0!=f.b),xL(f.c.b.c,8)),n))}(i),Zee(e,wBe,this.b),Toe(t)},$ve.a=0,$j(exe,"DisCoLayoutProvider",1105),Vle(1218,1,{},nt),$ve.c=!1,$ve.e=0,$ve.f=0,$j(exe,"DisCoPolyominoCompactor",1218),Vle(554,1,{554:1},dF),$ve.b=!0,$j(txe,"DCComponent",554),Vle(390,22,{3:1,36:1,22:1,390:1},Nx),$ve.a=!1;var oBe,sBe,cBe=BJ(txe,"DCDirection",390,KLe,(function(){return ete(),m3(ay(cBe,1),Kye,390,0,[nBe,tBe,rBe,iBe])}),(function(e){return ete(),zZ((PK(),oBe),e)}));Vle(265,134,{3:1,265:1,94:1,134:1},Qle),$j(txe,"DCElement",265),Vle(391,1,{391:1},une),$ve.c=0,$j(txe,"DCExtension",391),Vle(738,134,XSe,Iy),$j(txe,"DCGraph",738),Vle(475,22,{3:1,36:1,22:1,475:1},jO);var lBe,uBe,fBe,hBe,dBe,pBe,gBe,bBe,mBe,wBe,vBe,yBe,EBe,_Be,SBe,xBe,TBe,ABe,kBe,CBe,MBe,IBe=BJ(nxe,rxe,475,KLe,(function(){return ES(),m3(ay(IBe,1),Kye,475,0,[sBe])}),(function(e){return ES(),zZ((oW(),lBe),e)}));Vle(833,1,dSe,Du),$ve.Qe=function(e){q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,ixe),cxe),"Connected Components Compaction Strategy"),"Strategy for packing different connected components in order to save space and enhance readability of a graph."),hBe),(wse(),c5e)),IBe),T8((kee(),n5e))))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,axe),cxe),"Connected Components Layout Algorithm"),"A layout algorithm that is to be applied to each connected component before the components themselves are compacted. If unspecified, the positions of the components' nodes are not altered."),h5e),eFe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,oxe),"debug"),"DCGraph"),"Access to the DCGraph is intended for the debug view,"),f5e),LLe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,sxe),"debug"),"List of Polyominoes"),"Access to the polyominoes is intended for the debug view,"),f5e),LLe),T8(n5e)))),bbe((new Fu,e))},$j(nxe,"DisCoMetaDataProvider",833),Vle(978,1,dSe,Fu),$ve.Qe=function(e){bbe(e)},$j(nxe,"DisCoOptions",978),Vle(979,1,{},rt),$ve._e=function(){return new tt},$ve.af=function(e){},$j(nxe,"DisCoOptions/DiscoFactory",979),Vle(555,167,{320:1,167:1,555:1},Gue),$ve.a=0,$ve.b=0,$ve.c=0,$ve.d=0,$j("org.eclipse.elk.alg.disco.structures","DCPolyomino",555),Vle(1240,1,tEe,it),$ve.Mb=function(e){return lC(e)},$j(pxe,"ElkGraphComponentsProcessor/lambda$0$Type",1240),Vle(1241,1,{},at),$ve.Kb=function(e){return r$(),Dae(xL(e,80))},$j(pxe,"ElkGraphComponentsProcessor/lambda$1$Type",1241),Vle(1242,1,tEe,ot),$ve.Mb=function(e){return function(e){return r$(),Dae(e)==$H(jae(e))}(xL(e,80))},$j(pxe,"ElkGraphComponentsProcessor/lambda$2$Type",1242),Vle(1243,1,{},st),$ve.Kb=function(e){return r$(),jae(xL(e,80))},$j(pxe,"ElkGraphComponentsProcessor/lambda$3$Type",1243),Vle(1244,1,tEe,ct),$ve.Mb=function(e){return function(e){return r$(),jae(e)==$H(Dae(e))}(xL(e,80))},$j(pxe,"ElkGraphComponentsProcessor/lambda$4$Type",1244),Vle(1245,1,tEe,zd),$ve.Mb=function(e){return function(e,t){return r$(),e==$H(Dae(t))||e==$H(jae(t))}(this.a,xL(e,80))},$j(pxe,"ElkGraphComponentsProcessor/lambda$5$Type",1245),Vle(1246,1,{},$d),$ve.Kb=function(e){return function(e,t){return r$(),e==Dae(t)?jae(t):Dae(t)}(this.a,xL(e,80))},$j(pxe,"ElkGraphComponentsProcessor/lambda$6$Type",1246),Vle(1215,1,{},lq),$ve.a=0,$j(pxe,"ElkGraphTransformer",1215),Vle(1216,1,{},lt),$ve.Od=function(e,t){!function(e,t,n){var r,i,a,o;e.a=n.b.d,RM(t,349)?(Jq(a=Voe(i=Rhe(xL(t,80),!1,!1)),r=new Hd(e)),Lge(a,i),null!=t.Xe((Ove(),_6e))&&Jq(xL(t.Xe(_6e),74),r)):((o=xL(t,464)).Cg(o.yg()+e.a.a),o.Dg(o.zg()+e.a.b))}(this,xL(e,160),xL(t,265))},$j(pxe,"ElkGraphTransformer/OffsetApplier",1216),Vle(1217,1,Iye,Hd),$ve.td=function(e){!function(e,t){XO(t,e.a.a.a,e.a.a.b)}(this,xL(e,8))},$j(pxe,"ElkGraphTransformer/OffsetApplier/OffSetToChainApplier",1217),Vle(736,1,{},ut),$j(vxe,yxe,736),Vle(1205,1,$_e,ft),$ve.ue=function(e,t){return function(e,t){var n,r,i;return 0==(n=xL(Hae(t,(ehe(),ZBe)),20).a-xL(Hae(e,ZBe),20).a)?(r=IR(kM(xL(Hae(e,(q1(),aze)),8)),xL(Hae(e,oze),8)),i=IR(kM(xL(Hae(t,aze),8)),xL(Hae(t,oze),8)),r8(r.a*r.b,i.a*i.b)):n}(xL(e,229),xL(t,229))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(vxe,Exe,1205),Vle(723,207,ZSe,Um),$ve.$e=function(e,t){cse(this,e,t)},$j(vxe,"ForceLayoutProvider",723),Vle(354,134,{3:1,354:1,94:1,134:1}),$j(_xe,"FParticle",354),Vle(552,354,{3:1,552:1,354:1,94:1,134:1},Aj),$ve.Ib=function(){var e;return this.a?(e=YK(this.a.a,this,0))>=0?"b"+e+"["+pq(this.a)+"]":"b["+pq(this.a)+"]":"b_"+eO(this)},$j(_xe,"FBendpoint",552),Vle(281,134,{3:1,281:1,94:1,134:1},wR),$ve.Ib=function(){return pq(this)},$j(_xe,"FEdge",281),Vle(229,134,{3:1,229:1,94:1,134:1},VX);var OBe,NBe,RBe,PBe,LBe,DBe,FBe,UBe,jBe,BBe,zBe=$j(_xe,"FGraph",229);Vle(441,354,{3:1,441:1,354:1,94:1,134:1},tq),$ve.Ib=function(){return null==this.b||0==this.b.length?"l["+pq(this.a)+"]":"l_"+this.b},$j(_xe,"FLabel",441),Vle(144,354,{3:1,144:1,354:1,94:1,134:1},eB),$ve.Ib=function(){return QG(this)},$ve.b=0,$j(_xe,"FNode",144),Vle(1972,1,{}),$ve.cf=function(e){uge(this,e)},$ve.df=function(){xne(this)},$ve.d=0,$j(xxe,"AbstractForceModel",1972),Vle(621,1972,{621:1},u2),$ve.bf=function(e,t){var n,i,a,o,s;return xce(this.f,e,t),a=IR(kM(t.d),e.d),s=r.Math.sqrt(a.a*a.a+a.b*a.b),i=r.Math.max(0,s-dB(e.e)/2-dB(t.e)/2),o=(n=S4(this.e,e,t))>0?-function(e,t){return e>0?r.Math.log(e/t):-100}(i,this.c)*n:function(e,t){return e>0?t/(e*e):100*t}(i,this.b)*xL(Hae(e,(ehe(),ZBe)),20).a,nI(a,o/s),a},$ve.cf=function(e){uge(this,e),this.a=xL(Hae(e,(ehe(),WBe)),20).a,this.c=Mv(NN(Hae(e,rze))),this.b=Mv(NN(Hae(e,JBe)))},$ve.ef=function(e){return e0?t*t/e:t*t*100}(i=r.Math.max(0,s-dB(e.e)/2-dB(t.e)/2),this.a)*xL(Hae(e,(ehe(),ZBe)),20).a,(n=S4(this.e,e,t))>0&&(o-=function(e,t){return e*e/t}(i,this.a)*n),nI(a,o*this.b/s),a},$ve.cf=function(e){var t,n,i,a,o,s,c;for(uge(this,e),this.b=Mv(NN(Hae(e,(ehe(),ize)))),this.c=this.b/xL(Hae(e,WBe),20).a,i=e.e.c.length,o=0,a=0,c=new td(e.e);c.a0},$ve.a=0,$ve.b=0,$ve.c=0,$j(xxe,"FruchtermanReingoldModel",622),Vle(828,1,dSe,Uu),$ve.Qe=function(e){q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Txe),""),"Force Model"),"Determines the model for force calculation."),RBe),(wse(),c5e)),Tze),T8((kee(),n5e))))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Axe),""),"Iterations"),"The number of iterations on the force model."),G6(300)),u5e),LDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,kxe),""),"Repulsive Power"),"Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model"),G6(0)),u5e),LDe),T8(J4e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Cxe),""),"FR Temperature"),"The temperature is used as a scaling factor for particle displacements."),Mxe),s5e),ODe),T8(n5e)))),jV(e,Cxe,Txe,UBe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Ixe),""),"Eades Repulsion"),"Factor for repulsive forces in Eades' model."),5),s5e),ODe),T8(n5e)))),jV(e,Ixe,Txe,LBe),dwe((new ju,e))},$j(Oxe,"ForceMetaDataProvider",828),Vle(418,22,{3:1,36:1,22:1,418:1},Rx);var $Be,HBe,GBe,VBe,WBe,qBe,XBe,YBe,KBe,ZBe,QBe,JBe,eze,tze,nze,rze,ize,aze,oze,sze,cze,lze,uze,fze,hze,dze,pze,gze,bze,mze,wze,vze,yze,Eze,_ze,Sze,xze,Tze=BJ(Oxe,"ForceModelStrategy",418,KLe,(function(){return dQ(),m3(ay(Tze,1),Kye,418,0,[jBe,BBe])}),(function(e){return dQ(),zZ((Hq(),$Be),e)}));Vle(968,1,dSe,ju),$ve.Qe=function(e){dwe(e)},$j(Oxe,"ForceOptions",968),Vle(969,1,{},bt),$ve._e=function(){return new Um},$ve.af=function(e){},$j(Oxe,"ForceOptions/ForceFactory",969),Vle(829,1,dSe,Bu),$ve.Qe=function(e){q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Wxe),""),"Fixed Position"),"Prevent that the node is moved by the layout algorithm."),(pO(),!1)),(wse(),o5e)),TDe),T8((kee(),t5e))))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,qxe),""),"Desired Edge Length"),"Either specified for parent nodes or for individual edges, where the latter takes higher precedence."),100),s5e),ODe),EF(n5e,m3(ay(p5e,1),Kye,175,0,[J4e]))))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Xxe),""),"Layout Dimension"),"Dimensions that are permitted to be altered during layout."),fze),c5e),Lze),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Yxe),""),"Stress Epsilon"),"Termination criterion for the iterative process."),Mxe),s5e),ODe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Kxe),""),"Iteration Limit"),"Maximum number of performed iterations. Takes higher precedence than 'epsilon'."),G6(Jve)),u5e),LDe),T8(n5e)))),sme((new zu,e))},$j(Oxe,"StressMetaDataProvider",829),Vle(972,1,dSe,zu),$ve.Qe=function(e){sme(e)},$j(Oxe,"StressOptions",972),Vle(973,1,{},pt),$ve._e=function(){return new vR},$ve.af=function(e){},$j(Oxe,"StressOptions/StressFactory",973),Vle(1101,207,ZSe,vR),$ve.$e=function(e,t){var n,r,i,a;for(Qie(t,Qxe,1),Av(ON(gue(e,(ste(),vze))))||cse(new Um,e,P0(t,1)),r=W3(e),a=(n=Cge(this.a,r)).Ic();a.Ob();)(i=xL(a.Pb(),229)).e.c.length<=1||(Zbe(this.b,i),wue(this.b),jQ(i.d,new gt));Fwe(r=Wwe(n)),Toe(t)},$j(Jxe,"StressLayoutProvider",1101),Vle(1102,1,Iye,gt),$ve.td=function(e){dbe(xL(e,441))},$j(Jxe,"StressLayoutProvider/lambda$0$Type",1102),Vle(970,1,{},Im),$ve.c=0,$ve.e=0,$ve.g=0,$j(Jxe,"StressMajorization",970),Vle(376,22,{3:1,36:1,22:1,376:1},Px);var Aze,kze,Cze,Mze,Ize,Oze,Nze,Rze,Pze,Lze=BJ(Jxe,"StressMajorization/Dimension",376,KLe,(function(){return sZ(),m3(ay(Lze,1),Kye,376,0,[Sze,_ze,xze])}),(function(e){return sZ(),zZ((pY(),Aze),e)}));Vle(971,1,$_e,Gd),$ve.ue=function(e,t){return function(e,t,n){return r8(e[t.b],e[n.b])}(this.a,xL(e,144),xL(t,144))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(Jxe,"StressMajorization/lambda$0$Type",971),Vle(1202,1,{},cV),$j(tTe,"ElkLayered",1202),Vle(1203,1,Iye,Vd),$ve.td=function(e){!function(e,t){xL(Hae(t,(mve(),lKe)),333)==(_q(),KGe)&&q3(t,lKe,e)}(this.a,xL(e,38))},$j(tTe,"ElkLayered/lambda$0$Type",1203),Vle(1204,1,Iye,Wd),$ve.td=function(e){!function(e,t){q3(t,(mve(),rKe),e)}(this.a,xL(e,38))},$j(tTe,"ElkLayered/lambda$1$Type",1204),Vle(1237,1,{},zM),$j(tTe,"GraphConfigurator",1237),Vle(742,1,Iye,qd),$ve.td=function(e){voe(this.a,xL(e,10))},$j(tTe,"GraphConfigurator/lambda$0$Type",742),Vle(743,1,{},dt),$ve.Kb=function(e){return jre(),new JD(null,new LG(xL(e,29).a,16))},$j(tTe,"GraphConfigurator/lambda$1$Type",743),Vle(744,1,Iye,Xd),$ve.td=function(e){voe(this.a,xL(e,10))},$j(tTe,"GraphConfigurator/lambda$2$Type",744),Vle(1100,207,ZSe,$m),$ve.$e=function(e,t){var n;n=function(e,t){var n,r,i;if(i=Zpe(t),aS(new JD(null,(!t.c&&(t.c=new AU(Det,t,9,9)),new LG(t.c,16))),new np(i)),function(e,t){var n,r,i,a,o,s,c,l,u,f,h;for(o=Av(ON(gue(e,(mve(),RKe)))),h=xL(gue(e,SZe),21),c=!1,l=!1,f=new gI((!e.c&&(e.c=new AU(Det,e,9,9)),e.c));!(f.e==f.i.gc()||c&&l);){for(a=xL(aee(f),122),s=0,i=jU(FJ(m3(ay(jLe,1),aye,19,0,[(!a.d&&(a.d=new VR(Cet,a,8,5)),a.d),(!a.e&&(a.e=new VR(Cet,a,7,4)),a.e)])));Wle(i)&&(r=xL(qq(i),80),u=o&&Zce(r)&&Av(ON(gue(r,PKe))),n=hme((!r.b&&(r.b=new VR(ket,r,4,7)),r.b),a)?e==$H(Jie(xL(FQ((!r.c&&(r.c=new VR(ket,r,5,8)),r.c),0),93))):e==$H(Jie(xL(FQ((!r.b&&(r.b=new VR(ket,r,4,7)),r.b),0),93))),!((u||n)&&++s>1)););(s>0||h.Fc((lae(),V9e))&&(!a.n&&(a.n=new AU(Pet,a,1,7)),a.n).i>0)&&(c=!0),s>1&&(l=!0)}c&&t.Dc((Uhe(),YVe)),l&&t.Dc((Uhe(),KVe))}(t,r=xL(Hae(i,(Nve(),DWe)),21)),r.Fc((Uhe(),YVe)))for(n=new gI((!t.c&&(t.c=new AU(Det,t,9,9)),t.c));n.e!=n.i.gc();)vwe(e,t,i,xL(aee(n),122));return 0!=xL(gue(t,(mve(),aZe)),174).gc()&&khe(t,i),Av(ON(Hae(i,fZe)))&&r.Dc(eWe),HO(i,PZe)&&gv(new f9(Mv(NN(Hae(i,PZe)))),i),Ak(gue(t,CKe))===Ak((Z6(),s9e))?function(e,t,n){var r,i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v,y,E,_,S;for(o=new iS,m=xL(Hae(n,(mve(),hKe)),108),w0(o,(!t.a&&(t.a=new AU(Let,t,10,11)),t.a));0!=o.b;)!Av(ON(gue(l=xL(0==o.b?null:(wO(0!=o.b),UQ(o,o.a.a)),34),cZe)))&&(f=0!=(!l.a&&(l.a=new AU(Let,l,10,11)),l.a).i,d=iae(l),h=Ak(gue(l,CKe))===Ak((Z6(),s9e)),g=null,(S=!GY(l,(Ove(),X5e))||eP(RN(gue(l,X5e)),STe))&&h&&(f||d)&&(q3(g=Zpe(l),hKe,m),HO(g,PZe)&&gv(new f9(Mv(NN(Hae(g,PZe)))),g),0!=xL(gue(l,aZe),174).gc()&&(u=g,aS(new JD(null,(!l.c&&(l.c=new AU(Det,l,9,9)),new LG(l.c,16))),new rp(u)),khe(l,g))),w=n,(v=xL(qj(e.a,$H(l)),10))&&(w=v.e),p=uwe(e,l,w),g&&(p.e=g,g.e=p,w0(o,(!l.a&&(l.a=new AU(Let,l,10,11)),l.a))));for(mq(o,t,o.c.b,o.c);0!=o.b;){for(c=new gI((!(a=xL(0==o.b?null:(wO(0!=o.b),UQ(o,o.a.a)),34)).b&&(a.b=new AU(Cet,a,12,3)),a.b));c.e!=c.i.gc();)Bde(s=xL(aee(c),80)),E=Jie(xL(FQ((!s.b&&(s.b=new VR(ket,s,4,7)),s.b),0),93)),_=Jie(xL(FQ((!s.c&&(s.c=new VR(ket,s,5,8)),s.c),0),93)),Av(ON(gue(s,cZe)))||Av(ON(gue(E,cZe)))||Av(ON(gue(_,cZe)))||(b=a,Zce(s)&&Av(ON(gue(E,RKe)))&&Av(ON(gue(s,PKe)))||DQ(_,E)?b=E:DQ(E,_)&&(b=_),w=n,(v=xL(qj(e.a,b),10))&&(w=v.e),q3(Ive(e,s,b,w),(Nve(),SWe),ghe(e,s,t,n)));if(h=Ak(gue(a,CKe))===Ak((Z6(),s9e)))for(i=new gI((!a.a&&(a.a=new AU(Let,a,10,11)),a.a));i.e!=i.i.gc();)S=!GY(r=xL(aee(i),34),(Ove(),X5e))||eP(RN(gue(r,X5e)),STe),y=Ak(gue(r,CKe))===Ak(s9e),S&&y&&mq(o,r,o.c.b,o.c)}}(e,t,i):function(e,t,n){var r,i,a,o,s,c,l,u,f,h,d,p,g;for(f=0,i=new gI((!t.a&&(t.a=new AU(Let,t,10,11)),t.a));i.e!=i.i.gc();)Av(ON(gue(r=xL(aee(i),34),(mve(),cZe))))||(Ak(gue(t,eKe))!==Ak((p4(),WQe))&&(Zee(r,(Nve(),ZWe),G6(f)),++f),uwe(e,r,n));for(f=0,l=new gI((!t.b&&(t.b=new AU(Cet,t,12,3)),t.b));l.e!=l.i.gc();)s=xL(aee(l),80),Ak(gue(t,(mve(),eKe)))!==Ak((p4(),WQe))&&(Zee(s,(Nve(),ZWe),G6(f)),++f),p=Dae(s),g=jae(s),u=Av(ON(gue(p,RKe))),d=!Av(ON(gue(s,cZe))),h=u&&Zce(s)&&Av(ON(gue(s,PKe))),a=$H(p)==t&&$H(p)==$H(g),o=($H(p)==t&&g==t)^($H(g)==t&&p==t),d&&!h&&(o||a)&&Ive(e,s,t,n);if($H(t))for(c=new gI(Rz($H(t)));c.e!=c.i.gc();)(p=Dae(s=xL(aee(c),80)))==t&&Zce(s)&&(h=Av(ON(gue(p,(mve(),RKe))))&&Av(ON(gue(s,PKe))))&&Ive(e,s,t,n)}(e,t,i),i}(new Km,e),Ak(gue(e,(mve(),CKe)))===Ak((Z6(),s9e))?function(e,t,n){var i;!(i=n)&&(i=sD(new qw,0)),Qie(i,eTe,2),kte(e.b,t,P0(i,1)),function(e,t,n){var r,i,a,o,s,c,l,u,f,h,d,p;for(c=function(e){var t,n,r,i,a;for(t=new zb,n=new zb,yW(t,e),yW(n,e);n.b!=n.c;)for(a=new td(xL(JU(n),38).a);a.aMxe,A=r.Math.abs(d.b-g.b)>Mxe,(!n&&T&&A||n&&(T||A))&&oD(m.a,E)),w0(m.a,i),0==i.b?d=E:(wO(0!=i.b),d=xL(i.c.b.c,8)),V2(p,h,b),O0(a)==x&&(xB(x.i)!=a.a&&Ese(b=new lE,xB(x.i),v),q3(m,wqe,b)),Noe(p,m,v),f.a.xc(p,f);bG(m,_),gG(m,x)}for(u=f.a.ec().Ic();u.Ob();)bG(l=xL(u.Pb(),18),null),gG(l,null);Toe(t)}(t,P0(i,1)),Toe(i)}(this.a,n,t):function(e,t,n){var i,a,o,s;if(!(s=n)&&(s=sD(new qw,0)),Qie(s,eTe,1),Vme(e.c,t),o=function(e,t){var n,r,i,a,o,s,c,l,u,f,h,d;if(e.b=e.c,h=null==(d=ON(Hae(t,(mve(),RZe))))||(sB(d),d),a=xL(Hae(t,(Nve(),DWe)),21).Fc((Uhe(),YVe)),n=!((i=xL(Hae(t,yZe),100))==(Hie(),D9e)||i==U9e||i==F9e),!h||!n&&a)f=new Uv(m3(ay(c$e,1),cTe,38,0,[t]));else{for(u=new td(t.a);u.at.a&&(r.Fc((Eie(),B5e))?e.c.a+=(n.a-t.a)/2:r.Fc($5e)&&(e.c.a+=n.a-t.a)),n.b>t.b&&(r.Fc((Eie(),G5e))?e.c.b+=(n.b-t.b)/2:r.Fc(H5e)&&(e.c.b+=n.b-t.b)),xL(Hae(e,(Nve(),DWe)),21).Fc((Uhe(),YVe))&&(n.a>t.a||n.b>t.b))for(s=new td(e.a);s.a0&&(SL(e.c,new $L(t.c,t.d,e.d)),e.b=t.d)}(this,xL(e,140))},$ve.b=0,$j(aTe,"RectilinearConvexHull/MaximalElementsEventHandler",566),Vle(1614,1,$_e,Et),$ve.ue=function(e,t){return function(e,t){return yS(),r8((sB(e),e),(sB(t),t))}(NN(e),NN(t))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(aTe,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",1614),Vle(1613,1,{366:1},_Q),$ve.Ke=function(e){!function(e,t){var n;e.d&&(t.c!=e.e.c||function(e,t){return U3(),e==Wze&&t==qze||e==Wze&&t==Xze||e==Yze&&t==Xze||e==Yze&&t==qze}(e.e.b,t.b))&&(SL(e.f,e.d),e.a=e.d.c+e.d.b,e.d=null,e.e=null),function(e){return e==Wze||e==qze}(t.b)?e.c=t:e.b=t,(t.b==(U3(),Wze)&&!t.a||t.b==qze&&t.a||t.b==Xze&&t.a||t.b==Yze&&!t.a)&&e.c&&e.b&&(n=new Sz(e.a,e.c.d,t.c-e.a,e.b.d-e.c.d),e.d=n,e.e=t)}(this,xL(e,140))},$ve.a=0,$ve.b=null,$ve.c=null,$ve.d=null,$ve.e=null,$j(aTe,"RectilinearConvexHull/RectangleEventHandler",1613),Vle(1615,1,$_e,_t),$ve.ue=function(e,t){return function(e,t){return gQ(),e.c==t.c?r8(t.d,e.d):r8(e.c,t.c)}(xL(e,140),xL(t,140))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(aTe,"RectilinearConvexHull/lambda$0$Type",1615),Vle(1616,1,$_e,yt),$ve.ue=function(e,t){return function(e,t){return gQ(),e.c==t.c?r8(e.d,t.d):r8(e.c,t.c)}(xL(e,140),xL(t,140))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(aTe,"RectilinearConvexHull/lambda$1$Type",1616),Vle(1617,1,$_e,kt),$ve.ue=function(e,t){return function(e,t){return gQ(),e.c==t.c?r8(t.d,e.d):r8(t.c,e.c)}(xL(e,140),xL(t,140))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(aTe,"RectilinearConvexHull/lambda$2$Type",1617),Vle(1618,1,$_e,Ct),$ve.ue=function(e,t){return function(e,t){return gQ(),e.c==t.c?r8(e.d,t.d):r8(t.c,e.c)}(xL(e,140),xL(t,140))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(aTe,"RectilinearConvexHull/lambda$3$Type",1618),Vle(1619,1,$_e,Mt),$ve.ue=function(e,t){return function(e,t){var n;if(gQ(),e.c==t.c){if(e.b==t.b||function(e,t){return U3(),e==Wze&&t==Yze||e==Yze&&t==Wze||e==Xze&&t==qze||e==qze&&t==Xze}(e.b,t.b)){if(n=function(e){return e==Wze||e==Yze}(e.b)?1:-1,e.a&&!t.a)return n;if(!e.a&&t.a)return-n}return _M(e.b.g,t.b.g)}return r8(e.c,t.c)}(xL(e,140),xL(t,140))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(aTe,"RectilinearConvexHull/lambda$4$Type",1619),Vle(1620,1,{},nG),$j(aTe,"Scanline",1620),Vle(1974,1,{}),$j(oTe,"AbstractGraphPlacer",1974),Vle(503,1,{503:1},QL),$j(oTe,"ComponentGroup",503),Vle(1265,1974,{},Gm),$ve.mf=function(e,t){var n,r,i,a,o,s,c,l,u,f,h,d;if(this.a.c=HY(LLe,aye,1,0,5,1),t.a.c=HY(LLe,aye,1,0,5,1),e.dc())return t.f.a=0,void(t.f.b=0);for(L2(t,a=xL(e.Xb(0),38)),r=e.Ic();r.Ob();)b8(this,xL(r.Pb(),38));for(d=new lE,i=Mv(NN(Hae(a,(mve(),FZe)))),c=new td(this.a);c.ai?1:0}(xL(e,38),xL(t,38))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(oTe,"ComponentsProcessor/lambda$0$Type",1239),Vle(1263,1974,{},Nt),$ve.mf=function(e,t){var n,i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v,y,E,_;if(1!=e.gc()){if(e.dc())return t.a.c=HY(LLe,aye,1,0,5,1),t.f.a=0,void(t.f.b=0);for(l=e.Ic();l.Ob();){for(m=0,g=new td((s=xL(l.Pb(),38)).a);g.ad&&(E=0,_+=h+a,h=0),Vde(s,E+(b=s.c).a,_+b.b),Kk(b),n=r.Math.max(n,E+w.a),h=r.Math.max(h,w.b),E+=w.a+a;if(t.f.a=n,t.f.b=_+h,Av(ON(Hae(o,ZYe)))){for(wve(i=new It,e,a),f=e.Ic();f.Ob();)MR(Kk(xL(f.Pb(),38).c),i.e);MR(Kk(t.f),i.a)}fK(t,e)}else(v=xL(e.Xb(0),38))!=t&&(t.a.c=HY(LLe,aye,1,0,5,1),fpe(t,v,0,0),L2(t,v),Xz(t.d,v.d),t.f.a=v.f.a,t.f.b=v.f.b)},$j(oTe,"SimpleRowGraphPlacer",1263),Vle(1264,1,$_e,Rt),$ve.ue=function(e,t){return function(e,t){var n;return 0==(n=t.p-e.p)&&Ak(Hae(e,(mve(),eKe)))===Ak((p4(),WQe))?r8(e.f.a*e.f.b,t.f.a*t.f.b):n}(xL(e,38),xL(t,38))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(oTe,"SimpleRowGraphPlacer/1",1264),Vle(1236,1,oSe,Pt),$ve.Lb=function(e){var t;return!!(t=xL(Hae(xL(e,242).b,(mve(),FKe)),74))&&0!=t.b},$ve.Fb=function(e){return this===e},$ve.Mb=function(e){var t;return!!(t=xL(Hae(xL(e,242).b,(mve(),FKe)),74))&&0!=t.b},$j(lTe,"CompoundGraphPostprocessor/1",1236),Vle(1235,1,uTe,Ym),$ve.nf=function(e,t){kte(this,xL(e,38),t)},$j(lTe,"CompoundGraphPreprocessor",1235),Vle(435,1,{435:1},j8),$ve.c=!1,$j(lTe,"CompoundGraphPreprocessor/ExternalPort",435),Vle(242,1,{242:1},BP),$ve.Ib=function(){return VO(this.c)+":"+$ce(this.b)},$j(lTe,"CrossHierarchyEdge",242),Vle(747,1,$_e,Yd),$ve.ue=function(e,t){return function(e,t,n){var r,i;return t.c==(t1(),tJe)&&n.c==eJe?-1:t.c==eJe&&n.c==tJe?1:(r=v5(t.a,e.a),i=v5(n.a,e.a),t.c==tJe?i-r:r-i)}(this,xL(e,242),xL(t,242))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(lTe,"CrossHierarchyEdgeComparator",747),Vle(299,134,{3:1,299:1,94:1,134:1}),$ve.p=0,$j(fTe,"LGraphElement",299),Vle(18,299,{3:1,18:1,299:1,94:1,134:1},_$),$ve.Ib=function(){return $ce(this)};var s$e=$j(fTe,"LEdge",18);Vle(38,299,{3:1,19:1,38:1,299:1,94:1,134:1},l1),$ve.Hc=function(e){Jq(this,e)},$ve.Ic=function(){return new td(this.b)},$ve.Ib=function(){return 0==this.b.c.length?"G-unlayered"+Yae(this.a):0==this.a.c.length?"G-layered"+Yae(this.b):"G[layerless"+Yae(this.a)+", layers"+Yae(this.b)+"]"};var c$e=$j(fTe,"LGraph",38);Vle(646,1,{}),$ve.of=function(){return this.e.n},$ve.Xe=function(e){return Hae(this.e,e)},$ve.pf=function(){return this.e.o},$ve.qf=function(){return this.e.p},$ve.Ye=function(e){return HO(this.e,e)},$ve.rf=function(e){this.e.n.a=e.a,this.e.n.b=e.b},$ve.sf=function(e){this.e.o.a=e.a,this.e.o.b=e.b},$ve.tf=function(e){this.e.p=e},$j(fTe,"LGraphAdapters/AbstractLShapeAdapter",646),Vle(569,1,{818:1},Kd),$ve.uf=function(){var e,t;if(!this.b)for(this.b=PO(this.a.b.c.length),t=new td(this.a.b);t.a0&&F5((pG(t-1,e.length),e.charCodeAt(t-1)),wTe);)--t;if(i> ",e),jne(n)),Bk(jk((e.a+="[",e),n.i),"]")),e.a},$ve.c=!0,$ve.d=!1;var A$e,k$e,C$e,M$e,I$e=$j(fTe,"LPort",11);Vle(393,1,Lye,Qd),$ve.Hc=function(e){Jq(this,e)},$ve.Ic=function(){return new Jd(new td(this.a.e))},$j(fTe,"LPort/1",393),Vle(1262,1,dye,Jd),$ve.Nb=function(e){NU(this,e)},$ve.Pb=function(){return xL(iV(this.a),18).c},$ve.Ob=function(){return vM(this.a)},$ve.Qb=function(){$U(this.a)},$j(fTe,"LPort/1/1",1262),Vle(356,1,Lye,ep),$ve.Hc=function(e){Jq(this,e)},$ve.Ic=function(){return new tp(new td(this.a.g))},$j(fTe,"LPort/2",356),Vle(746,1,dye,tp),$ve.Nb=function(e){NU(this,e)},$ve.Pb=function(){return xL(iV(this.a),18).d},$ve.Ob=function(){return vM(this.a)},$ve.Qb=function(){$U(this.a)},$j(fTe,"LPort/2/1",746),Vle(1255,1,Lye,$x),$ve.Hc=function(e){Jq(this,e)},$ve.Ic=function(){return new GX(this)},$j(fTe,"LPort/CombineIter",1255),Vle(200,1,dye,GX),$ve.Nb=function(e){NU(this,e)},$ve.Qb=function(){!function(){throw Jb(new _m)}()},$ve.Ob=function(){return lO(this)},$ve.Pb=function(){return vM(this.a)?iV(this.a):iV(this.b)},$j(fTe,"LPort/CombineIter/1",200),Vle(1257,1,oSe,Dt),$ve.Lb=function(e){return fU(e)},$ve.Fb=function(e){return this===e},$ve.Mb=function(e){return B0(),0!=xL(e,11).e.c.length},$j(fTe,"LPort/lambda$0$Type",1257),Vle(1256,1,oSe,Ft),$ve.Lb=function(e){return hU(e)},$ve.Fb=function(e){return this===e},$ve.Mb=function(e){return B0(),0!=xL(e,11).g.c.length},$j(fTe,"LPort/lambda$1$Type",1256),Vle(1258,1,oSe,Ut),$ve.Lb=function(e){return B0(),xL(e,11).j==(Lwe(),Q9e)},$ve.Fb=function(e){return this===e},$ve.Mb=function(e){return B0(),xL(e,11).j==(Lwe(),Q9e)},$j(fTe,"LPort/lambda$2$Type",1258),Vle(1259,1,oSe,jt),$ve.Lb=function(e){return B0(),xL(e,11).j==(Lwe(),Z9e)},$ve.Fb=function(e){return this===e},$ve.Mb=function(e){return B0(),xL(e,11).j==(Lwe(),Z9e)},$j(fTe,"LPort/lambda$3$Type",1259),Vle(1260,1,oSe,Bt),$ve.Lb=function(e){return B0(),xL(e,11).j==(Lwe(),g7e)},$ve.Fb=function(e){return this===e},$ve.Mb=function(e){return B0(),xL(e,11).j==(Lwe(),g7e)},$j(fTe,"LPort/lambda$4$Type",1260),Vle(1261,1,oSe,zt),$ve.Lb=function(e){return B0(),xL(e,11).j==(Lwe(),m7e)},$ve.Fb=function(e){return this===e},$ve.Mb=function(e){return B0(),xL(e,11).j==(Lwe(),m7e)},$j(fTe,"LPort/lambda$5$Type",1261),Vle(29,299,{3:1,19:1,299:1,29:1,94:1,134:1},rB),$ve.Hc=function(e){Jq(this,e)},$ve.Ic=function(){return new td(this.a)},$ve.Ib=function(){return"L_"+YK(this.b.b,this,0)+Yae(this.a)},$j(fTe,"Layer",29),Vle(1313,1,{},Km),$j(xTe,TTe,1313),Vle(1317,1,{},$t),$ve.Kb=function(e){return Jie(xL(e,93))},$j(xTe,"ElkGraphImporter/0methodref$connectableShapeToNode$Type",1317),Vle(1320,1,{},Ht),$ve.Kb=function(e){return Jie(xL(e,93))},$j(xTe,"ElkGraphImporter/1methodref$connectableShapeToNode$Type",1320),Vle(1314,1,Iye,np),$ve.td=function(e){vle(this.a,xL(e,122))},$j(xTe,ATe,1314),Vle(1315,1,Iye,rp),$ve.td=function(e){vle(this.a,xL(e,122))},$j(xTe,kTe,1315),Vle(1316,1,{},Gt),$ve.Kb=function(e){return new JD(null,new LG(function(e){return!e.c&&(e.c=new VR(ket,e,5,8)),e.c}(xL(e,80)),16))},$j(xTe,CTe,1316),Vle(1318,1,tEe,ip),$ve.Mb=function(e){return function(e,t){return DQ(t,kH(e))}(this.a,xL(e,34))},$j(xTe,MTe,1318),Vle(1319,1,{},Vt),$ve.Kb=function(e){return new JD(null,new LG(function(e){return!e.b&&(e.b=new VR(ket,e,4,7)),e.b}(xL(e,80)),16))},$j(xTe,"ElkGraphImporter/lambda$5$Type",1319),Vle(1321,1,tEe,ap),$ve.Mb=function(e){return function(e,t){return DQ(t,kH(e))}(this.a,xL(e,34))},$j(xTe,"ElkGraphImporter/lambda$7$Type",1321),Vle(1322,1,tEe,Wt),$ve.Mb=function(e){return function(e){return Zce(e)&&Av(ON(gue(e,(mve(),PKe))))}(xL(e,80))},$j(xTe,"ElkGraphImporter/lambda$8$Type",1322),Vle(1250,1,{},$u),$j(xTe,"ElkGraphLayoutTransferrer",1250),Vle(1251,1,tEe,op),$ve.Mb=function(e){return function(e,t){return AS(),!_2(t.d.i,e)}(this.a,xL(e,18))},$j(xTe,"ElkGraphLayoutTransferrer/lambda$0$Type",1251),Vle(1252,1,Iye,sp),$ve.td=function(e){AS(),SL(this.a,xL(e,18))},$j(xTe,"ElkGraphLayoutTransferrer/lambda$1$Type",1252),Vle(1253,1,tEe,cp),$ve.Mb=function(e){return function(e,t){return AS(),_2(t.d.i,e)}(this.a,xL(e,18))},$j(xTe,"ElkGraphLayoutTransferrer/lambda$2$Type",1253),Vle(1254,1,Iye,lp),$ve.td=function(e){AS(),SL(this.a,xL(e,18))},$j(xTe,"ElkGraphLayoutTransferrer/lambda$3$Type",1254),Vle(1455,1,uTe,qt),$ve.nf=function(e,t){!function(e,t){Qie(t,ITe,1),aS(DZ(new JD(null,new LG(e.b,16)),new Xt),new Yt),Toe(t)}(xL(e,38),t)},$j(OTe,"CommentNodeMarginCalculator",1455),Vle(1456,1,{},Xt),$ve.Kb=function(e){return new JD(null,new LG(xL(e,29).a,16))},$j(OTe,"CommentNodeMarginCalculator/lambda$0$Type",1456),Vle(1457,1,Iye,Yt),$ve.td=function(e){!function(e){var t,n,i,a,o,s,c,l,u,f,h,d;if(c=e.d,h=xL(Hae(e,(Nve(),vqe)),14),t=xL(Hae(e,vWe),14),h||t){if(o=Mv(NN(q9(e,(mve(),LZe)))),s=Mv(NN(q9(e,DZe))),d=0,h){for(u=0,a=h.Ic();a.Ob();)i=xL(a.Pb(),10),u=r.Math.max(u,i.o.b),d+=i.o.a;d+=o*(h.gc()-1),c.d+=u+s}if(n=0,t){for(u=0,a=t.Ic();a.Ob();)i=xL(a.Pb(),10),u=r.Math.max(u,i.o.b),n+=i.o.a;n+=o*(t.gc()-1),c.a+=u+s}(l=r.Math.max(d,n))>e.o.a&&(f=(l-e.o.a)/2,c.b=r.Math.max(c.b,f),c.c=r.Math.max(c.c,f))}}(xL(e,10))},$j(OTe,"CommentNodeMarginCalculator/lambda$1$Type",1457),Vle(1458,1,uTe,Kt),$ve.nf=function(e,t){!function(e,t){var n,r,i,a,o,s,c;for(Qie(t,"Comment post-processing",1),a=new td(e.b);a.a0||u.j==m7e&&u.e.c.length-u.g.c.length<0)){t=!1;break}for(i=new td(u.g);i.at.a&&(r.Fc((Eie(),B5e))?e.c.a+=(n.a-t.a)/2:r.Fc($5e)&&(e.c.a+=n.a-t.a)),n.b>t.b&&(r.Fc((Eie(),G5e))?e.c.b+=(n.b-t.b)/2:r.Fc(H5e)&&(e.c.b+=n.b-t.b)),xL(Hae(e,(Nve(),DWe)),21).Fc((Uhe(),YVe))&&(n.a>t.a||n.b>t.b))for(o=new td(e.a);o.a0&&(e.a=s+(f-1)*i,t.c.b+=e.a,t.f.b+=e.a),0!=h.a.gc()&&(f=Gme(new kj(1,i),t,h,d,t.f.b+s-t.c.b))>0&&(t.f.b+=s+(f-1)*i)}(e,t,i),function(e){var t,n,r,i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v,y,E,_,S,x;for(v=new $b,f=new td(e.b);f.a0&&Ipe((dG(0,n.c.length),xL(n.c[0],29)),e),n.c.length>1&&Ipe(xL($D(n,n.c.length-1),29),e),Toe(t)}(xL(e,38),t)},$j(OTe,"HierarchicalPortPositionProcessor",1487),Vle(1488,1,uTe,Gu),$ve.nf=function(e,t){!function(e,t){var n,i,a,o,s,c,l,u,f,h,d,g,b,m,w,v,y,E,_,S,x,T;for(e.b=t,e.a=xL(Hae(t,(mve(),MKe)),20).a,e.c=xL(Hae(t,OKe),20).a,0==e.c&&(e.c=Jve),b=new FV(t.b,0);b.b=e.a&&(i=nbe(e,w),f=r.Math.max(f,i.b),y=r.Math.max(y,i.d),SL(c,new GA(w,i)));for(S=new $b,u=0;u0),b.a.Xb(b.c=--b.b),cR(b,x=new rB(e.b)),wO(b.b0&&SL(e.p,f),SL(e.o,f);g=l+(t-=i),u+=t*e.e,Kq(e.a,c,G6(g)),Kq(e.b,c,u),e.j=r.Math.max(e.j,g),e.k=r.Math.max(e.k,u),e.d+=t,t+=m}}(e),e.q=xL(Hae(t,(mve(),VKe)),259),f=xL(Hae(e.g,GKe),20).a,o=new or,e.q.g){case 2:case 1:default:Ybe(e,o);break;case 3:for(e.q=(Tfe(),$Qe),Ybe(e,o),l=0,c=new td(e.a);c.ae.j&&(e.q=DQe,Ybe(e,o));break;case 4:for(e.q=(Tfe(),$Qe),Ybe(e,o),u=0,a=new td(e.b);a.ae.k&&(e.q=jQe,Ybe(e,o));break;case 6:Ybe(e,new wp(dH(r.Math.ceil(e.f.length*f/100))));break;case 5:Ybe(e,new vp(dH(r.Math.ceil(e.d*f/100))))}!function(e,t){var n,r,i,a,o,s;for(i=new $b,n=0;n<=e.i;n++)(r=new rB(t)).p=e.i-n,i.c[i.c.length]=r;for(s=new td(e.o);s.a=2){for(d=!0,n=xL(iV(u=new td(i.j)),11),f=null;u.a0)}(xL(e,18))},$j(OTe,"PartitionPreprocessor/lambda$2$Type",1547),Vle(1548,1,Iye,mr),$ve.td=function(e){!function(e){var t;$ge(e,!0),t=Jye,HO(e,(mve(),MZe))&&(t+=xL(Hae(e,MZe),20).a),q3(e,MZe,G6(t))}(xL(e,18))},$j(OTe,"PartitionPreprocessor/lambda$3$Type",1548),Vle(1549,1,uTe,Xu),$ve.nf=function(e,t){!function(e,t){var n,r,i,a,o,s;for(Qie(t,"Port order processing",1),s=xL(Hae(e,(mve(),AZe)),415),n=new td(e.b);n.at.d.c){if((h=e.c[t.a.d])==(b=e.c[u.a.d]))continue;Bfe(dS(hS(pS(fS(new Dm,1),100),h),b))}}}(this),function(e){var t,n,r,i,a,o,s;for(a=new iS,i=new td(e.d.a);i.a1)for(t=aO((n=new Fm,++e.b,n),e.d),s=xee(a,0);s.b!=s.d.c;)o=xL(_W(s),119),Bfe(dS(hS(pS(fS(new Dm,1),0),t),o))}(this),vpe(NP(this.d),new qw),a=new td(this.a.a.b);a.as?1:0):0!=t.e.c.length&&0!=n.g.c.length?1:-1}(this,xL(e,11),xL(t,11))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(XTe,"ModelOrderPortComparator",1724),Vle(783,1,{},ua),$ve.Sf=function(e,t){var n,i,a,o;for(a=Ooe(t),n=new $b,o=t.f/a,i=1;i=b&&(SL(o,G6(f)),v=r.Math.max(v,y[f-1]-h),c+=g,m+=y[f-1]-m,h=y[f-1],g=l[f]),g=r.Math.max(g,l[f]),++f;c+=g}(p=r.Math.min(1/v,1/t.b/c))>i&&(i=p,n=o)}return n},$ve.Tf=function(){return!1},$j(YTe,"MSDCutIndexHeuristic",784),Vle(1587,1,uTe,_a),$ve.nf=function(e,t){!function(e,t){var n,r,i,a;if(Qie(t,"Path-Like Graph Wrapping",1),0!=e.b.c.length)if(null==(i=new eue(e)).i&&(i.i=E0(i,new ma)),n=Mv(i.i)*i.f/(null==i.i&&(i.i=E0(i,new ma)),Mv(i.i)),i.b>n)Toe(t);else{switch(xL(Hae(e,(mve(),iQe)),335).g){case 2:a=new ya;break;case 0:a=new ua;break;default:a=new Ea}if(r=a.Sf(e,i),!a.Tf())switch(xL(Hae(e,uQe),336).g){case 2:r=yce(i,r);break;case 1:r=dae(i,r)}!function(e,t,n){var r,i,a,o,s,c,l,u,f,h,d;if(!n.dc()){for(o=0,u=0,h=xL((r=n.Ic()).Pb(),20).a;o=n be true then the node is placed in the last layer of the drawing."),G6(-1)),u5e),LDe),T8(t5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,gAe),dke),"Layer ID"),"Layer identifier that was calculated by ELK Layered for a node"),G6(-1)),u5e),LDe),T8(t5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,bAe),pke),"Upper Bound On Width [MinWidth Layerer]"),"Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."),G6(4)),u5e),LDe),T8(n5e)))),jV(e,bAe,hAe,NXe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,mAe),pke),"Upper Layer Estimation Scaling Factor [MinWidth Layerer]"),"Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."),G6(2)),u5e),LDe),T8(n5e)))),jV(e,mAe,hAe,PXe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,wAe),gke),"Node Promotion Strategy"),"Reduces number of dummy nodes after layering phase (if possible)."),FXe),c5e),XQe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,vAe),gke),"Max Node Promotion Iterations"),"Limits the number of iterations for node promotion."),G6(0)),u5e),LDe),T8(n5e)))),jV(e,vAe,wAe,null),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,yAe),"layering.coffmanGraham"),"Layer Bound"),"The maximum number of nodes allowed per layer."),G6(Jve)),u5e),LDe),T8(n5e)))),jV(e,yAe,hAe,AXe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,EAe),bke),"Crossing Minimization Strategy"),"Strategy for crossing minimization."),Kqe),c5e),nVe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,_Ae),bke),"Hierarchical Sweepiness"),"How likely it is to use cross-hierarchy (1) vs bottom-up (-1)."),.1),s5e),ODe),T8(n5e)))),jV(e,_Ae,mke,Gqe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,SAe),bke),"Semi-Interactive Crossing Minimization"),"Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."),!1),o5e),TDe),T8(n5e)))),jV(e,SAe,EAe,Xqe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,xAe),bke),"Position Choice Constraint"),"Allows to set a constraint regarding the position placement of a node in a layer. Assumed the layer in which the node placed includes n other nodes and i < n. If set to i, it expresses that the node should be placed at the i-th position. Should i>=n be true then the node is placed at the last position in the layer."),G6(-1)),u5e),LDe),T8(t5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,TAe),bke),"Position ID"),"Position within a layer that was determined by ELK Layered for a node."),G6(-1)),u5e),LDe),T8(t5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,AAe),wke),"Greedy Switch Activation Threshold"),"By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."),G6(40)),u5e),LDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,kAe),wke),"Greedy Switch Crossing Minimization"),"Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular crossing minimization as a post-processor. Note that if 'hierarchyHandling' is set to 'INCLUDE_CHILDREN', the 'greedySwitchHierarchical.type' option must be used."),zqe),c5e),hWe),T8(n5e)))),jV(e,kAe,EAe,$qe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,CAe),"crossingMinimization.greedySwitchHierarchical"),"Greedy Switch Crossing Minimization (hierarchical)"),"Activates the greedy switch heuristic in case hierarchical layout is used. The differences to the non-hierarchical case (see 'greedySwitch.type') are: 1) greedy switch is inactive by default, 3) only the option value set on the node at which hierarchical layout starts is relevant, and 2) if it's activated by the user, it properly addresses hierarchy-crossing edges."),Fqe),c5e),hWe),T8(n5e)))),jV(e,CAe,EAe,Uqe),jV(e,CAe,mke,jqe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,MAe),vke),"Node Placement Strategy"),"Strategy for node placement."),aYe),c5e),HQe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,IAe),vke),"Favor Straight Edges Over Balancing"),"Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."),o5e),TDe),T8(n5e)))),jV(e,IAe,MAe,YXe),jV(e,IAe,MAe,KXe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,OAe),yke),"BK Edge Straightening"),"Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."),HXe),c5e),DVe),T8(n5e)))),jV(e,OAe,MAe,GXe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,NAe),yke),"BK Fixed Alignment"),"Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four."),WXe),c5e),GVe),T8(n5e)))),jV(e,NAe,MAe,qXe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,RAe),"nodePlacement.linearSegments"),"Linear Segments Deflection Dampening"),"Dampens the movement of nodes to keep the diagram from getting too large."),.3),s5e),ODe),T8(n5e)))),jV(e,RAe,MAe,QXe),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,PAe),"nodePlacement.networkSimplex"),"Node Flexibility"),"Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."),c5e),RQe),T8(t5e)))),jV(e,PAe,MAe,rYe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,LAe),"nodePlacement.networkSimplex.nodeFlexibility"),"Node Flexibility Default"),"Default value of the 'nodeFlexibility' option for the children of a hierarchical node."),tYe),c5e),RQe),T8(n5e)))),jV(e,LAe,MAe,nYe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,DAe),Eke),"Self-Loop Distribution"),"Alter the distribution of the loops around the node. It only takes effect for PortConstraints.FREE."),cXe),c5e),hJe),T8(t5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,FAe),Eke),"Self-Loop Ordering"),"Alter the ordering of the loops they can either be stacked or sequenced. It only takes effect for PortConstraints.FREE."),uXe),c5e),mJe),T8(t5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,UAe),"edgeRouting.splines"),"Spline Routing Mode"),"Specifies the way control points are assembled for each individual edge. CONSERVATIVE ensures that edges are properly routed around the nodes but feels rather orthogonal at times. SLOPPY uses fewer control points to obtain curvier edge routes but may result in edges overlapping nodes."),hXe),c5e),_Je),T8(n5e)))),jV(e,UAe,_ke,dXe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,jAe),"edgeRouting.splines.sloppy"),"Sloppy Spline Layer Spacing Factor"),"Spacing factor for routing area between layers when using sloppy spline routing."),.2),s5e),ODe),T8(n5e)))),jV(e,jAe,_ke,gXe),jV(e,jAe,UAe,bXe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,BAe),"edgeRouting.polyline"),"Sloped Edge Zone Width"),"Width of the strip to the left and to the right of each layer where the polyline edge router is allowed to refrain from ensuring that edges are routed horizontally. This prevents awkward bend points for nodes that extent almost to the edge of their layer."),2),s5e),ODe),T8(n5e)))),jV(e,BAe,_ke,oXe),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,zAe),Ske),"Spacing Base Value"),"An optional base value for all other layout options of the 'spacing' group. It can be used to conveniently alter the overall 'spaciousness' of the drawing. Whenever an explicit value is set for the other layout options, this base value will have no effect. The base value is not inherited, i.e. it must be set for each hierarchical node."),s5e),ODe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,$Ae),Ske),"Edge Node Between Layers Spacing"),"The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."),10),s5e),ODe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,HAe),Ske),"Edge Edge Between Layer Spacing"),"Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."),10),s5e),ODe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,GAe),Ske),"Node Node Between Layers Spacing"),"The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."),20),s5e),ODe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,VAe),xke),"Direction Priority"),"Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase."),G6(0)),u5e),LDe),T8(J4e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,WAe),xke),"Shortness Priority"),"Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase."),G6(0)),u5e),LDe),T8(J4e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,qAe),xke),"Straightness Priority"),"Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement."),G6(0)),u5e),LDe),T8(J4e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,XAe),Tke),JSe),"Tries to further compact components (disconnected sub-graphs)."),!1),o5e),TDe),T8(n5e)))),jV(e,XAe,Uxe,!0),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,YAe),Ake),"Post Compaction Strategy"),kke),Nqe),c5e),nWe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,KAe),Ake),"Post Compaction Constraint Calculation"),kke),Iqe),c5e),ZGe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,ZAe),Cke),"High Degree Node Treatment"),"Makes room around high degree nodes to place leafs and trees."),!1),o5e),TDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,QAe),Cke),"High Degree Node Threshold"),"Whether a node is considered to have a high degree."),G6(16)),u5e),LDe),T8(n5e)))),jV(e,QAe,ZAe,!0),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,JAe),Cke),"High Degree Node Maximum Tree Height"),"Maximum height of a subtree connected to a high degree node to be moved to separate layers."),G6(5)),u5e),LDe),T8(n5e)))),jV(e,JAe,ZAe,!0),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,eke),Mke),"Graph Wrapping Strategy"),"For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."),jYe),c5e),FJe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,tke),Mke),"Additional Wrapped Edges Spacing"),"To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing."),10),s5e),ODe),T8(n5e)))),jV(e,tke,eke,wYe),jV(e,tke,eke,vYe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,nke),Mke),"Correction Factor for Wrapping"),"At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simply multiplied with the 'aspect ratio' layout option."),1),s5e),ODe),T8(n5e)))),jV(e,nke,eke,EYe),jV(e,nke,eke,_Ye),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,rke),Ike),"Cutting Strategy"),"The strategy by which the layer indexes are determined at which the layering crumbles into chunks."),MYe),c5e),sVe),T8(n5e)))),jV(e,rke,eke,IYe),jV(e,rke,eke,OYe),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,ike),Ike),"Manually Specified Cuts"),"Allows the user to specify her own cuts for a certain graph."),f5e),zLe),T8(n5e)))),jV(e,ike,rke,xYe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,ake),"wrapping.cutting.msd"),"MSD Freedom"),"The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts."),AYe),u5e),LDe),T8(n5e)))),jV(e,ake,rke,kYe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,oke),Oke),"Validification Strategy"),"When wrapping graphs, one can specify indices that are not allowed as split points. The validification strategy makes sure every computed split point is allowed."),GYe),c5e),kJe),T8(n5e)))),jV(e,oke,eke,VYe),jV(e,oke,eke,WYe),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,ske),Oke),"Valid Indices for Wrapping"),null),f5e),zLe),T8(n5e)))),jV(e,ske,eke,zYe),jV(e,ske,eke,$Ye),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,cke),Nke),"Improve Cuts"),"For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought."),!0),o5e),TDe),T8(n5e)))),jV(e,cke,eke,LYe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,lke),Nke),"Distance Penalty When Improving Cuts"),null),2),s5e),ODe),T8(n5e)))),jV(e,lke,eke,RYe),jV(e,lke,cke,!0),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,uke),Nke),"Improve Wrapped Edges"),"The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges."),!0),o5e),TDe),T8(n5e)))),jV(e,uke,eke,FYe),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,fke),Rke),"Edge Label Side Selection"),"Method to decide on edge label sides."),iXe),c5e),CVe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,hke),Rke),"Edge Center Label Placement Strategy"),"Determines in which layer center labels of long edges should be placed."),nXe),c5e),qGe),EF(n5e,m3(ay(p5e,1),Kye,175,0,[e5e]))))),Uve((new ef,e))},$j(KTe,"LayeredMetaDataProvider",827),Vle(966,1,dSe,ef),$ve.Qe=function(e){Uve(e)},$j(KTe,"LayeredOptions",966),Vle(967,1,{},Sa),$ve._e=function(){return new $m},$ve.af=function(e){},$j(KTe,"LayeredOptions/LayeredFactory",967),Vle(1343,1,{}),$ve.a=0,$j(xCe,"ElkSpacings/AbstractSpacingsBuilder",1343),Vle(762,1343,{},f9),$j(KTe,"LayeredSpacings/LayeredSpacingsBuilder",762),Vle(311,22,{3:1,36:1,22:1,311:1,245:1,233:1},kT),$ve.Hf=function(){return que(this)},$ve.Uf=function(){return que(this)};var EQe,_Qe,SQe,xQe,TQe,AQe=BJ(KTe,"LayeringStrategy",311,KLe,(function(){return sae(),m3(ay(AQe,1),Kye,311,0,[wQe,bQe,pQe,gQe,vQe,mQe])}),(function(e){return sae(),zZ((fJ(),EQe),e)}));Vle(196,22,{3:1,36:1,22:1,196:1},CT);var kQe,CQe,MQe,IQe,OQe,NQe,RQe=BJ(KTe,"NodeFlexibility",196,KLe,(function(){return bte(),m3(ay(RQe,1),Kye,196,0,[xQe,TQe,SQe,_Qe])}),(function(e){return bte(),zZ((UK(),kQe),e)}));Vle(312,22,{3:1,36:1,22:1,312:1,245:1,233:1},MT),$ve.Hf=function(){return nue(this)},$ve.Uf=function(){return nue(this)};var PQe,LQe,DQe,FQe,UQe,jQe,BQe,zQe,$Qe,HQe=BJ(KTe,"NodePlacementStrategy",312,KLe,(function(){return Fte(),m3(ay(HQe,1),Kye,312,0,[NQe,MQe,IQe,CQe,OQe])}),(function(e){return Fte(),zZ((nQ(),PQe),e)}));Vle(259,22,{3:1,36:1,22:1,259:1},IT);var GQe,VQe,WQe,qQe,XQe=BJ(KTe,"NodePromotionStrategy",259,KLe,(function(){return Tfe(),m3(ay(XQe,1),Kye,259,0,[zQe,DQe,jQe,FQe,UQe,LQe,BQe,$Qe])}),(function(e){return Tfe(),zZ((w2(),GQe),e)}));Vle(372,22,{3:1,36:1,22:1,372:1},OT);var YQe,KQe,ZQe,QQe=BJ(KTe,"OrderingStrategy",372,KLe,(function(){return p4(),m3(ay(QQe,1),Kye,372,0,[WQe,VQe,qQe])}),(function(e){return p4(),zZ((vY(),YQe),e)}));Vle(415,22,{3:1,36:1,22:1,415:1},NT);var JQe,eJe,tJe,nJe,rJe=BJ(KTe,"PortSortingStrategy",415,KLe,(function(){return cZ(),m3(ay(rJe,1),Kye,415,0,[KQe,ZQe])}),(function(e){return cZ(),zZ((Aq(),JQe),e)}));Vle(446,22,{3:1,36:1,22:1,446:1},RT);var iJe,aJe,oJe,sJe,cJe=BJ(KTe,"PortType",446,KLe,(function(){return t1(),m3(ay(cJe,1),Kye,446,0,[nJe,eJe,tJe])}),(function(e){return t1(),zZ((EY(),iJe),e)}));Vle(373,22,{3:1,36:1,22:1,373:1},PT);var lJe,uJe,fJe,hJe=BJ(KTe,"SelfLoopDistributionStrategy",373,KLe,(function(){return p2(),m3(ay(hJe,1),Kye,373,0,[aJe,oJe,sJe])}),(function(e){return p2(),zZ((yY(),lJe),e)}));Vle(374,22,{3:1,36:1,22:1,374:1},LT);var dJe,pJe,gJe,bJe,mJe=BJ(KTe,"SelfLoopOrderingStrategy",374,KLe,(function(){return aY(),m3(ay(mJe,1),Kye,374,0,[fJe,uJe])}),(function(e){return aY(),zZ((Tq(),dJe),e)}));Vle(302,1,{302:1},Nme),$j(KTe,"Spacings",302),Vle(334,22,{3:1,36:1,22:1,334:1},DT);var wJe,vJe,yJe,EJe,_Je=BJ(KTe,"SplineRoutingMode",334,KLe,(function(){return P5(),m3(ay(_Je,1),Kye,334,0,[pJe,gJe,bJe])}),(function(e){return P5(),zZ((_Y(),wJe),e)}));Vle(336,22,{3:1,36:1,22:1,336:1},FT);var SJe,xJe,TJe,AJe,kJe=BJ(KTe,"ValidifyStrategy",336,KLe,(function(){return j0(),m3(ay(kJe,1),Kye,336,0,[EJe,vJe,yJe])}),(function(e){return j0(),zZ((SY(),SJe),e)}));Vle(375,22,{3:1,36:1,22:1,375:1},UT);var CJe,MJe,IJe,OJe,NJe,RJe,PJe,LJe,DJe,FJe=BJ(KTe,"WrappingStrategy",375,KLe,(function(){return Y2(),m3(ay(FJe,1),Kye,375,0,[TJe,AJe,xJe])}),(function(e){return Y2(),zZ((xY(),CJe),e)}));Vle(1355,1,kCe,Zu),$ve.Vf=function(e){return xL(e,38),MJe},$ve.nf=function(e,t){!function(e,t,n){var r,i,a,o,s,c,l,u;for(Qie(n,"Depth-first cycle removal",1),c=(l=t.a).c.length,e.c=new $b,e.d=HY(_it,bSe,24,c,16,1),e.a=HY(_it,bSe,24,c,16,1),e.b=new $b,a=0,s=new td(l);s.a0?A+1:1);for(o=new td(E.g);o.a0?A+1:1)}0==e.c[l]?oD(e.d,g):0==e.a[l]&&oD(e.e,g),++l}for(p=-1,d=1,f=new $b,k=xL(Hae(t,(Nve(),lqe)),228);N>0;){for(;0!=e.d.b;)M=xL(pL(e.d),10),e.b[M.p]=p--,Epe(e,M),--N;for(;0!=e.e.b;)I=xL(pL(e.e),10),e.b[I.p]=d++,Epe(e,I),--N;if(N>0){for(h=iEe,w=new td(v);w.a=h&&(y>h&&(f.c=HY(LLe,aye,1,0,5,1),h=y),f.c[f.c.length]=g);u=xL($D(f,wte(k,f.c.length)),10),e.b[u.p]=d++,Epe(e,u),--N}}for(C=v.c.length+1,l=0;le.b[O]&&($ge(r,!0),q3(t,AWe,(pO(),!0)));e.a=null,e.c=null,e.b=null,qz(e.e),qz(e.d),Toe(n)}(this,xL(e,38),t)},$j(CCe,"GreedyCycleBreaker",1354),Vle(1356,1,kCe,Qu),$ve.Vf=function(e){return xL(e,38),OJe},$ve.nf=function(e,t){!function(e,t,n){var r,i,a,o,s,c,l,u,f,h,d,p;for(Qie(n,"Interactive cycle breaking",1),u=new $b,h=new td(t.a);h.a0&&use(e,s,u);for(i=new td(u);i.a=_||!b7(w,r))&&(r=_G(t,u)),mG(w,r),a=new lU(NI(P8(w).a.Ic(),new p));Wle(a);)i=xL(qq(a),18),e.a[i.p]||(b=i.c.i,--e.e[b.p],0==e.e[b.p]&&hY(Aae(d,b)));for(l=u.c.length-1;l>=0;--l)SL(t.b,(dG(l,u.c.length),xL(u.c[l],29)));t.a.c=HY(LLe,aye,1,0,5,1),Toe(n)}else Toe(n)}(this,xL(e,38),t)},$j(MCe,"CoffmanGrahamLayerer",1359),Vle(1360,1,$_e,Wp),$ve.ue=function(e,t){return function(e,t,n){var r,i,a,o,s,c;for(r=xL(MX(e.c,t),14),i=xL(MX(e.c,n),14),a=r.Xc(r.gc()),o=i.Xc(i.gc());a.Sb()&&o.Sb();)if((s=xL(a.Ub(),20))!=(c=xL(o.Ub(),20)))return _M(s.a,c.a);return a.Ob()||o.Ob()?a.Ob()?1:-1:0}(this.a,xL(e,10),xL(t,10))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(MCe,"CoffmanGrahamLayerer/0methodref$compareNodesInTopo$Type",1360),Vle(1361,1,$_e,qp),$ve.ue=function(e,t){return function(e,t,n){return-_M(e.f[t.p],e.f[n.p])}(this.a,xL(e,10),xL(t,10))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(MCe,"CoffmanGrahamLayerer/lambda$1$Type",1361),Vle(1362,1,kCe,xa),$ve.Vf=function(e){return xL(e,38),AD(AD(AD(new nW,(Gae(),Ize),(Pve(),sHe)),Oze,bHe),Nze,gHe)},$ve.nf=function(e,t){!function(e,t,n){var i,a,o,s,c,l,u,f,h,d,p,g,b,m,w;for(Qie(n,"Interactive node layering",1),i=new $b,p=new td(t.a);p.a=l){wO(w.b>0),w.a.Xb(w.c=--w.b);break}b.a>u&&(a?(a3(a.b,b.b),a.a=r.Math.max(a.a,b.a),HB(w)):(SL(b.b,h),b.c=r.Math.min(b.c,u),b.a=r.Math.max(b.a,l),a=b))}a||((a=new Qm).c=u,a.a=l,cR(w,a),SL(a.b,h))}for(c=t.b,f=0,m=new td(i);m.a1)for(g=HY(Eit,kEe,24,e.b.b.c.length,15,1),f=0,u=new td(e.b.b);u.at.p?-1:0}(xL(e,10),xL(t,10))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(MCe,"StretchWidthLayerer/1",1364),Vle(451,1,ICe),$ve.Kf=function(e,t,n,r,i,a){},$ve.Xf=function(e,t,n){return Cpe(this,e,t,n)},$ve.Jf=function(){this.g=HY(Ait,OCe,24,this.d,15,1),this.f=HY(Ait,OCe,24,this.d,15,1)},$ve.Lf=function(e,t){this.e[e]=HY(Eit,kEe,24,t[e].length,15,1)},$ve.Mf=function(e,t,n){n[e][t].p=t,this.e[e][t]=t},$ve.Nf=function(e,t,n,r){xL($D(r[e][t].j,n),11).p=this.d++},$ve.b=0,$ve.c=0,$ve.d=0,$j(NCe,"AbstractBarycenterPortDistributor",451),Vle(1603,1,$_e,Yp),$ve.ue=function(e,t){return function(e,t,n){var r,i,a,o;return(a=t.j)!=(o=n.j)?a.g-o.g:(r=e.f[t.p],i=e.f[n.p],0==r&&0==i?0:0==r?-1:0==i?1:r8(r,i))}(this.a,xL(e,11),xL(t,11))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(NCe,"AbstractBarycenterPortDistributor/lambda$0$Type",1603),Vle(1774,1,GTe,tW),$ve.Kf=function(e,t,n,r,i,a){},$ve.Mf=function(e,t,n){},$ve.Nf=function(e,t,n,r){},$ve.If=function(){return!1},$ve.Jf=function(){this.a=this.c.a,this.e=this.d.g},$ve.Lf=function(e,t){t[e][0].c.p=e},$ve.Of=function(){return!1},$ve.Pf=function(e,t,n,r){var i,a,o,s,c,l,u;for(t!=XD(n,e.length)&&(a=e[t-(n?1:-1)],XX(this.d,a,n?(t1(),tJe):(t1(),eJe))),i=e[t][0],u=!r||i.k==(yoe(),f$e),h5(this,l=NX(e[t]),u,!1,n),o=0,c=new td(l);c.a"),e0?RH(this.a,e[t-1],e[t]):!n&&t0&&(n+=c.n.a+c.o.a/2,++f),d=new td(c.j);d.a0&&(n/=f),b=HY(Tit,o_e,24,r.a.c.length,15,1),s=0,l=new td(r.a);l.a1&&(i.j==(Lwe(),Z9e)?this.b[e]=!0:i.j==m7e&&e>0&&(this.b[e-1]=!0))},$ve.f=0,$j(HTe,"AllCrossingsCounter",1770),Vle(578,1,{},a0),$ve.b=0,$ve.d=0,$j(HTe,"BinaryIndexedTree",578),Vle(517,1,{},hP),$j(HTe,"CrossingsCounter",517),Vle(1878,1,$_e,ig),$ve.ue=function(e,t){return function(e,t,n){return _M(e.d[t.p],e.d[n.p])}(this.a,xL(e,11),xL(t,11))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(HTe,"CrossingsCounter/lambda$0$Type",1878),Vle(1879,1,$_e,ag),$ve.ue=function(e,t){return function(e,t,n){return _M(e.d[t.p],e.d[n.p])}(this.a,xL(e,11),xL(t,11))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(HTe,"CrossingsCounter/lambda$1$Type",1879),Vle(1880,1,$_e,og),$ve.ue=function(e,t){return function(e,t,n){return _M(e.d[t.p],e.d[n.p])}(this.a,xL(e,11),xL(t,11))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(HTe,"CrossingsCounter/lambda$2$Type",1880),Vle(1881,1,$_e,sg),$ve.ue=function(e,t){return function(e,t,n){return _M(e.d[t.p],e.d[n.p])}(this.a,xL(e,11),xL(t,11))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(HTe,"CrossingsCounter/lambda$3$Type",1881),Vle(1882,1,Iye,cg),$ve.td=function(e){!function(e,t){YP(),SL(e,new GA(t,G6(t.e.c.length+t.g.c.length)))}(this.a,xL(e,11))},$j(HTe,"CrossingsCounter/lambda$4$Type",1882),Vle(1883,1,tEe,lg),$ve.Mb=function(e){return function(e,t){return YP(),t!=e}(this.a,xL(e,11))},$j(HTe,"CrossingsCounter/lambda$5$Type",1883),Vle(1884,1,Iye,ug),$ve.td=function(e){YT(this,e)},$j(HTe,"CrossingsCounter/lambda$6$Type",1884),Vle(1885,1,Iye,zT),$ve.td=function(e){var t;YP(),yW(this.b,(t=this.a,xL(e,11),t))},$j(HTe,"CrossingsCounter/lambda$7$Type",1885),Vle(805,1,oSe,$a),$ve.Lb=function(e){return YP(),HO(xL(e,11),(Nve(),oqe))},$ve.Fb=function(e){return this===e},$ve.Mb=function(e){return YP(),HO(xL(e,11),(Nve(),oqe))},$j(HTe,"CrossingsCounter/lambda$8$Type",805),Vle(1877,1,{},fg),$j(HTe,"HyperedgeCrossingsCounter",1877),Vle(461,1,{36:1,461:1},xR),$ve.wd=function(e){return function(e,t){return e.et.e?1:e.ft.f?1:L4(e)-L4(t)}(this,xL(e,461))},$ve.b=0,$ve.c=0,$ve.e=0,$ve.f=0;var KJe=$j(HTe,"HyperedgeCrossingsCounter/Hyperedge",461);Vle(359,1,{36:1,359:1},vz),$ve.wd=function(e){return function(e,t){return e.ct.c?1:e.bt.b?1:e.a!=t.a?L4(e.a)-L4(t.a):e.d==(NW(),QJe)&&t.d==ZJe?-1:e.d==ZJe&&t.d==QJe?1:0}(this,xL(e,359))},$ve.b=0,$ve.c=0;var ZJe,QJe,JJe=$j(HTe,"HyperedgeCrossingsCounter/HyperedgeCorner",359);Vle(516,22,{3:1,36:1,22:1,516:1},BT);var e1e,t1e,n1e,r1e,i1e,a1e=BJ(HTe,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",516,KLe,(function(){return NW(),m3(ay(a1e,1),Kye,516,0,[QJe,ZJe])}),(function(e){return NW(),zZ((Oq(),e1e),e)}));Vle(1374,1,kCe,of),$ve.Vf=function(e){return xL(Hae(xL(e,38),(Nve(),DWe)),21).Fc((Uhe(),YVe))?t1e:null},$ve.nf=function(e,t){!function(e,t,n){var r;for(Qie(n,"Interactive node placement",1),e.a=xL(Hae(t,(Nve(),dqe)),302),r=new td(t.b);r.a=0){for(c=null,s=new FV(u.a,l+1);s.b0&&l[i]&&(g=xM(e.b,l[i],a)),b=r.Math.max(b,a.c.c.b+g);for(o=new td(f.e);o.aE)?(l=2,s=Jve):0==l?(l=1,s=S):(l=0,s=S):(d=S>=s||s-S<_,s=S,d&&--a)}while(!(d&&a<=0))}(e,t),function(e){var t,n,i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v,y,E,_,S,x,T,A;for(y=0,E=(v=e.a).length;y0?(f=xL($D(h.c.a,o-1),10),x=xM(e.b,h,f),b=h.n.b-h.d.d-(f.n.b+f.o.b+f.d.a+x)):b=h.n.b-h.d.d,l=r.Math.min(b,l),o1},$j(RCe,"NetworkSimplexPlacer/lambda$18$Type",1400),Vle(1401,1,Iye,Ez),$ve.td=function(e){!function(e,t,n,r,i){lG(),Bfe(dS(hS(fS(pS(new Dm,0),i.d.e-e),t),i.d)),Bfe(dS(hS(fS(pS(new Dm,0),n-i.a.e),i.a),r))}(this.c,this.b,this.d,this.a,xL(e,397))},$ve.c=0,$ve.d=0,$j(RCe,"NetworkSimplexPlacer/lambda$19$Type",1401),Vle(1384,1,{},Ha),$ve.Kb=function(e){return lG(),new JD(null,new LG(xL(e,29).a,16))},$j(RCe,"NetworkSimplexPlacer/lambda$2$Type",1384),Vle(1402,1,Iye,gg),$ve.td=function(e){!function(e,t){lG(),t.n.b+=e}(this.a,xL(e,11))},$ve.a=0,$j(RCe,"NetworkSimplexPlacer/lambda$20$Type",1402),Vle(1403,1,{},Ga),$ve.Kb=function(e){return lG(),new JD(null,new LG(xL(e,29).a,16))},$j(RCe,"NetworkSimplexPlacer/lambda$21$Type",1403),Vle(1404,1,Iye,bg),$ve.td=function(e){!function(e,t){e.j[t.p]=function(e){var t,n,r,i;for(t=0,n=0,i=new td(e.j);i.a1||n>1)return 2;return t+n==1?2:0}(t)}(this.a,xL(e,10))},$j(RCe,"NetworkSimplexPlacer/lambda$22$Type",1404),Vle(1405,1,tEe,Va),$ve.Mb=function(e){return jN(e)},$j(RCe,"NetworkSimplexPlacer/lambda$23$Type",1405),Vle(1406,1,{},Wa),$ve.Kb=function(e){return lG(),new JD(null,new LG(xL(e,29).a,16))},$j(RCe,"NetworkSimplexPlacer/lambda$24$Type",1406),Vle(1407,1,tEe,mg),$ve.Mb=function(e){return function(e,t){return 2==e.j[t.p]}(this.a,xL(e,10))},$j(RCe,"NetworkSimplexPlacer/lambda$25$Type",1407),Vle(1408,1,Iye,GT),$ve.td=function(e){!function(e,t,n){var r,i,a;for(i=new lU(NI(R8(n).a.Ic(),new p));Wle(i);)gX(r=xL(qq(i),18))||!gX(r)&&r.c.i.c==r.d.i.c||(a=gfe(e,r,n,new uw)).c.length>1&&(t.c[t.c.length]=a)}(this.a,this.b,xL(e,10))},$j(RCe,"NetworkSimplexPlacer/lambda$26$Type",1408),Vle(1409,1,tEe,qa),$ve.Mb=function(e){return lG(),!gX(xL(e,18))},$j(RCe,"NetworkSimplexPlacer/lambda$27$Type",1409),Vle(1410,1,tEe,Xa),$ve.Mb=function(e){return lG(),!gX(xL(e,18))},$j(RCe,"NetworkSimplexPlacer/lambda$28$Type",1410),Vle(1411,1,{},wg),$ve.Ce=function(e,t){return function(e,t,n){return function(e,t,n){var r,i,a,o,s,c,l,u;for(c=new $b,s=new td(t.a);s.a0),a=xL(l.a.Xb(l.c=--l.b),18);a!=r&&l.b>0;)e.a[a.p]=!0,e.a[r.p]=!0,wO(l.b>0),a=xL(l.a.Xb(l.c=--l.b),18);l.b>0&&HB(l)}}(e,t,n),n}(this.a,xL(e,29),xL(t,29))},$j(RCe,"NetworkSimplexPlacer/lambda$29$Type",1411),Vle(1385,1,{},Ya),$ve.Kb=function(e){return lG(),new JD(null,new dj(new lU(NI(L8(xL(e,10)).a.Ic(),new p))))},$j(RCe,"NetworkSimplexPlacer/lambda$3$Type",1385),Vle(1386,1,tEe,Ka),$ve.Mb=function(e){return lG(),function(e){return lG(),!(gX(e)||!gX(e)&&e.c.i.c==e.d.i.c)}(xL(e,18))},$j(RCe,"NetworkSimplexPlacer/lambda$4$Type",1386),Vle(1387,1,Iye,vg),$ve.td=function(e){!function(e,t){var n,i,a,o,s,c,l,u,f,h,d;n=aO(new Fm,e.f),c=e.i[t.c.i.p],h=e.i[t.d.i.p],s=t.c,f=t.d,o=s.a.b,u=f.a.b,c.b||(o+=s.n.b),h.b||(u+=f.n.b),l=dH(r.Math.max(0,o-u)),a=dH(r.Math.max(0,u-o)),d=r.Math.max(1,xL(Hae(t,(mve(),OZe)),20).a)*gq(t.c.i.k,t.d.i.k),i=new $T(Bfe(dS(hS(fS(pS(new Dm,d),a),n),xL(qj(e.k,t.c),119))),Bfe(dS(hS(fS(pS(new Dm,d),l),n),xL(qj(e.k,t.d),119)))),e.c[t.p]=i}(this.a,xL(e,18))},$j(RCe,"NetworkSimplexPlacer/lambda$5$Type",1387),Vle(1388,1,{},Za),$ve.Kb=function(e){return lG(),new JD(null,new LG(xL(e,29).a,16))},$j(RCe,"NetworkSimplexPlacer/lambda$6$Type",1388),Vle(1389,1,tEe,Qa),$ve.Mb=function(e){return lG(),xL(e,10).k==(yoe(),p$e)},$j(RCe,"NetworkSimplexPlacer/lambda$7$Type",1389),Vle(1390,1,{},Ja),$ve.Kb=function(e){return lG(),new JD(null,new dj(new lU(NI(R8(xL(e,10)).a.Ic(),new p))))},$j(RCe,"NetworkSimplexPlacer/lambda$8$Type",1390),Vle(1391,1,tEe,eo),$ve.Mb=function(e){return lG(),function(e){return!gX(e)&&e.c.i.c==e.d.i.c}(xL(e,18))},$j(RCe,"NetworkSimplexPlacer/lambda$9$Type",1391),Vle(1373,1,kCe,pf),$ve.Vf=function(e){return xL(Hae(xL(e,38),(Nve(),DWe)),21).Fc((Uhe(),YVe))?l1e:null},$ve.nf=function(e,t){!function(e,t){var n,i,a,o,s,c,l,u,f,h;for(Qie(t,"Simple node placement",1),h=xL(Hae(e,(Nve(),dqe)),302),c=0,o=new td(e.b);o.a0?(d=(p-1)*n,s&&(d+=r),u&&(d+=r),d0&&(E-=g),gme(s,E),f=0,d=new td(s.a);d.a0),c.a.Xb(c.c=--c.b)),l=.4*i*f,!o&&c.b"+this.b+" ("+(null!=(e=this.c).f?e.f:""+e.g)+")";var e},$ve.d=0,$j(UCe,"HyperEdgeSegmentDependency",129),Vle(513,22,{3:1,36:1,22:1,513:1},ZT);var F1e,U1e,j1e,B1e,z1e,$1e,H1e,G1e,V1e=BJ(UCe,"HyperEdgeSegmentDependency/DependencyType",513,KLe,(function(){return iY(),m3(ay(V1e,1),Kye,513,0,[L1e,P1e])}),(function(e){return iY(),zZ((Iq(),F1e),e)}));Vle(1787,1,{},Eg),$j(UCe,"HyperEdgeSegmentSplitter",1787),Vle(1788,1,{},jy),$ve.a=0,$ve.b=0,$j(UCe,"HyperEdgeSegmentSplitter/AreaRating",1788),Vle(327,1,{327:1},nL),$ve.a=0,$ve.b=0,$ve.c=0,$j(UCe,"HyperEdgeSegmentSplitter/FreeArea",327),Vle(1789,1,$_e,vo),$ve.ue=function(e,t){return function(e,t){return r8(e.c-e.s,t.c-t.s)}(xL(e,111),xL(t,111))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(UCe,"HyperEdgeSegmentSplitter/lambda$0$Type",1789),Vle(1790,1,Iye,_z),$ve.td=function(e){!function(e,t,n,r,i){var a;a=function(e,t,n){var r,i,a,o,s,c;for(a=-1,s=-1,o=0;oe.c));o++)i.a>=e.s&&(a<0&&(a=o),s=o);return c=(e.s+e.c)/2,a>=0&&(r=function(e,t,n,r){var i,a,o,s,c,l,u,f,h,d,p;if(a=n,n=n&&(r=t,a=(c=(s.c+s.a)/2)-n,s.c<=c-n&&mF(e,r++,new nL(s.c,a)),(o=c+n)<=s.a&&(i=new nL(o,s.a),MH(r,e.c.length),KT(e.c,r,i)))}(t,r,n)),c}(i,n,r),SL(t,function(e,t){for(e.r=new j2(e.p),function(e,t){e.r=t}(e.r,e),w0(e.r.j,e.j),qz(e.j),oD(e.j,t),oD(e.r.e,t),xj(e),xj(e.r);0!=e.f.c.length;)TM(xL($D(e.f,0),129));for(;0!=e.k.c.length;)TM(xL($D(e.k,0),129));return e.r}(i,a)),function(e,t,n){var r,i,a,o;for(a=t.q,o=t.r,new TG((iY(),P1e),t,a,1),new TG(P1e,a,o,1),i=new td(n);i.aMxe&&(a=e,i=new HA(h,o=f),oD(s.a,i),qpe(this,s,a,i,!1),(d=e.r)&&(i=new HA(p=Mv(NN(Iee(d.e,0))),o),oD(s.a,i),qpe(this,s,a,i,!1),a=d,i=new HA(p,o=t+d.o*n),oD(s.a,i),qpe(this,s,a,i,!1)),i=new HA(b,o),oD(s.a,i),qpe(this,s,a,i,!1)))},$ve._f=function(e){return e.i.n.a+e.n.a+e.a.a},$ve.ag=function(){return Lwe(),g7e},$ve.bg=function(){return Lwe(),Q9e},$j(jCe,"NorthToSouthRoutingStrategy",1779),Vle(1780,649,{},pw),$ve.$f=function(e,t,n){var i,a,o,s,c,l,u,f,h,d,p,g,b;if(!e.r||e.q)for(f=t-e.o*n,u=new td(e.n);u.aMxe&&(a=e,i=new HA(h,o=f),oD(s.a,i),qpe(this,s,a,i,!1),(d=e.r)&&(i=new HA(p=Mv(NN(Iee(d.e,0))),o),oD(s.a,i),qpe(this,s,a,i,!1),a=d,i=new HA(p,o=t-d.o*n),oD(s.a,i),qpe(this,s,a,i,!1)),i=new HA(b,o),oD(s.a,i),qpe(this,s,a,i,!1)))},$ve._f=function(e){return e.i.n.a+e.n.a+e.a.a},$ve.ag=function(){return Lwe(),Q9e},$ve.bg=function(){return Lwe(),g7e},$j(jCe,"SouthToNorthRoutingStrategy",1780),Vle(1778,649,{},gw),$ve.$f=function(e,t,n){var i,a,o,s,c,l,u,f,h,d,p,g,b;if(!e.r||e.q)for(f=t+e.o*n,u=new td(e.n);u.aMxe&&(a=e,i=new HA(o=f,h),oD(s.a,i),qpe(this,s,a,i,!0),(d=e.r)&&(i=new HA(o,p=Mv(NN(Iee(d.e,0)))),oD(s.a,i),qpe(this,s,a,i,!0),a=d,i=new HA(o=t+d.o*n,p),oD(s.a,i),qpe(this,s,a,i,!0)),i=new HA(o,b),oD(s.a,i),qpe(this,s,a,i,!0)))},$ve._f=function(e){return e.i.n.b+e.n.b+e.a.b},$ve.ag=function(){return Lwe(),Z9e},$ve.bg=function(){return Lwe(),m7e},$j(jCe,"WestToEastRoutingStrategy",1778),Vle(794,1,{},Gge),$ve.Ib=function(){return Yae(this.a)},$ve.b=0,$ve.c=!1,$ve.d=!1,$ve.f=0,$j(zCe,"NubSpline",794),Vle(402,1,{402:1},lhe,V$),$j(zCe,"NubSpline/PolarCP",402),Vle(1422,1,kCe,Pne),$ve.Vf=function(e){return function(e){var t,n;return r2(t=new nW,U1e),(n=xL(Hae(e,(Nve(),DWe)),21)).Fc((Uhe(),tWe))&&r2(t,$1e),n.Fc(WVe)&&r2(t,j1e),n.Fc(JVe)&&r2(t,z1e),n.Fc(XVe)&&r2(t,B1e),t}(xL(e,38))},$ve.nf=function(e,t){!function(e,t,n){var i,a,o,s,c,l,u,f,h,d,p,g,b,m,w,v,y,E,_,S,x,T,A,k,C;if(Qie(n,"Spline edge routing",1),0==t.b.c.length)return t.f.a=0,void Toe(n);w=Mv(NN(Hae(t,(mve(),XZe)))),c=Mv(NN(Hae(t,$Ze))),s=Mv(NN(Hae(t,jZe))),x=xL(Hae(t,xKe),334)==(P5(),bJe),S=Mv(NN(Hae(t,TKe))),e.d=t,e.j.c=HY(LLe,aye,1,0,5,1),e.a.c=HY(LLe,aye,1,0,5,1),zU(e.k),f=Nk((l=xL($D(t.b,0),29)).a,(rhe(),N1e)),h=Nk((g=xL($D(t.b,t.b.c.length-1),29)).a,N1e),b=new td(t.b),m=null,C=0;do{for(zwe(e,m,v=b.a0?(u=0,m&&(u+=c),u+=(T-1)*s,v&&(u+=c),x&&v&&(u=r.Math.max(u,Xfe(v,s,w,S))),u("+this.c+") "+this.b},$ve.c=0,$j(zCe,"SplineEdgeRouter/Dependency",267),Vle(448,22,{3:1,36:1,22:1,448:1},QT);var W1e,q1e,X1e,Y1e,K1e,Z1e=BJ(zCe,"SplineEdgeRouter/SideToProcess",448,KLe,(function(){return W$(),m3(ay(Z1e,1),Kye,448,0,[H1e,G1e])}),(function(e){return W$(),zZ((Pq(),W1e),e)}));Vle(1423,1,tEe,wo),$ve.Mb=function(e){return ihe(),!xL(e,128).o},$j(zCe,"SplineEdgeRouter/lambda$0$Type",1423),Vle(1424,1,{},mo),$ve.Ge=function(e){return ihe(),xL(e,128).v+1},$j(zCe,"SplineEdgeRouter/lambda$1$Type",1424),Vle(1425,1,Iye,jA),$ve.td=function(e){!function(e,t,n){zB(e.b,xL(n.b,18),t)}(this.a,this.b,xL(e,46))},$j(zCe,"SplineEdgeRouter/lambda$2$Type",1425),Vle(1426,1,Iye,BA),$ve.td=function(e){!function(e,t,n){zB(e.b,xL(n.b,18),t)}(this.a,this.b,xL(e,46))},$j(zCe,"SplineEdgeRouter/lambda$3$Type",1426),Vle(128,1,{36:1,128:1},zse,ume),$ve.wd=function(e){return function(e,t){return e.s-t.s}(this,xL(e,128))},$ve.b=0,$ve.e=!1,$ve.f=0,$ve.g=0,$ve.j=!1,$ve.k=!1,$ve.n=0,$ve.o=!1,$ve.p=!1,$ve.q=!1,$ve.s=0,$ve.u=0,$ve.v=0,$ve.F=0,$j(zCe,"SplineSegment",128),Vle(453,1,{453:1},ho),$ve.a=0,$ve.b=!1,$ve.c=!1,$ve.d=!1,$ve.e=!1,$ve.f=0,$j(zCe,"SplineSegment/EdgeInformation",453),Vle(1207,1,{},fo),$j(WCe,yxe,1207),Vle(1208,1,$_e,po),$ve.ue=function(e,t){return function(e,t){var n,r,i;return 0==(n=xL(Hae(t,(xoe(),D0e)),20).a-xL(Hae(e,D0e),20).a)?(r=IR(kM(xL(Hae(e,(Sme(),l0e)),8)),xL(Hae(e,u0e),8)),i=IR(kM(xL(Hae(t,l0e),8)),xL(Hae(t,u0e),8)),r8(r.a*r.b,i.a*i.b)):n}(xL(e,135),xL(t,135))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(WCe,Exe,1208),Vle(1206,1,{},qE),$j(WCe,"MrTree",1206),Vle(389,22,{3:1,36:1,22:1,389:1,245:1,233:1},JT),$ve.Hf=function(){return zce(this)},$ve.Uf=function(){return zce(this)};var Q1e,J1e=BJ(WCe,"TreeLayoutPhases",389,KLe,(function(){return rre(),m3(ay(J1e,1),Kye,389,0,[q1e,X1e,Y1e,K1e])}),(function(e){return rre(),zZ((iZ(),Q1e),e)}));Vle(1103,207,ZSe,TR),$ve.$e=function(e,t){var n,i,a,o,s,c;for(L2(s=new lY,e),q3(s,(Sme(),v0e),e),function(e,t,n){var i,a,o,s,c;for(o=0,a=new gI((!e.a&&(e.a=new AU(Let,e,10,11)),e.a));a.e!=a.i.gc();)s="",0==(!(i=xL(aee(a),34)).n&&(i.n=new AU(Pet,i,1,7)),i.n).i||(s=xL(FQ((!i.n&&(i.n=new AU(Pet,i,1,7)),i.n),0),137).a),L2(c=new j4(o++,t,s),i),q3(c,(Sme(),v0e),i),c.e.b=i.j+i.f/2,c.f.a=r.Math.max(i.g,1),c.e.a=i.i+i.g/2,c.f.b=r.Math.max(i.f,1),oD(t.b,c),tce(n.f,i,c)}(e,s,c=new Hb),function(e,t,n){var r,i,a,o,s,c,l;for(o=new gI((!e.a&&(e.a=new AU(Let,e,10,11)),e.a));o.e!=o.i.gc();)for(i=new lU(NI(efe(a=xL(aee(o),34)).a.Ic(),new p));Wle(i);)Ple(r=xL(qq(i),80))||Ple(r)||Zce(r)||(c=xL(Tk(H$(n.f,a)),83),l=xL(qj(n,Jie(xL(FQ((!r.c&&(r.c=new VR(ket,r,5,8)),r.c),0),93))),83),c&&l&&(q3(s=new t$(c,l),(Sme(),v0e),r),L2(s,r),oD(c.d,s),oD(l.b,s),oD(t.a,s)))}(e,s,c),o=s,i=new td(a=function(e,t){var n,r,i,a,o,s,c;if(null==(c=ON(Hae(t,(xoe(),U0e))))||(sB(c),c)){for(function(e,t){var n,r,i,a,o;for(i=t.b.b,e.a=HY(zLe,mxe,14,i,0,1),e.b=HY(_it,bSe,24,i,16,1),o=xee(t.b,0);o.b!=o.d.c;)a=xL(_W(o),83),e.a[a.g]=new iS;for(r=xee(t.a,0);r.b!=r.d.c;)n=xL(_W(r),188),e.a[n.b.g].Dc(n),e.a[n.c.g].Dc(n)}(e,t),i=new $b,s=xee(t.b,0);s.b!=s.d.c;)(n=Ase(e,xL(_W(s),83),null))&&(L2(n,t),i.c[i.c.length]=n);if(e.a=null,e.b=null,i.c.length>1)for(r=new td(i);r.ah&&(k=0,C+=f+S,f=0),rfe(E,s,k,C),t=r.Math.max(t,k+_.a),f=r.Math.max(f,_.b),k+=_.a+S;for(y=new Hb,n=new Hb,T=new td(e);T.a"+JG(this.c):"e_"+L4(this)},$j(qCe,"TEdge",188),Vle(135,134,{3:1,135:1,94:1,134:1},lY),$ve.Ib=function(){var e,t,n,r,i;for(i=null,r=xee(this.b,0);r.b!=r.d.c;)i+=(null==(n=xL(_W(r),83)).c||0==n.c.length?"n_"+n.g:"n_"+n.c)+"\n";for(t=xee(this.a,0);t.b!=t.d.c;)i+=((e=xL(_W(t),188)).b&&e.c?JG(e.b)+"->"+JG(e.c):"e_"+L4(e))+"\n";return i};var e0e=$j(qCe,"TGraph",135);Vle(623,493,{3:1,493:1,623:1,94:1,134:1}),$j(qCe,"TShape",623),Vle(83,623,{3:1,493:1,83:1,623:1,94:1,134:1},j4),$ve.Ib=function(){return JG(this)};var t0e,n0e,r0e,i0e,a0e,o0e,s0e=$j(qCe,"TNode",83);Vle(254,1,Lye,_g),$ve.Hc=function(e){Jq(this,e)},$ve.Ic=function(){return new Sg(xee(this.a.d,0))},$j(qCe,"TNode/2",254),Vle(355,1,dye,Sg),$ve.Nb=function(e){NU(this,e)},$ve.Pb=function(){return xL(_W(this.a),188).c},$ve.Ob=function(){return PE(this.a)},$ve.Qb=function(){CQ(this.a)},$j(qCe,"TNode/2/1",355),Vle(1812,1,uTe,AR),$ve.nf=function(e,t){Tge(this,xL(e,135),t)},$j(XCe,"FanProcessor",1812),Vle(325,22,{3:1,36:1,22:1,325:1,233:1},eA),$ve.Hf=function(){switch(this.g){case 0:return new Gw;case 1:return new AR;case 2:return new ko;case 3:return new To;case 4:return new Mo;case 5:return new Io;default:throw Jb(new Rv(PTe+(null!=this.f?this.f:""+this.g)))}};var c0e,l0e,u0e,f0e,h0e,d0e,p0e,g0e,b0e,m0e,w0e,v0e,y0e,E0e,_0e,S0e,x0e,T0e,A0e,k0e,C0e,M0e,I0e,O0e,N0e,R0e,P0e,L0e,D0e,F0e,U0e,j0e,B0e,z0e,$0e,H0e=BJ(XCe,LTe,325,KLe,(function(){return kse(),m3(ay(H0e,1),Kye,325,0,[o0e,n0e,i0e,r0e,a0e,t0e])}),(function(e){return kse(),zZ((lJ(),c0e),e)}));Vle(1815,1,uTe,To),$ve.nf=function(e,t){Eue(this,xL(e,135),t)},$ve.a=0,$j(XCe,"LevelHeightProcessor",1815),Vle(1816,1,Lye,Ao),$ve.Hc=function(e){Jq(this,e)},$ve.Ic=function(){return i$(),K_(),bFe},$j(XCe,"LevelHeightProcessor/1",1816),Vle(1813,1,uTe,ko),$ve.nf=function(e,t){Fse(this,xL(e,135),t)},$ve.a=0,$j(XCe,"NeighborsProcessor",1813),Vle(1814,1,Lye,Co),$ve.Hc=function(e){Jq(this,e)},$ve.Ic=function(){return i$(),K_(),bFe},$j(XCe,"NeighborsProcessor/1",1814),Vle(1817,1,uTe,Mo),$ve.nf=function(e,t){yue(this,xL(e,135),t)},$ve.a=0,$j(XCe,"NodePositionProcessor",1817),Vle(1811,1,uTe,Gw),$ve.nf=function(e,t){!function(e,t){var n,r,i,a,o,s,c;for(e.a.c=HY(LLe,aye,1,0,5,1),r=xee(t.b,0);r.b!=r.d.c;)0==(n=xL(_W(r),83)).b.b&&(q3(n,(Sme(),T0e),(pO(),!0)),SL(e.a,n));switch(e.a.c.length){case 0:q3(i=new j4(0,t,"DUMMY_ROOT"),(Sme(),T0e),(pO(),!0)),q3(i,h0e,!0),oD(t.b,i);break;case 1:break;default:for(a=new j4(0,t,"SUPER_ROOT"),s=new td(e.a);s.arMe&&(a-=rMe),u=(c=xL(gue(i,s8e),8)).a,h=c.b+e,(o=r.Math.atan2(h,u))<0&&(o+=rMe),(o+=t)>rMe&&(o-=rMe),hM(),eJ(1e-10),r.Math.abs(a-o)<=1e-10||a==o||isNaN(a)&&isNaN(o)?0:ao?1:bC(isNaN(a),isNaN(o))}(this.a,this.b,xL(e,34),xL(t,34))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$ve.a=0,$ve.b=0,$j(nMe,"RadialUtil/lambda$0$Type",544),Vle(1346,1,uTe,No),$ve.nf=function(e,t){!function(e){var t,n,i,a,o,s,c,l,u,f,h,d,p,g,b,m;for(s=bxe,c=bxe,a=iMe,o=iMe,f=new gI((!e.a&&(e.a=new AU(Let,e,10,11)),e.a));f.e!=f.i.gc();)p=(l=xL(aee(f),34)).i,g=l.j,m=l.g,n=l.f,i=xL(gue(l,(Ove(),x6e)),141),s=r.Math.min(s,p-i.b),c=r.Math.min(c,g-i.d),a=r.Math.max(a,p+m+i.c),o=r.Math.max(o,g+n+i.a);for(h=new HA(s-(d=xL(gue(e,(Ove(),U6e)),115)).b,c-d.d),u=new gI((!e.a&&(e.a=new AU(Let,e,10,11)),e.a));u.e!=u.i.gc();)EJ(l=xL(aee(u),34),l.i-h.a),_J(l,l.j-h.b);b=a-s+(d.b+d.c),t=o-c+(d.d+d.a),yJ(e,b),vJ(e,t)}(xL(e,34))},$j(aMe,"CalculateGraphSize",1346),Vle(436,22,{3:1,36:1,22:1,436:1,233:1},iA),$ve.Hf=function(){switch(this.g){case 0:return new Uo;case 1:return new Ro;case 2:return new No;default:throw Jb(new Rv(PTe+(null!=this.f?this.f:""+this.g)))}};var c2e,l2e,u2e,f2e=BJ(aMe,LTe,436,KLe,(function(){return c9(),m3(ay(f2e,1),Kye,436,0,[o2e,i2e,a2e])}),(function(e){return c9(),zZ((MY(),c2e),e)}));Vle(635,1,{}),$ve.e=1,$ve.g=0,$j(oMe,"AbstractRadiusExtensionCompaction",635),Vle(1743,635,{},JO),$ve.cg=function(e){var t,n,r,i,a,o,s,c,l;for(this.c=xL(gue(e,(wN(),J0e)),34),function(e,t){e.f=t}(this,this.c),this.d=lte(xL(gue(e,(l5(),L2e)),293)),(c=xL(gue(e,M2e),20))&&Th(this,c.a),Ah(this,(sB(s=NN(gue(e,(Ove(),S8e)))),s)),l=jhe(this.c),this.d&&this.d.gg(l),function(e,t){var n,r,i;for(r=new td(t);r.at){if(Zge(c,xL($D(c.a,c.a.c.length-1),181),o,t,n))continue;i+=c.b,l.c[l.c.length]=c,HG(c=new nB(i),new U4(0,c.e,c,n))}0==(r=xL($D(c.a,c.a.c.length-1),181)).b.c.length||o.f+n>=r.o&&o.f+n<=r.f||.5*r.a<=o.f+n&&1.5*r.a>=o.f+n?X8(r,o):(HG(c,a=new U4(r.s+r.r,c.e,c,n)),X8(a,o))}return l.c[l.c.length]=c,l}(t,n,e.g),a.n&&a.n&&o&&oV(a,WV(o),(a5(),K7e)),e.b)for(g=0;gr?1:0}(xL(e,34),xL(t,34))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(xMe,"RectPackingLayoutProvider/lambda$0$Type",1110),Vle(1230,1,{},KP),$ve.a=0,$ve.c=!1,$j(TMe,"AreaApproximation",1230);var K2e,Z2e,Q2e,J2e=TD(TMe,"BestCandidateFilter");Vle(628,1,{519:1},qo),$ve.hg=function(e,t){var n,i,a,o,s,c;for(c=new $b,a=e_e,s=new td(e);s.a0?1:bC(isNaN(i),isNaN(0)))>=0^(eJ(LCe),(r.Math.abs(c)<=LCe||0==c||isNaN(c)&&isNaN(0)?0:c<0?-1:c>0?1:bC(isNaN(c),isNaN(0)))>=0)?r.Math.max(c,i):(eJ(LCe),(r.Math.abs(i)<=LCe||0==i||isNaN(i)&&isNaN(0)?0:i<0?-1:i>0?1:bC(isNaN(i),isNaN(0)))>0?r.Math.sqrt(c*c+i*i):-r.Math.sqrt(c*c+i*i))}(o=i.b,s=a.b),n>=0?n:(c=dB(IR(new HA(s.c+s.b/2,s.d+s.a/2),new HA(o.c+o.b/2,o.d+o.a/2))),-(ege(o,s)-1)*c)}(this.a,e)},$j(jMe,MTe,1223),Vle(1106,207,ZSe,XE),$ve.$e=function(e,t){var n,r,i,a,o,s,c,l,u,f;for(GY(e,(qae(),d4e))&&(f=RN(gue(e,(zte(),L4e))),(a=zde(e1(),f))&&xL(Q$(a.f),207).$e(e,P0(t,1))),Zee(e,c4e,(oY(),V3e)),Zee(e,l4e,(joe(),Z3e)),Zee(e,u4e,(K2(),B4e)),o=xL(gue(e,(zte(),O4e)),20).a,Qie(t,"Overlap removal",1),Av(ON(gue(e,I4e))),c=new Cg(s=new Om),n=_ve(r=new R5,e),l=!0,i=0;i1)for(r=new td(e.a);r.a>>28]|t[e>>24&15]<<4|t[e>>20&15]<<8|t[e>>16&15]<<12|t[e>>12&15]<<16|t[e>>8&15]<<20|t[e>>4&15]<<24|t[15&e]<<28);var e,t},$ve.Gf=function(e){var t,n,r;for(n=0;n0&&G5((pG(t-1,e.length),e.charCodeAt(t-1)),wTe);)--t;if(n>=t)throw Jb(new Rv("The given string does not contain any numbers."));if(2!=(r=ipe(e.substr(n,t-n),",|;|\r|\n")).length)throw Jb(new Rv("Exactly two numbers are expected, "+r.length+" were found."));try{this.a=woe(Jae(r[0])),this.b=woe(Jae(r[1]))}catch(e){throw RM(e=H2(e),127)?Jb(new Rv(vTe+e)):Jb(e)}},$ve.Ib=function(){return"("+this.a+","+this.b+")"},$ve.a=0,$ve.b=0;var v5e=$j(yTe,"KVector",8);Vle(74,68,{3:1,4:1,19:1,28:1,51:1,15:1,68:1,14:1,74:1,409:1},mw,aE,tN),$ve.Nc=function(){return function(e){var t,n,r;for(t=0,r=HY(v5e,kye,8,e.b,0,1),n=xee(e,0);n.b!=n.d.c;)r[t++]=xL(_W(n),8);return r}(this)},$ve.Gf=function(e){var t,n,r,i,a;n=ipe(e,",|;|\\(|\\)|\\[|\\]|\\{|\\}| |\t|\n"),qz(this);try{for(t=0,i=0,r=0,a=0;t0&&(i%2==0?r=woe(n[t]):a=woe(n[t]),i>0&&i%2!=0&&oD(this,new HA(r,a)),++i),++t}catch(e){throw RM(e=H2(e),127)?Jb(new Rv("The given string does not match the expected format for vectors."+e)):Jb(e)}},$ve.Ib=function(){var e,t,n;for(e=new zI("("),t=xee(this,0);t.b!=t.d.c;)Bk(e,(n=xL(_W(t),8)).a+","+n.b),t.b!=t.d.c&&(e.a+="; ");return(e.a+=")",e).a};var y5e,E5e,_5e,S5e,x5e,T5e,A5e=$j(yTe,"KVectorChain",74);Vle(247,22,{3:1,36:1,22:1,247:1},mA);var k5e,C5e,M5e,I5e,O5e,N5e,R5e,P5e,L5e,D5e,F5e,U5e,j5e,B5e,z5e,$5e,H5e,G5e,V5e,W5e=BJ(pIe,"Alignment",247,KLe,(function(){return mte(),m3(ay(W5e,1),Kye,247,0,[y5e,S5e,x5e,T5e,E5e,_5e])}),(function(e){return mte(),zZ((hJ(),k5e),e)}));Vle(943,1,dSe,wf),$ve.Qe=function(e){Ype(e)},$j(pIe,"BoxLayouterOptions",943),Vle(944,1,{},Fs),$ve._e=function(){return new Bs},$ve.af=function(e){},$j(pIe,"BoxLayouterOptions/BoxFactory",944),Vle(290,22,{3:1,36:1,22:1,290:1},wA);var q5e,X5e,Y5e,K5e,Z5e,Q5e,J5e,e6e,t6e,n6e,r6e,i6e,a6e,o6e,s6e,c6e,l6e,u6e,f6e,h6e,d6e,p6e,g6e,b6e,m6e,w6e,v6e,y6e,E6e,_6e,S6e,x6e,T6e,A6e,k6e,C6e,M6e,I6e,O6e,N6e,R6e,P6e,L6e,D6e,F6e,U6e,j6e,B6e,z6e,$6e,H6e,G6e,V6e,W6e,q6e,X6e,Y6e,K6e,Z6e,Q6e,J6e,e8e,t8e,n8e,r8e,i8e,a8e,o8e,s8e,c8e,l8e,u8e,f8e,h8e,d8e,p8e,g8e,b8e,m8e,w8e,v8e,y8e,E8e,_8e,S8e,x8e,T8e,A8e,k8e,C8e,M8e,I8e,O8e,N8e,R8e=BJ(pIe,"ContentAlignment",290,KLe,(function(){return Eie(),m3(ay(R8e,1),Kye,290,0,[V5e,G5e,H5e,z5e,B5e,$5e])}),(function(e){return Eie(),zZ((dJ(),q5e),e)}));Vle(671,1,dSe,Af),$ve.Qe=function(e){q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,wIe),""),"Layout Algorithm"),"Select a specific layout algorithm."),(wse(),h5e)),eFe),T8((kee(),n5e))))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,vIe),""),"Resolved Layout Algorithm"),"Meta data associated with the selected algorithm."),f5e),Q4e),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Xke),""),"Alignment"),"Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm."),K5e),c5e),W5e),T8(t5e)))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,hxe),""),"Aspect Ratio"),"The desired aspect ratio of the drawing, that is the quotient of width by height."),s5e),ODe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,yIe),""),"Bend Points"),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),f5e),A5e),T8(J4e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,uCe),""),"Content Alignment"),"Specifies how the content of compound nodes is to be aligned, e.g. top-left."),r6e),l5e),R8e),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,qke),""),"Debug Mode"),"Whether additional debug information shall be generated."),(pO(),!1)),o5e),TDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Jke),""),zSe),"Overall direction of edges: horizontal (right / left) or vertical (down / up)."),o6e),c5e),U8e),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,_ke),""),"Edge Routing"),"What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline."),f6e),c5e),Q8e),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,LMe),""),"Expand Nodes"),"If active, nodes are expanded to fill the area of their parent."),!1),o5e),TDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,mke),""),"Hierarchy Handling"),"Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."),b6e),c5e),b9e),EF(n5e,m3(ay(p5e,1),Kye,175,0,[t5e]))))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,dxe),""),"Padding"),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),j6e),f5e),T$e),EF(n5e,m3(ay(p5e,1),Kye,175,0,[t5e]))))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,jxe),""),"Interactive"),"Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible."),!1),o5e),TDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,SCe),""),"interactive Layout"),"Whether the graph should be changeable interactively and by setting constraints"),!1),o5e),TDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Bxe),""),"Port Constraints"),"Defines constraints of the position of the ports of a node."),J6e),c5e),Y9e),T8(t5e)))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,yCe),""),"Position"),"The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."),f5e),v5e),EF(t5e,m3(ay(p5e,1),Kye,175,0,[r5e,e5e]))))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,Pxe),""),"Priority"),"Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used."),u5e),LDe),EF(t5e,m3(ay(p5e,1),Kye,175,0,[J4e]))))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,Fxe),""),"Randomization Seed"),"Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time)."),u5e),LDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,Uxe),""),"Separate Connected Components"),"Whether each connected component should be processed separately."),o5e),TDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,hCe),""),"Junction Points"),"This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order."),S6e),f5e),A5e),T8(J4e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,gCe),""),"Comment Box"),"Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related."),!1),o5e),TDe),T8(t5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,bCe),""),"Hypernode"),"Whether the node should be handled as a hypernode."),!1),o5e),TDe),T8(t5e)))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,EIe),""),"Label Manager"),"Label managers can shorten labels upon a layout algorithm's request."),f5e),Cit),EF(n5e,m3(ay(p5e,1),Kye,175,0,[e5e]))))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,ECe),""),"Margins"),"Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."),T6e),f5e),l$e),T8(t5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Vke),""),"No Layout"),"No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."),!1),o5e),TDe),EF(t5e,m3(ay(p5e,1),Kye,175,0,[J4e,r5e,e5e]))))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,_Ie),""),"Scale Factor"),"The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."),1),s5e),ODe),T8(t5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,SIe),""),"Animate"),"Whether the shift from the old layout to the new computed layout shall be animated."),!0),o5e),TDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,xIe),""),"Animation Time Factor"),"Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."),G6(100)),u5e),LDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,TIe),""),"Layout Ancestors"),"Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process."),!1),o5e),TDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,AIe),""),"Maximal Animation Time"),"The maximal time for animations, in milliseconds."),G6(4e3)),u5e),LDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,kIe),""),"Minimal Animation Time"),"The minimal time for animations, in milliseconds."),G6(400)),u5e),LDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,CIe),""),"Progress Bar"),"Whether a progress bar shall be displayed during layout computations."),!1),o5e),TDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,MIe),""),"Validate Graph"),"Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!1),o5e),TDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,IIe),""),"Validate Options"),"Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!0),o5e),TDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,OIe),""),"Zoom to Fit"),"Whether the zoom level shall be set to view the whole diagram after layout."),!1),o5e),TDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,mIe),"box"),"Box Layout Mode"),"Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better."),e6e),c5e),X7e),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Pke),Ske),"Comment Comment Spacing"),"Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing."),10),s5e),ODe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Lke),Ske),"Comment Node Spacing"),"Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing."),10),s5e),ODe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,uxe),Ske),"Components Spacing"),"Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."),20),s5e),ODe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Dke),Ske),"Edge Spacing"),"Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines."),10),s5e),ODe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Dxe),Ske),"Edge Label Spacing"),"The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."),2),s5e),ODe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Fke),Ske),"Edge Node Spacing"),"Spacing to be preserved between nodes and edges."),10),s5e),ODe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Uke),Ske),"Label Spacing"),"Determines the amount of space to be left between two labels of the same graph element."),0),s5e),ODe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Bke),Ske),"Label Node Spacing"),"Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."),5),s5e),ODe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,jke),Ske),"Label Port Spacing"),"Spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),s5e),ODe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Lxe),Ske),"Node Spacing"),"The minimal distance to be preserved between each two nodes."),20),s5e),ODe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,zke),Ske),"Node Self Loop Spacing"),"Spacing to be preserved between a node and its self loops."),10),s5e),ODe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,$ke),Ske),"Port Spacing"),"Spacing between pairs of ports of the same node."),10),s5e),ODe),EF(n5e,m3(ay(p5e,1),Kye,175,0,[t5e]))))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,Hke),Ske),"Individual Spacing"),"Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent."),f5e),J7e),EF(t5e,m3(ay(p5e,1),Kye,175,0,[J4e,r5e,e5e]))))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,_Ce),Ske),"Additional Port Space"),"Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border."),A8e),f5e),l$e),T8(n5e)))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,vCe),DIe),"Layout Partition"),"Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction)."),u5e),LDe),EF(n5e,m3(ay(p5e,1),Kye,175,0,[t5e]))))),jV(e,vCe,wCe,H6e),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,wCe),DIe),"Layout Partitioning"),"Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle."),z6e),o5e),TDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,tCe),FIe),"Node Label Padding"),"Define padding for node labels that are placed inside of a node."),k6e),f5e),T$e),T8(t5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,eCe),FIe),"Node Label Placement"),"Hints for where node labels are to be placed; if empty, the node label's position is not modified."),M6e),l5e),P9e),EF(t5e,m3(ay(p5e,1),Kye,175,0,[e5e]))))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,aCe),UIe),"Port Alignment"),"Defines the default port distribution for a node. May be overridden for each side individually."),V6e),c5e),$9e),T8(t5e)))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,oCe),UIe),"Port Alignment (North)"),"Defines how ports on the northern side are placed, overriding the node's general port alignment."),c5e),$9e),T8(t5e)))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,sCe),UIe),"Port Alignment (South)"),"Defines how ports on the southern side are placed, overriding the node's general port alignment."),c5e),$9e),T8(t5e)))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,cCe),UIe),"Port Alignment (West)"),"Defines how ports on the western side are placed, overriding the node's general port alignment."),c5e),$9e),T8(t5e)))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,lCe),UIe),"Port Alignment (East)"),"Defines how ports on the eastern side are placed, overriding the node's general port alignment."),c5e),$9e),T8(t5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Zke),jIe),"Node Size Constraints"),"What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed."),O6e),l5e),B7e),T8(t5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Qke),jIe),"Node Size Options"),"Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications."),D6e),l5e),W7e),T8(t5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,fCe),jIe),"Node Size Minimum"),"The minimal size to which a node can be reduced."),P6e),f5e),v5e),T8(t5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,NIe),jIe),"Fixed Graph Size"),"By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so."),!1),o5e),TDe),T8(n5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,dCe),Rke),"Edge Label Placement"),"Gives a hint on where to put edge labels."),l6e),c5e),G8e),T8(e5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,zxe),Rke),"Inline Edge Labels"),"If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."),!1),o5e),TDe),T8(e5e)))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,RIe),"font"),"Font Name"),"Font name used for a label."),h5e),eFe),T8(e5e)))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,PIe),"font"),"Font Size"),"Font size used for a label."),u5e),LDe),T8(e5e)))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,mCe),BIe),"Port Anchor Offset"),"The offset to the port position where connections shall be attached."),f5e),v5e),T8(r5e)))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,pCe),BIe),"Port Index"),"The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."),u5e),LDe),T8(r5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Wke),BIe),"Port Side"),"The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."),o8e),c5e),M7e),T8(r5e)))),q8(e,new fse(tE(eE(nE(Ky(Jy(Zy(Qy(new Ds,Gke),BIe),"Port Border Offset"),"The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."),s5e),ODe),T8(r5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,nCe),zIe),"Port Label Placement"),"Decides on a placement method for port labels; if empty, the node label's position is not modified."),r8e),l5e),w7e),T8(t5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,rCe),zIe),"Port Labels Next to Port"),"Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE."),!1),o5e),TDe),T8(t5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,iCe),zIe),"Treat Port Labels as Group"),"If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port."),!0),o5e),TDe),T8(t5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Yke),$Ie),"Activate Inside Self Loops"),"Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."),!1),o5e),TDe),T8(t5e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,Kke),$Ie),"Inside Self Loop"),"Whether a self loop should be routed inside a node instead of around that node."),!1),o5e),TDe),T8(J4e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,fxe),"edge"),"Edge Thickness"),"The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it."),1),s5e),ODe),T8(J4e)))),q8(e,new fse(tE(eE(nE(Yy(Ky(Jy(Zy(Qy(new Ds,LIe),"edge"),"Edge Type"),"The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations."),d6e),c5e),u9e),T8(J4e)))),jS(e,new SG($y(Gy(Xy(new ps,STe),"Layered"),'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.'))),jS(e,new SG($y(Gy(Xy(new ps,"org.eclipse.elk.orthogonal"),"Orthogonal"),'Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia \'86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.'))),jS(e,new SG($y(Gy(Xy(new ps,Rxe),"Force"),"Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984."))),jS(e,new SG($y(Gy(Xy(new ps,"org.eclipse.elk.circle"),"Circle"),"Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph."))),jS(e,new SG($y(Gy(Xy(new ps,tMe),"Tree"),"Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type."))),jS(e,new SG($y(Gy(Xy(new ps,"org.eclipse.elk.planar"),"Planar"),"Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable."))),jS(e,new SG($y(Gy(Xy(new ps,wMe),"Radial"),"Radial layout algorithms usually position the nodes of the graph on concentric circles."))),epe((new vf,e)),Ype((new wf,e)),ede((new kf,e))},$j(pIe,"CoreOptions",671),Vle(108,22,{3:1,36:1,22:1,108:1},vA);var P8e,L8e,D8e,F8e,U8e=BJ(pIe,zSe,108,KLe,(function(){return K6(),m3(ay(U8e,1),Kye,108,0,[O8e,I8e,M8e,C8e,N8e])}),(function(e){return K6(),zZ((uQ(),P8e),e)}));Vle(271,22,{3:1,36:1,22:1,271:1},yA);var j8e,B8e,z8e,$8e,H8e,G8e=BJ(pIe,"EdgeLabelPlacement",271,KLe,(function(){return mJ(),m3(ay(G8e,1),Kye,271,0,[L8e,D8e,F8e])}),(function(e){return mJ(),zZ((FY(),j8e),e)}));Vle(216,22,{3:1,36:1,22:1,216:1},EA);var V8e,W8e,q8e,X8e,Y8e,K8e,Z8e,Q8e=BJ(pIe,"EdgeRouting",216,KLe,(function(){return o9(),m3(ay(Q8e,1),Kye,216,0,[H8e,z8e,B8e,$8e])}),(function(e){return o9(),zZ((eZ(),V8e),e)}));Vle(310,22,{3:1,36:1,22:1,310:1},_A);var J8e,e9e,t9e,n9e,r9e,i9e,a9e,o9e,s9e,c9e,l9e,u9e=BJ(pIe,"EdgeType",310,KLe,(function(){return xae(),m3(ay(u9e,1),Kye,310,0,[K8e,X8e,Z8e,W8e,Y8e,q8e])}),(function(e){return xae(),zZ((uJ(),J8e),e)}));Vle(941,1,dSe,vf),$ve.Qe=function(e){epe(e)},$j(pIe,"FixedLayouterOptions",941),Vle(942,1,{},Us),$ve._e=function(){return new Ws},$ve.af=function(e){},$j(pIe,"FixedLayouterOptions/FixedFactory",942),Vle(332,22,{3:1,36:1,22:1,332:1},SA);var f9e,h9e,d9e,p9e,g9e,b9e=BJ(pIe,"HierarchyHandling",332,KLe,(function(){return Z6(),m3(ay(b9e,1),Kye,332,0,[c9e,s9e,l9e])}),(function(e){return Z6(),zZ((UY(),f9e),e)}));Vle(284,22,{3:1,36:1,22:1,284:1},xA);var m9e,w9e,v9e,y9e,E9e,_9e,S9e,x9e,T9e,A9e,k9e=BJ(pIe,"LabelSide",284,KLe,(function(){return are(),m3(ay(k9e,1),Kye,284,0,[g9e,h9e,d9e,p9e])}),(function(e){return are(),zZ((tZ(),m9e),e)}));Vle(92,22,{3:1,36:1,22:1,92:1},TA);var C9e,M9e,I9e,O9e,N9e,R9e,P9e=BJ(pIe,"NodeLabelPlacement",92,KLe,(function(){return mue(),m3(ay(P9e,1),Kye,92,0,[v9e,w9e,E9e,A9e,T9e,x9e,_9e,S9e,y9e])}),(function(e){return mue(),zZ((Z2(),C9e),e)}));Vle(248,22,{3:1,36:1,22:1,248:1},AA);var L9e,D9e,F9e,U9e,j9e,B9e,z9e,$9e=BJ(pIe,"PortAlignment",248,KLe,(function(){return Cee(),m3(ay($9e,1),Kye,248,0,[O9e,R9e,M9e,I9e,N9e])}),(function(e){return Cee(),zZ((cQ(),L9e),e)}));Vle(100,22,{3:1,36:1,22:1,100:1},kA);var H9e,G9e,V9e,W9e,q9e,X9e,Y9e=BJ(pIe,"PortConstraints",100,KLe,(function(){return Hie(),m3(ay(Y9e,1),Kye,100,0,[z9e,B9e,j9e,D9e,U9e,F9e])}),(function(e){return Hie(),zZ((pJ(),H9e),e)}));Vle(291,22,{3:1,36:1,22:1,291:1},CA);var K9e,Z9e,Q9e,J9e,e7e,t7e,n7e,r7e,i7e,a7e,o7e,s7e,c7e,l7e,u7e,f7e,h7e,d7e,p7e,g7e,b7e,m7e,w7e=BJ(pIe,"PortLabelPlacement",291,KLe,(function(){return lae(),m3(ay(w7e,1),Kye,291,0,[q9e,V9e,W9e,G9e,X9e])}),(function(e){return lae(),zZ((lQ(),K9e),e)}));Vle(61,22,{3:1,36:1,22:1,61:1},MA);var v7e,y7e,E7e,_7e,S7e,x7e,T7e,A7e,k7e,C7e,M7e=BJ(pIe,"PortSide",61,KLe,(function(){return Lwe(),m3(ay(M7e,1),sTe,61,0,[b7e,Q9e,Z9e,g7e,m7e])}),(function(e){return Lwe(),zZ((tQ(),v7e),e)}));Vle(945,1,dSe,kf),$ve.Qe=function(e){ede(e)},$j(pIe,"RandomLayouterOptions",945),Vle(946,1,{},js),$ve._e=function(){return new Js},$ve.af=function(e){},$j(pIe,"RandomLayouterOptions/RandomFactory",946),Vle(371,22,{3:1,36:1,22:1,371:1},IA);var I7e,O7e,N7e,R7e,P7e,L7e,D7e,F7e,U7e,j7e,B7e=BJ(pIe,"SizeConstraint",371,KLe,(function(){return x7(),m3(ay(B7e,1),Kye,371,0,[k7e,C7e,A7e,T7e])}),(function(e){return x7(),zZ((nZ(),I7e),e)}));Vle(258,22,{3:1,36:1,22:1,258:1},OA);var z7e,$7e,H7e,G7e,V7e,W7e=BJ(pIe,"SizeOptions",258,KLe,(function(){return Tpe(),m3(ay(W7e,1),Kye,258,0,[R7e,L7e,N7e,D7e,F7e,j7e,U7e,P7e,O7e])}),(function(e){return Tpe(),zZ((Q2(),z7e),e)}));Vle(367,1,{1921:1},qw),$ve.b=!1,$ve.c=0,$ve.d=-1,$ve.e=null,$ve.f=null,$ve.g=-1,$ve.j=!1,$ve.k=!1,$ve.n=!1,$ve.o=0,$ve.q=0,$ve.r=0,$j(xCe,"BasicProgressMonitor",367),Vle(936,207,ZSe,Bs),$ve.$e=function(e,t){var n,i,a,o,s,c,l,u,f;Qie(t,"Box layout",2),a=Iv(NN(gue(e,(Xae(),j5e)))),o=xL(gue(e,D5e),115),n=Av(ON(gue(e,O5e))),i=Av(ON(gue(e,N5e))),0===xL(gue(e,M5e),309).g?(c=new AP((!e.a&&(e.a=new AU(Let,e,10,11)),e.a)),i$(),wM(c,new Lg(i)),s=c,l=Zoe(e),(null==(u=NN(gue(e,C5e)))||(sB(u),u<=0))&&(u=1.3),$we(e,(f=function(e,t,n,i,a,o,s){var c,l,u,f,h,d,p,g,b,m,w,v,y,E,_,S,x,T,A,k,C,M,I;for(p=0,A=0,l=new td(e);l.ap&&(o&&(Vk(_,d),Vk(x,G6(u.b-1))),M=n.b,I+=d+t,d=0,f=r.Math.max(f,n.b+n.c+C)),EJ(c,M),_J(c,I),f=r.Math.max(f,M+C+n.c),d=r.Math.max(d,h),M+=C+t;if(f=r.Math.max(f,i),(k=I+d+n.a)2*a?(u=new QQ(f),l=KD(o)/YD(o),c=ive(u,t,new sw,n,r,i,l),MR(Kk(u.e),c),f.c=HY(LLe,aye,1,0,5,1),a=0,f.c[f.c.length]=u,f.c[f.c.length]=o,a=KD(u)*YD(u)+KD(o)*YD(o)):(f.c[f.c.length]=o,a+=KD(o)*YD(o));return f}(s,t,f.a,f.b,(l=i,sB(a),l));break;case 1:p=function(e,t,n,r,i){var a,o,s,c,l,u,f,h,d;for(i$(),wM(e,new zs),o=AL(e),d=new $b,h=new $b,s=null,c=0;0!=o.b;)a=xL(0==o.b?null:(wO(0!=o.b),UQ(o,o.a.a)),157),!s||KD(s)*YD(s)/21&&(c>KD(s)*YD(s)/2||0==o.b)&&(f=new QQ(h),u=KD(s)/YD(s),l=ive(f,t,new sw,n,r,i,u),MR(Kk(f.e),l),s=f,d.c[d.c.length]=f,c=0,h.c=HY(LLe,aye,1,0,5,1)));return a3(d,h),d}(s,t,f.a,f.b,(u=i,sB(a),u));break;default:p=function(e,t,n,r,i){var a,o,s,c,l,u,f,h,d;for(s=HY(Tit,o_e,24,e.c.length,15,1),ure(h=new sU(new $s),e),l=0,d=new $b;0!=h.b.c.length;)if(o=xL(0==h.b.c.length?null:$D(h.b,0),157),l>1&&KD(o)*YD(o)/2>s[0]){for(a=0;as[a];)++a;f=new QQ(new PG(d,0,a+1)),u=KD(o)/YD(o),c=ive(f,t,new sw,n,r,i,u),MR(Kk(f.e),c),hY(Aae(h,f)),ure(h,new PG(d,a+1,d.c.length)),d.c=HY(LLe,aye,1,0,5,1),l=0,_F(s,s.length,0)}else null!=(0==h.b.c.length?null:$D(h.b,0))&&B1(h,0),l>0&&(s[l]=s[l-1]),s[l]+=KD(o)*YD(o),++l,d.c[d.c.length]=o;return d}(s,t,f.a,f.b,(c=i,sB(a),c))}$we(e,(d=ive(new QQ(p),t,n,f.a,f.b,i,(sB(a),a))).a,d.b,!1,!0)}(e,a,o,n),Toe(t)},$j(xCe,"BoxLayoutProvider",936),Vle(937,1,$_e,Lg),$ve.ue=function(e,t){return function(e,t,n){var r,i,a;if(!(i=xL(gue(t,(Xae(),U5e)),20))&&(i=G6(0)),!(a=xL(gue(n,U5e),20))&&(a=G6(0)),i.a>a.a)return-1;if(i.a0&&g.b>0&&$we(b,g.a,g.b,!0,!0)),h=r.Math.max(h,b.i+b.g),d=r.Math.max(d,b.j+b.f),u=new gI((!b.n&&(b.n=new AU(Pet,b,1,7)),b.n));u.e!=u.i.gc();)c=xL(aee(u),137),(x=xL(gue(c,o9e),8))&&DC(c,x.a,x.b),h=r.Math.max(h,b.i+c.i+c.g),d=r.Math.max(d,b.j+c.j+c.f);for(E=new gI((!b.c&&(b.c=new AU(Det,b,9,9)),b.c));E.e!=E.i.gc();)for(y=xL(aee(E),122),(x=xL(gue(y,o9e),8))&&DC(y,x.a,x.b),_=b.i+y.i,S=b.j+y.j,h=r.Math.max(h,_+y.g),d=r.Math.max(d,S+y.f),l=new gI((!y.n&&(y.n=new AU(Pet,y,1,7)),y.n));l.e!=l.i.gc();)c=xL(aee(l),137),(x=xL(gue(c,o9e),8))&&DC(c,x.a,x.b),h=r.Math.max(h,_+c.i+c.g),d=r.Math.max(d,S+c.j+c.f);for(a=new lU(NI(efe(b).a.Ic(),new p));Wle(a);)f=Hwe(n=xL(qq(a),80)),h=r.Math.max(h,f.a),d=r.Math.max(d,f.b);for(i=new lU(NI(Jue(b).a.Ic(),new p));Wle(i);)$H(Dae(n=xL(qq(i),80)))!=e&&(f=Hwe(n),h=r.Math.max(h,f.a),d=r.Math.max(d,f.b))}if(o==(o9(),B8e))for(m=new gI((!e.a&&(e.a=new AU(Let,e,10,11)),e.a));m.e!=m.i.gc();)for(i=new lU(NI(efe(b=xL(aee(m),34)).a.Ic(),new p));Wle(i);)0==(s=oge(n=xL(qq(i),80))).b?Zee(n,_6e,null):Zee(n,_6e,s);Av(ON(gue(e,(c5(),n9e))))||$we(e,h+(v=xL(gue(e,i9e),115)).b+v.c,d+v.d+v.a,!0,!0),Toe(t)},$j(xCe,"FixedLayoutProvider",1111),Vle(370,134,{3:1,409:1,370:1,94:1,134:1},Xs,kZ),$ve.Gf=function(e){var t,n,r,i,a,o,s;if(e)try{for(o=ipe(e,";,;"),i=0,a=(r=o).length;i>16&pEe|e^(n&pEe)<<16},$ve.Ic=function(){return new jg(this)},$ve.Ib=function(){return null==this.a&&null==this.b?"pair(null,null)":null==this.a?"pair(null,"+K8(this.b)+")":null==this.b?"pair("+K8(this.a)+",null)":"pair("+K8(this.a)+","+K8(this.b)+")"},$j(xCe,"Pair",46),Vle(947,1,dye,jg),$ve.Nb=function(e){NU(this,e)},$ve.Ob=function(){return!this.c&&(!this.b&&null!=this.a.a||null!=this.a.b)},$ve.Pb=function(){if(!this.c&&!this.b&&null!=this.a.a)return this.b=!0,this.a.a;if(!this.c&&null!=this.a.b)return this.c=!0,this.a.b;throw Jb(new mm)},$ve.Qb=function(){throw this.c&&null!=this.a.b?this.a.b=null:this.b&&null!=this.a.a&&(this.a.a=null),Jb(new ym)},$ve.b=!1,$ve.c=!1,$j(xCe,"Pair/1",947),Vle(442,1,{442:1},Uz),$ve.Fb=function(e){return ZB(this.a,xL(e,442).a)&&ZB(this.c,xL(e,442).c)&&ZB(this.d,xL(e,442).d)&&ZB(this.b,xL(e,442).b)},$ve.Hb=function(){return y5(m3(ay(LLe,1),aye,1,5,[this.a,this.c,this.d,this.b]))},$ve.Ib=function(){return"("+this.a+rye+this.c+rye+this.d+rye+this.b+")"},$j(xCe,"Quadruple",442),Vle(1099,207,ZSe,Js),$ve.$e=function(e,t){var n;Qie(t,"Random Layout",1),0!=(!e.a&&(e.a=new AU(Let,e,10,11)),e.a).i?(function(e,t,n,i,a){var o,s,c,l,u,f,h,d,g,b,m,w,v,y,E,_,S,x,T,A;for(y=0,b=0,g=0,d=1,v=new gI((!e.a&&(e.a=new AU(Let,e,10,11)),e.a));v.e!=v.i.gc();)d+=gW(new lU(NI(efe(m=xL(aee(v),34)).a.Ic(),new p))),x=m.g,b=r.Math.max(b,x),h=m.f,g=r.Math.max(g,h),y+=x*h;for(s=y+2*i*i*d*(!e.a&&(e.a=new AU(Let,e,10,11)),e.a).i,o=r.Math.sqrt(s),l=r.Math.max(o*n,b),c=r.Math.max(o/n,g),w=new gI((!e.a&&(e.a=new AU(Let,e,10,11)),e.a));w.e!=w.i.gc();)m=xL(aee(w),34),T=a.b+(Fue(t,26)*E_e+Fue(t,27)*__e)*(l-m.g),A=a.b+(Fue(t,26)*E_e+Fue(t,27)*__e)*(c-m.f),EJ(m,T),_J(m,A);for(S=l+(a.b+a.c),_=c+(a.d+a.a),E=new gI((!e.a&&(e.a=new AU(Let,e,10,11)),e.a));E.e!=E.i.gc();)for(f=new lU(NI(efe(xL(aee(E),34)).a.Ic(),new p));Wle(f);)Ple(u=xL(qq(f),80))||yve(u,t,S,_);$we(e,S+=a.b+a.c,_+=a.d+a.a,!1,!0)}(e,(n=xL(gue(e,(K9(),S7e)),20))&&0!=n.a?new vW(n.a):new U8,Iv(NN(gue(e,y7e))),Iv(NN(gue(e,x7e))),xL(gue(e,E7e),115)),Toe(t)):Toe(t)},$j(xCe,"RandomLayoutProvider",1099),Vle(542,1,{}),$ve.of=function(){return new HA(this.f.i,this.f.j)},$ve.Xe=function(e){return $$(e,(Ove(),Z6e))?gue(this.f,tet):gue(this.f,e)},$ve.pf=function(){return new HA(this.f.g,this.f.f)},$ve.qf=function(){return this.g},$ve.Ye=function(e){return GY(this.f,e)},$ve.rf=function(e){EJ(this.f,e.a),_J(this.f,e.b)},$ve.sf=function(e){yJ(this.f,e.a),vJ(this.f,e.b)},$ve.tf=function(e){this.g=e},$ve.g=0,$j(qIe,"ElkGraphAdapters/AbstractElkGraphElementAdapter",542),Vle(543,1,{818:1},Bg),$ve.uf=function(){var e,t;if(!this.b)for(this.b=ZG(nz(this.a).i),t=new gI(nz(this.a));t.e!=t.i.gc();)e=xL(aee(t),137),SL(this.b,new yv(e));return this.b},$ve.b=null,$j(qIe,"ElkGraphAdapters/ElkEdgeAdapter",543),Vle(433,542,{},vv),$ve.vf=function(){return Ine(this)},$ve.a=null,$j(qIe,"ElkGraphAdapters/ElkGraphAdapter",433),Vle(618,542,{183:1},yv),$j(qIe,"ElkGraphAdapters/ElkLabelAdapter",618),Vle(617,542,{816:1},SO),$ve.uf=function(){return function(e){var t,n;if(!e.b)for(e.b=ZG(xL(e.f,34).vg().i),n=new gI(xL(e.f,34).vg());n.e!=n.i.gc();)t=xL(aee(n),137),SL(e.b,new yv(t));return e.b}(this)},$ve.yf=function(){var e;return!(e=xL(gue(this.f,(Ove(),x6e)),141))&&(e=new ow),e},$ve.Af=function(){return function(e){var t,n;if(!e.e)for(e.e=ZG(rz(xL(e.f,34)).i),n=new gI(rz(xL(e.f,34)));n.e!=n.i.gc();)t=xL(aee(n),122),SL(e.e,new zg(t));return e.e}(this)},$ve.Cf=function(e){var t;t=new GP(e),Zee(this.f,(Ove(),x6e),t)},$ve.Df=function(e){Zee(this.f,(Ove(),U6e),new VP(e))},$ve.wf=function(){return this.d},$ve.xf=function(){var e,t;if(!this.a)for(this.a=new $b,t=new lU(NI(Jue(xL(this.f,34)).a.Ic(),new p));Wle(t);)e=xL(qq(t),80),SL(this.a,new Bg(e));return this.a},$ve.zf=function(){var e,t;if(!this.c)for(this.c=new $b,t=new lU(NI(efe(xL(this.f,34)).a.Ic(),new p));Wle(t);)e=xL(qq(t),80),SL(this.c,new Bg(e));return this.c},$ve.Bf=function(){return 0!=c$(xL(this.f,34)).i||Av(ON(xL(this.f,34).Xe((Ove(),w6e))))},$ve.a=null,$ve.b=null,$ve.c=null,$ve.d=null,$ve.e=null,$j(qIe,"ElkGraphAdapters/ElkNodeAdapter",617),Vle(1214,542,{817:1},zg),$ve.uf=function(){return function(e){var t,n;if(!e.b)for(e.b=ZG(xL(e.f,122).vg().i),n=new gI(xL(e.f,122).vg());n.e!=n.i.gc();)t=xL(aee(n),137),SL(e.b,new yv(t));return e.b}(this)},$ve.xf=function(){var e,t;if(!this.a)for(this.a=PO(xL(this.f,122).sg().i),t=new gI(xL(this.f,122).sg());t.e!=t.i.gc();)e=xL(aee(t),80),SL(this.a,new Bg(e));return this.a},$ve.zf=function(){var e,t;if(!this.c)for(this.c=PO(xL(this.f,122).tg().i),t=new gI(xL(this.f,122).tg());t.e!=t.i.gc();)e=xL(aee(t),80),SL(this.c,new Bg(e));return this.c},$ve.Ef=function(){return xL(xL(this.f,122).Xe((Ove(),a8e)),61)},$ve.Ff=function(){var e,t,n,r,i,a,o;for(r=kH(xL(this.f,122)),n=new gI(xL(this.f,122).tg());n.e!=n.i.gc();)for(o=new gI((!(e=xL(aee(n),80)).c&&(e.c=new VR(ket,e,5,8)),e.c));o.e!=o.i.gc();){if(DQ(Jie(a=xL(aee(o),93)),r))return!0;if(Jie(a)==r&&Av(ON(gue(e,(Ove(),v6e)))))return!0}for(t=new gI(xL(this.f,122).sg());t.e!=t.i.gc();)for(i=new gI((!(e=xL(aee(t),80)).b&&(e.b=new VR(ket,e,4,7)),e.b));i.e!=i.i.gc();)if(DQ(Jie(xL(aee(i),93)),r))return!0;return!1},$ve.a=null,$ve.b=null,$ve.c=null,$j(qIe,"ElkGraphAdapters/ElkPortAdapter",1214);var ret,iet,aet,oet,set,cet,uet,fet,het,det,pet,get,bet,met,wet,vet,yet,Eet,_et=TD(XIe,"EObject"),Set=TD(YIe,KIe),xet=TD(YIe,ZIe),Tet=TD(YIe,QIe),Aet=TD(YIe,"ElkShape"),ket=TD(YIe,JIe),Cet=TD(YIe,eOe),Met=TD(YIe,tOe),Iet=TD(XIe,nOe),Oet=TD(XIe,"EFactory"),Net=TD(XIe,rOe),Ret=TD(XIe,"EPackage"),Pet=TD(YIe,iOe),Let=TD(YIe,aOe),Det=TD(YIe,oOe);Vle(89,1,sOe),$ve.Eg=function(){return this.Fg(),null},$ve.Fg=function(){return null},$ve.Gg=function(){return this.Fg(),!1},$ve.Hg=function(){return!1},$ve.Ig=function(e){E2(this,e)},$j(cOe,"BasicNotifierImpl",89),Vle(96,89,bOe),$ve.ih=function(){return NC(this)},$ve.Jg=function(e,t){return e},$ve.Kg=function(){throw Jb(new _m)},$ve.Lg=function(e){var t;return t=Ote(xL(mQ(this.Og(),this.Qg()),17)),this.$g().dh(this,t.n,t.f,e)},$ve.Mg=function(e,t){throw Jb(new _m)},$ve.Ng=function(e,t,n){return Fpe(this,e,t,n)},$ve.Og=function(){var e;return this.Kg()&&(e=this.Kg().Zj())?e:this.uh()},$ve.Pg=function(){return Fle(this)},$ve.Qg=function(){throw Jb(new _m)},$ve.Rg=function(){var e,t;return!(t=this.kh().$j())&&this.Kg().dk((zS(),t=null==(e=J$(Oge(this.Og())))?Snt:new EO(this,e))),t},$ve.Sg=function(e,t){return e},$ve.Tg=function(e){return e.Bj()?e.Xi():k9(this.Og(),e)},$ve.Ug=function(){var e;return(e=this.Kg())?e.ak():null},$ve.Vg=function(){return this.Kg()?this.Kg().Zj():null},$ve.Wg=function(e,t,n){return ate(this,e,t,n)},$ve.Xg=function(e){return gK(this,e)},$ve.Yg=function(e,t){return CX(this,e,t)},$ve.Zg=function(){var e;return!!(e=this.Kg())&&e.bk()},$ve.$g=function(){throw Jb(new _m)},$ve._g=function(){return U7(this)},$ve.ah=function(e,t,n,r){return qee(this,e,t,r)},$ve.bh=function(e,t,n){return xL(mQ(this.Og(),t),65).Ij().Lj(this,this.th(),t-this.vh(),e,n)},$ve.dh=function(e,t,n,r){return Z$(this,e,t,r)},$ve.eh=function(e,t,n){return xL(mQ(this.Og(),t),65).Ij().Mj(this,this.th(),t-this.vh(),e,n)},$ve.fh=function(){return!!this.Kg()&&!!this.Kg()._j()},$ve.gh=function(e){return Fee(this,e)},$ve.hh=function(e){return UH(this,e)},$ve.jh=function(e){return vme(this,e)},$ve.kh=function(){throw Jb(new _m)},$ve.lh=function(){return this.Kg()?this.Kg()._j():null},$ve.mh=function(){return U7(this)},$ve.nh=function(e,t){$se(this,e,t)},$ve.oh=function(e){this.kh().ck(e)},$ve.ph=function(e){this.kh().fk(e)},$ve.qh=function(e){this.kh().ek(e)},$ve.rh=function(e,t){var n,r,i,a;return(a=this.Ug())&&e&&(t=Yee(a.Qk(),this,t),a.Uk(this)),(r=this.$g())&&(0!=(tpe(this,this.$g(),this.Qg()).Bb&i_e)?(i=r._g())&&(e?!a&&i.Uk(this):i.Tk(this)):(t=(n=this.Qg())>=0?this.Lg(t):this.$g().dh(this,-1-n,null,t),t=this.Ng(null,-1,t))),this.ph(e),t},$ve.sh=function(e){var t,n,r,i,a,o,s;if((a=k9(n=this.Og(),e))>=(t=this.vh()))return xL(e,65).Ij().Pj(this,this.th(),a-t);if(a<=-1){if(!(o=_me((yse(),$nt),n,e)))throw Jb(new Rv(lOe+e.ne()+hOe));if(YS(),xL(o,65).Jj()||(o=zG(gZ($nt,o))),i=xL((r=this.Tg(o))>=0?this.Wg(r,!0,!0):Jce(this,o,!0),152),(s=o.Uj())>1||-1==s)return xL(xL(i,212).cl(e,!1),76)}else if(e.Vj())return xL((r=this.Tg(e))>=0?this.Wg(r,!1,!0):Jce(this,e,!1),76);return new dk(this,e)},$ve.th=function(){return AZ(this)},$ve.uh=function(){return(Ij(),Gtt).S},$ve.vh=function(){return Oj(this.uh())},$ve.wh=function(e){ase(this,e)},$ve.Ib=function(){return Iue(this)},$j(mOe,"BasicEObjectImpl",96),Vle(113,96,{104:1,91:1,89:1,55:1,107:1,48:1,96:1,113:1}),$ve.xh=function(e){return TZ(this)[e]},$ve.yh=function(e,t){Gj(TZ(this),e,t)},$ve.zh=function(e){Gj(TZ(this),e,null)},$ve.Eg=function(){return xL(k2(this,4),124)},$ve.Fg=function(){throw Jb(new _m)},$ve.Gg=function(){return 0!=(4&this.Db)},$ve.Kg=function(){throw Jb(new _m)},$ve.Ah=function(e){W7(this,2,e)},$ve.Mg=function(e,t){this.Db=t<<16|255&this.Db,this.Ah(e)},$ve.Og=function(){return F$(this)},$ve.Qg=function(){return this.Db>>16},$ve.Rg=function(){var e;return zS(),null==(e=J$(Oge(xL(k2(this,16),26)||this.uh())))?Snt:new EO(this,e)},$ve.Hg=function(){return 0==(1&this.Db)},$ve.Ug=function(){return xL(k2(this,128),1907)},$ve.Vg=function(){return xL(k2(this,16),26)},$ve.Zg=function(){return 0!=(32&this.Db)},$ve.$g=function(){return xL(k2(this,2),48)},$ve.fh=function(){return 0!=(64&this.Db)},$ve.kh=function(){throw Jb(new _m)},$ve.lh=function(){return xL(k2(this,64),279)},$ve.oh=function(e){W7(this,16,e)},$ve.ph=function(e){W7(this,128,e)},$ve.qh=function(e){W7(this,64,e)},$ve.th=function(){return q7(this)},$ve.Db=0,$j(mOe,"MinimalEObjectImpl",113),Vle(116,113,{104:1,91:1,89:1,55:1,107:1,48:1,96:1,113:1,116:1}),$ve.Ah=function(e){this.Cb=e},$ve.$g=function(){return this.Cb},$j(mOe,"MinimalEObjectImpl/Container",116),Vle(1957,116,{104:1,408:1,94:1,91:1,89:1,55:1,107:1,48:1,96:1,113:1,116:1}),$ve.Ve=function(e){return!this.o&&(this.o=new iK((uve(),pet),qet,this,0)),O1(this.o,e.q?e.q:(i$(),i$(),pFe)),this},$ve.Wg=function(e,t,n){return $ne(this,e,t,n)},$ve.eh=function(e,t,n){return boe(this,e,t,n)},$ve.gh=function(e){return nV(this,e)},$ve.nh=function(e,t){N4(this,e,t)},$ve.uh=function(){return uve(),bet},$ve.wh=function(e){A3(this,e)},$ve.We=function(){return Uee(this)},$ve.Xe=function(e){return gue(this,e)},$ve.Ye=function(e){return GY(this,e)},$ve.Ze=function(e,t){return Zee(this,e,t)},$j(wOe,"EMapPropertyHolderImpl",1957),Vle(560,116,{104:1,463:1,91:1,89:1,55:1,107:1,48:1,96:1,113:1,116:1},ec),$ve.Wg=function(e,t,n){switch(e){case 0:return this.a;case 1:return this.b}return ate(this,e,t,n)},$ve.gh=function(e){switch(e){case 0:return 0!=this.a;case 1:return 0!=this.b}return Fee(this,e)},$ve.nh=function(e,t){switch(e){case 0:return void CJ(this,Mv(NN(t)));case 1:return void xJ(this,Mv(NN(t)))}$se(this,e,t)},$ve.uh=function(){return uve(),aet},$ve.wh=function(e){switch(e){case 0:return void CJ(this,0);case 1:return void xJ(this,0)}ase(this,e)},$ve.Ib=function(){var e;return 0!=(64&this.Db)?Iue(this):((e=new BI(Iue(this))).a+=" (x: ",FE(e,this.a),e.a+=", y: ",FE(e,this.b),e.a+=")",e.a)},$ve.a=0,$ve.b=0,$j(wOe,"ElkBendPointImpl",560),Vle(710,1957,{104:1,408:1,160:1,94:1,91:1,89:1,55:1,107:1,48:1,96:1,113:1,116:1}),$ve.Wg=function(e,t,n){return O6(this,e,t,n)},$ve.bh=function(e,t,n){return gae(this,e,t,n)},$ve.eh=function(e,t,n){return n3(this,e,t,n)},$ve.gh=function(e){return z2(this,e)},$ve.nh=function(e,t){oie(this,e,t)},$ve.uh=function(){return uve(),uet},$ve.wh=function(e){u6(this,e)},$ve.ug=function(){return this.k},$ve.vg=function(){return nz(this)},$ve.Ib=function(){return N8(this)},$ve.k=null,$j(wOe,"ElkGraphElementImpl",710),Vle(711,710,{104:1,408:1,160:1,464:1,94:1,91:1,89:1,55:1,107:1,48:1,96:1,113:1,116:1}),$ve.Wg=function(e,t,n){return Z8(this,e,t,n)},$ve.gh=function(e){return R9(this,e)},$ve.nh=function(e,t){sie(this,e,t)},$ve.uh=function(){return uve(),get},$ve.wh=function(e){P9(this,e)},$ve.wg=function(){return this.f},$ve.xg=function(){return this.g},$ve.yg=function(){return this.i},$ve.zg=function(){return this.j},$ve.Ag=function(e,t){LC(this,e,t)},$ve.Bg=function(e,t){DC(this,e,t)},$ve.Cg=function(e){EJ(this,e)},$ve.Dg=function(e){_J(this,e)},$ve.Ib=function(){return koe(this)},$ve.f=0,$ve.g=0,$ve.i=0,$ve.j=0,$j(wOe,"ElkShapeImpl",711),Vle(712,711,{104:1,408:1,93:1,160:1,464:1,94:1,91:1,89:1,55:1,107:1,48:1,96:1,113:1,116:1}),$ve.Wg=function(e,t,n){return $te(this,e,t,n)},$ve.bh=function(e,t,n){return Vre(this,e,t,n)},$ve.eh=function(e,t,n){return Wre(this,e,t,n)},$ve.gh=function(e){return m4(this,e)},$ve.nh=function(e,t){iue(this,e,t)},$ve.uh=function(){return uve(),oet},$ve.wh=function(e){Kee(this,e)},$ve.sg=function(){return!this.d&&(this.d=new VR(Cet,this,8,5)),this.d},$ve.tg=function(){return!this.e&&(this.e=new VR(Cet,this,7,4)),this.e},$j(wOe,"ElkConnectableShapeImpl",712),Vle(349,710,{104:1,408:1,80:1,160:1,349:1,94:1,91:1,89:1,55:1,107:1,48:1,96:1,113:1,116:1},Qs),$ve.Lg=function(e){return wre(this,e)},$ve.Wg=function(e,t,n){switch(e){case 3:return AH(this);case 4:return!this.b&&(this.b=new VR(ket,this,4,7)),this.b;case 5:return!this.c&&(this.c=new VR(ket,this,5,8)),this.c;case 6:return!this.a&&(this.a=new AU(Met,this,6,6)),this.a;case 7:return pO(),!this.b&&(this.b=new VR(ket,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new VR(ket,this,5,8)),this.c.i<=1));case 8:return pO(),!!Ple(this);case 9:return pO(),!!Zce(this);case 10:return pO(),!this.b&&(this.b=new VR(ket,this,4,7)),0!=this.b.i&&(!this.c&&(this.c=new VR(ket,this,5,8)),0!=this.c.i)}return O6(this,e,t,n)},$ve.bh=function(e,t,n){var r;switch(t){case 3:return this.Cb&&(n=(r=this.Db>>16)>=0?wre(this,n):this.Cb.dh(this,-1-r,null,n)),GN(this,xL(e,34),n);case 4:return!this.b&&(this.b=new VR(ket,this,4,7)),H9(this.b,e,n);case 5:return!this.c&&(this.c=new VR(ket,this,5,8)),H9(this.c,e,n);case 6:return!this.a&&(this.a=new AU(Met,this,6,6)),H9(this.a,e,n)}return gae(this,e,t,n)},$ve.eh=function(e,t,n){switch(t){case 3:return GN(this,null,n);case 4:return!this.b&&(this.b=new VR(ket,this,4,7)),Yee(this.b,e,n);case 5:return!this.c&&(this.c=new VR(ket,this,5,8)),Yee(this.c,e,n);case 6:return!this.a&&(this.a=new AU(Met,this,6,6)),Yee(this.a,e,n)}return n3(this,e,t,n)},$ve.gh=function(e){switch(e){case 3:return!!AH(this);case 4:return!!this.b&&0!=this.b.i;case 5:return!!this.c&&0!=this.c.i;case 6:return!!this.a&&0!=this.a.i;case 7:return!this.b&&(this.b=new VR(ket,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new VR(ket,this,5,8)),this.c.i<=1));case 8:return Ple(this);case 9:return Zce(this);case 10:return!this.b&&(this.b=new VR(ket,this,4,7)),0!=this.b.i&&(!this.c&&(this.c=new VR(ket,this,5,8)),0!=this.c.i)}return z2(this,e)},$ve.nh=function(e,t){switch(e){case 3:return void ffe(this,xL(t,34));case 4:return!this.b&&(this.b=new VR(ket,this,4,7)),lme(this.b),!this.b&&(this.b=new VR(ket,this,4,7)),void Bj(this.b,xL(t,15));case 5:return!this.c&&(this.c=new VR(ket,this,5,8)),lme(this.c),!this.c&&(this.c=new VR(ket,this,5,8)),void Bj(this.c,xL(t,15));case 6:return!this.a&&(this.a=new AU(Met,this,6,6)),lme(this.a),!this.a&&(this.a=new AU(Met,this,6,6)),void Bj(this.a,xL(t,15))}oie(this,e,t)},$ve.uh=function(){return uve(),set},$ve.wh=function(e){switch(e){case 3:return void ffe(this,null);case 4:return!this.b&&(this.b=new VR(ket,this,4,7)),void lme(this.b);case 5:return!this.c&&(this.c=new VR(ket,this,5,8)),void lme(this.c);case 6:return!this.a&&(this.a=new AU(Met,this,6,6)),void lme(this.a)}u6(this,e)},$ve.Ib=function(){return Obe(this)},$j(wOe,"ElkEdgeImpl",349),Vle(432,1957,{104:1,408:1,201:1,432:1,94:1,91:1,89:1,55:1,107:1,48:1,96:1,113:1,116:1},Zs),$ve.Lg=function(e){return hre(this,e)},$ve.Wg=function(e,t,n){switch(e){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return!this.a&&(this.a=new iI(xet,this,5)),this.a;case 6:return CH(this);case 7:return t?Ite(this):this.i;case 8:return t?Mte(this):this.f;case 9:return!this.g&&(this.g=new VR(Met,this,9,10)),this.g;case 10:return!this.e&&(this.e=new VR(Met,this,10,9)),this.e;case 11:return this.d}return $ne(this,e,t,n)},$ve.bh=function(e,t,n){var r;switch(t){case 6:return this.Cb&&(n=(r=this.Db>>16)>=0?hre(this,n):this.Cb.dh(this,-1-r,null,n)),VN(this,xL(e,80),n);case 9:return!this.g&&(this.g=new VR(Met,this,9,10)),H9(this.g,e,n);case 10:return!this.e&&(this.e=new VR(Met,this,10,9)),H9(this.e,e,n)}return xL(mQ(xL(k2(this,16),26)||(uve(),cet),t),65).Ij().Lj(this,q7(this),t-Oj((uve(),cet)),e,n)},$ve.eh=function(e,t,n){switch(t){case 5:return!this.a&&(this.a=new iI(xet,this,5)),Yee(this.a,e,n);case 6:return VN(this,null,n);case 9:return!this.g&&(this.g=new VR(Met,this,9,10)),Yee(this.g,e,n);case 10:return!this.e&&(this.e=new VR(Met,this,10,9)),Yee(this.e,e,n)}return boe(this,e,t,n)},$ve.gh=function(e){switch(e){case 1:return 0!=this.j;case 2:return 0!=this.k;case 3:return 0!=this.b;case 4:return 0!=this.c;case 5:return!!this.a&&0!=this.a.i;case 6:return!!CH(this);case 7:return!!this.i;case 8:return!!this.f;case 9:return!!this.g&&0!=this.g.i;case 10:return!!this.e&&0!=this.e.i;case 11:return null!=this.d}return nV(this,e)},$ve.nh=function(e,t){switch(e){case 1:return void SJ(this,Mv(NN(t)));case 2:return void kJ(this,Mv(NN(t)));case 3:return void TJ(this,Mv(NN(t)));case 4:return void AJ(this,Mv(NN(t)));case 5:return!this.a&&(this.a=new iI(xet,this,5)),lme(this.a),!this.a&&(this.a=new iI(xet,this,5)),void Bj(this.a,xL(t,15));case 6:return void ufe(this,xL(t,80));case 7:return void g1(this,xL(t,93));case 8:return void p1(this,xL(t,93));case 9:return!this.g&&(this.g=new VR(Met,this,9,10)),lme(this.g),!this.g&&(this.g=new VR(Met,this,9,10)),void Bj(this.g,xL(t,15));case 10:return!this.e&&(this.e=new VR(Met,this,10,9)),lme(this.e),!this.e&&(this.e=new VR(Met,this,10,9)),void Bj(this.e,xL(t,15));case 11:return void I1(this,RN(t))}N4(this,e,t)},$ve.uh=function(){return uve(),cet},$ve.wh=function(e){switch(e){case 1:return void SJ(this,0);case 2:return void kJ(this,0);case 3:return void TJ(this,0);case 4:return void AJ(this,0);case 5:return!this.a&&(this.a=new iI(xet,this,5)),void lme(this.a);case 6:return void ufe(this,null);case 7:return void g1(this,null);case 8:return void p1(this,null);case 9:return!this.g&&(this.g=new VR(Met,this,9,10)),void lme(this.g);case 10:return!this.e&&(this.e=new VR(Met,this,10,9)),void lme(this.e);case 11:return void I1(this,null)}A3(this,e)},$ve.Ib=function(){return _le(this)},$ve.b=0,$ve.c=0,$ve.d=null,$ve.j=0,$ve.k=0,$j(wOe,"ElkEdgeSectionImpl",432),Vle(150,116,{104:1,91:1,89:1,147:1,55:1,107:1,48:1,96:1,150:1,113:1,116:1}),$ve.Wg=function(e,t,n){return 0==e?(!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),this.Ab):HK(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e),t,n)},$ve.bh=function(e,t,n){return 0==t?(!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),H9(this.Ab,e,n)):xL(mQ(xL(k2(this,16),26)||this.uh(),t),65).Ij().Lj(this,q7(this),t-Oj(this.uh()),e,n)},$ve.eh=function(e,t,n){return 0==t?(!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),Yee(this.Ab,e,n)):xL(mQ(xL(k2(this,16),26)||this.uh(),t),65).Ij().Mj(this,q7(this),t-Oj(this.uh()),e,n)},$ve.gh=function(e){return 0==e?!!this.Ab&&0!=this.Ab.i:PW(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e))},$ve.jh=function(e){return Iwe(this,e)},$ve.nh=function(e,t){if(0===e)return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),lme(this.Ab),!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void Bj(this.Ab,xL(t,15));G8(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e),t)},$ve.ph=function(e){W7(this,128,e)},$ve.uh=function(){return Fve(),nnt},$ve.wh=function(e){if(0===e)return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void lme(this.Ab);y6(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e))},$ve.Bh=function(){this.Bb|=1},$ve.Ch=function(e){return $pe(this,e)},$ve.Bb=0,$j(mOe,"EModelElementImpl",150),Vle(696,150,{104:1,91:1,89:1,465:1,147:1,55:1,107:1,48:1,96:1,150:1,113:1,116:1},Cf),$ve.Dh=function(e,t){return qme(this,e,t)},$ve.Eh=function(e){var t,n,r,i;if(this.a!=WQ(e)||0!=(256&e.Bb))throw Jb(new Rv(xOe+e.zb+EOe));for(n=D$(e);0!=XW(n.a).i;){if(pne(t=xL(Mme(n,0,RM(i=xL(FQ(XW(n.a),0),86).c,87)?xL(i,26):(Fve(),int)),26)))return xL(r=WQ(t).Ih().Eh(t),48).oh(e),r;n=D$(t)}return"java.util.Map$Entry"==(null!=e.D?e.D:e.B)?new SD(e):new VL(e)},$ve.Fh=function(e,t){return gve(this,e,t)},$ve.Wg=function(e,t,n){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),this.Ab;case 1:return this.a}return HK(this,e-Oj((Fve(),Jtt)),mQ(xL(k2(this,16),26)||Jtt,e),t,n)},$ve.bh=function(e,t,n){switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),H9(this.Ab,e,n);case 1:return this.a&&(n=xL(this.a,48).dh(this,4,Ret,n)),J5(this,xL(e,234),n)}return xL(mQ(xL(k2(this,16),26)||(Fve(),Jtt),t),65).Ij().Lj(this,q7(this),t-Oj((Fve(),Jtt)),e,n)},$ve.eh=function(e,t,n){switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),Yee(this.Ab,e,n);case 1:return J5(this,null,n)}return xL(mQ(xL(k2(this,16),26)||(Fve(),Jtt),t),65).Ij().Mj(this,q7(this),t-Oj((Fve(),Jtt)),e,n)},$ve.gh=function(e){switch(e){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return!!this.a}return PW(this,e-Oj((Fve(),Jtt)),mQ(xL(k2(this,16),26)||Jtt,e))},$ve.nh=function(e,t){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),lme(this.Ab),!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void Bj(this.Ab,xL(t,15));case 1:return void Zae(this,xL(t,234))}G8(this,e-Oj((Fve(),Jtt)),mQ(xL(k2(this,16),26)||Jtt,e),t)},$ve.uh=function(){return Fve(),Jtt},$ve.wh=function(e){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void lme(this.Ab);case 1:return void Zae(this,null)}y6(this,e-Oj((Fve(),Jtt)),mQ(xL(k2(this,16),26)||Jtt,e))},$j(mOe,"EFactoryImpl",696),Vle(1012,696,{104:1,1983:1,91:1,89:1,465:1,147:1,55:1,107:1,48:1,96:1,150:1,113:1,116:1},rc),$ve.Dh=function(e,t){switch(e.tj()){case 12:return xL(t,146).og();case 13:return K8(t);default:throw Jb(new Rv(yOe+e.ne()+EOe))}},$ve.Eh=function(e){var t;switch(-1==e.G&&(e.G=(t=WQ(e))?dte(t.Hh(),e):-1),e.G){case 4:return new ic;case 6:return new ww;case 7:return new vw;case 8:return new Qs;case 9:return new ec;case 10:return new Zs;case 11:return new ac;default:throw Jb(new Rv(xOe+e.zb+EOe))}},$ve.Fh=function(e,t){switch(e.tj()){case 13:case 12:return null;default:throw Jb(new Rv(yOe+e.ne()+EOe))}},$j(wOe,"ElkGraphFactoryImpl",1012),Vle(431,150,{104:1,91:1,89:1,147:1,191:1,55:1,107:1,48:1,96:1,150:1,113:1,116:1}),$ve.Rg=function(){var e;return null==(e=J$(Oge(xL(k2(this,16),26)||this.uh())))?(zS(),zS(),Snt):new iN(this,e)},$ve.Wg=function(e,t,n){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),this.Ab;case 1:return this.ne()}return HK(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e),t,n)},$ve.gh=function(e){switch(e){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb}return PW(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e))},$ve.nh=function(e,t){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),lme(this.Ab),!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void Bj(this.Ab,xL(t,15));case 1:return void this.Gh(RN(t))}G8(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e),t)},$ve.uh=function(){return Fve(),rnt},$ve.wh=function(e){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void lme(this.Ab);case 1:return void this.Gh(null)}y6(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e))},$ve.ne=function(){return this.zb},$ve.Gh=function(e){o0(this,e)},$ve.Ib=function(){return m6(this)},$ve.zb=null,$j(mOe,"ENamedElementImpl",431),Vle(179,431,{104:1,91:1,89:1,147:1,191:1,55:1,234:1,107:1,48:1,96:1,150:1,179:1,113:1,116:1,663:1},f$),$ve.Lg=function(e){return bre(this,e)},$ve.Wg=function(e,t,n){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return!this.rb&&(this.rb=new IU(this,Ott,this)),this.rb;case 6:return!this.vb&&(this.vb=new RR(Ret,this,6,7)),this.vb;case 7:return t?this.Db>>16==7?xL(this.Cb,234):null:jH(this)}return HK(this,e-Oj((Fve(),snt)),mQ(xL(k2(this,16),26)||snt,e),t,n)},$ve.bh=function(e,t,n){var r;switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),H9(this.Ab,e,n);case 4:return this.sb&&(n=xL(this.sb,48).dh(this,1,Oet,n)),w6(this,xL(e,465),n);case 5:return!this.rb&&(this.rb=new IU(this,Ott,this)),H9(this.rb,e,n);case 6:return!this.vb&&(this.vb=new RR(Ret,this,6,7)),H9(this.vb,e,n);case 7:return this.Cb&&(n=(r=this.Db>>16)>=0?bre(this,n):this.Cb.dh(this,-1-r,null,n)),Fpe(this,e,7,n)}return xL(mQ(xL(k2(this,16),26)||(Fve(),snt),t),65).Ij().Lj(this,q7(this),t-Oj((Fve(),snt)),e,n)},$ve.eh=function(e,t,n){switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),Yee(this.Ab,e,n);case 4:return w6(this,null,n);case 5:return!this.rb&&(this.rb=new IU(this,Ott,this)),Yee(this.rb,e,n);case 6:return!this.vb&&(this.vb=new RR(Ret,this,6,7)),Yee(this.vb,e,n);case 7:return Fpe(this,null,7,n)}return xL(mQ(xL(k2(this,16),26)||(Fve(),snt),t),65).Ij().Mj(this,q7(this),t-Oj((Fve(),snt)),e,n)},$ve.gh=function(e){switch(e){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.yb;case 3:return null!=this.xb;case 4:return!!this.sb;case 5:return!!this.rb&&0!=this.rb.i;case 6:return!!this.vb&&0!=this.vb.i;case 7:return!!jH(this)}return PW(this,e-Oj((Fve(),snt)),mQ(xL(k2(this,16),26)||snt,e))},$ve.jh=function(e){var t;return t=function(e,t){var n,r,i,a,o,s;if(!e.tb){for(!e.rb&&(e.rb=new IU(e,Ott,e)),s=new nS((a=e.rb).i),i=new gI(a);i.e!=i.i.gc();)r=xL(aee(i),138),(n=xL(null==(o=r.ne())?tce(s.f,null,r):O8(s.g,o,r),138))&&(null==o?tce(s.f,null,n):O8(s.g,o,n));e.tb=s}return xL(fH(e.tb,t),138)}(this,e),t||Iwe(this,e)},$ve.nh=function(e,t){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),lme(this.Ab),!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void Bj(this.Ab,xL(t,15));case 1:return void o0(this,RN(t));case 2:return void c0(this,RN(t));case 3:return void s0(this,RN(t));case 4:return void moe(this,xL(t,465));case 5:return!this.rb&&(this.rb=new IU(this,Ott,this)),lme(this.rb),!this.rb&&(this.rb=new IU(this,Ott,this)),void Bj(this.rb,xL(t,15));case 6:return!this.vb&&(this.vb=new RR(Ret,this,6,7)),lme(this.vb),!this.vb&&(this.vb=new RR(Ret,this,6,7)),void Bj(this.vb,xL(t,15))}G8(this,e-Oj((Fve(),snt)),mQ(xL(k2(this,16),26)||snt,e),t)},$ve.qh=function(e){var t,n;if(e&&this.rb)for(n=new gI(this.rb);n.e!=n.i.gc();)RM(t=aee(n),348)&&(xL(t,348).w=null);W7(this,64,e)},$ve.uh=function(){return Fve(),snt},$ve.wh=function(e){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void lme(this.Ab);case 1:return void o0(this,null);case 2:return void c0(this,null);case 3:return void s0(this,null);case 4:return void moe(this,null);case 5:return!this.rb&&(this.rb=new IU(this,Ott,this)),void lme(this.rb);case 6:return!this.vb&&(this.vb=new RR(Ret,this,6,7)),void lme(this.vb)}y6(this,e-Oj((Fve(),snt)),mQ(xL(k2(this,16),26)||snt,e))},$ve.Bh=function(){Hne(this)},$ve.Hh=function(){return!this.rb&&(this.rb=new IU(this,Ott,this)),this.rb},$ve.Ih=function(){return this.sb},$ve.Jh=function(){return this.ub},$ve.Kh=function(){return this.xb},$ve.Lh=function(){return this.yb},$ve.Mh=function(e){this.ub=e},$ve.Ib=function(){var e;return 0!=(64&this.Db)?m6(this):((e=new BI(m6(this))).a+=" (nsURI: ",Fk(e,this.yb),e.a+=", nsPrefix: ",Fk(e,this.xb),e.a+=")",e.a)},$ve.xb=null,$ve.yb=null,$j(mOe,"EPackageImpl",179),Vle(549,179,{104:1,1985:1,549:1,91:1,89:1,147:1,191:1,55:1,234:1,107:1,48:1,96:1,150:1,179:1,113:1,116:1,663:1},zle),$ve.q=!1,$ve.r=!1;var Fet=!1;$j(wOe,"ElkGraphPackageImpl",549),Vle(351,711,{104:1,408:1,160:1,137:1,464:1,351:1,94:1,91:1,89:1,55:1,107:1,48:1,96:1,113:1,116:1},ic),$ve.Lg=function(e){return dre(this,e)},$ve.Wg=function(e,t,n){switch(e){case 7:return BH(this);case 8:return this.a}return Z8(this,e,t,n)},$ve.bh=function(e,t,n){var r;return 7===t?(this.Cb&&(n=(r=this.Db>>16)>=0?dre(this,n):this.Cb.dh(this,-1-r,null,n)),jF(this,xL(e,160),n)):gae(this,e,t,n)},$ve.eh=function(e,t,n){return 7==t?jF(this,null,n):n3(this,e,t,n)},$ve.gh=function(e){switch(e){case 7:return!!BH(this);case 8:return!eP("",this.a)}return R9(this,e)},$ve.nh=function(e,t){switch(e){case 7:return void Ofe(this,xL(t,160));case 8:return void b1(this,RN(t))}sie(this,e,t)},$ve.uh=function(){return uve(),fet},$ve.wh=function(e){switch(e){case 7:return void Ofe(this,null);case 8:return void b1(this,"")}P9(this,e)},$ve.Ib=function(){return ose(this)},$ve.a="",$j(wOe,"ElkLabelImpl",351),Vle(238,712,{104:1,408:1,93:1,160:1,34:1,464:1,238:1,94:1,91:1,89:1,55:1,107:1,48:1,96:1,113:1,116:1},ww),$ve.Lg=function(e){return Tre(this,e)},$ve.Wg=function(e,t,n){switch(e){case 9:return!this.c&&(this.c=new AU(Det,this,9,9)),this.c;case 10:return!this.a&&(this.a=new AU(Let,this,10,11)),this.a;case 11:return $H(this);case 12:return!this.b&&(this.b=new AU(Cet,this,12,3)),this.b;case 13:return pO(),!this.a&&(this.a=new AU(Let,this,10,11)),this.a.i>0}return $te(this,e,t,n)},$ve.bh=function(e,t,n){var r;switch(t){case 9:return!this.c&&(this.c=new AU(Det,this,9,9)),H9(this.c,e,n);case 10:return!this.a&&(this.a=new AU(Let,this,10,11)),H9(this.a,e,n);case 11:return this.Cb&&(n=(r=this.Db>>16)>=0?Tre(this,n):this.Cb.dh(this,-1-r,null,n)),OR(this,xL(e,34),n);case 12:return!this.b&&(this.b=new AU(Cet,this,12,3)),H9(this.b,e,n)}return Vre(this,e,t,n)},$ve.eh=function(e,t,n){switch(t){case 9:return!this.c&&(this.c=new AU(Det,this,9,9)),Yee(this.c,e,n);case 10:return!this.a&&(this.a=new AU(Let,this,10,11)),Yee(this.a,e,n);case 11:return OR(this,null,n);case 12:return!this.b&&(this.b=new AU(Cet,this,12,3)),Yee(this.b,e,n)}return Wre(this,e,t,n)},$ve.gh=function(e){switch(e){case 9:return!!this.c&&0!=this.c.i;case 10:return!!this.a&&0!=this.a.i;case 11:return!!$H(this);case 12:return!!this.b&&0!=this.b.i;case 13:return!this.a&&(this.a=new AU(Let,this,10,11)),this.a.i>0}return m4(this,e)},$ve.nh=function(e,t){switch(e){case 9:return!this.c&&(this.c=new AU(Det,this,9,9)),lme(this.c),!this.c&&(this.c=new AU(Det,this,9,9)),void Bj(this.c,xL(t,15));case 10:return!this.a&&(this.a=new AU(Let,this,10,11)),lme(this.a),!this.a&&(this.a=new AU(Let,this,10,11)),void Bj(this.a,xL(t,15));case 11:return void _fe(this,xL(t,34));case 12:return!this.b&&(this.b=new AU(Cet,this,12,3)),lme(this.b),!this.b&&(this.b=new AU(Cet,this,12,3)),void Bj(this.b,xL(t,15))}iue(this,e,t)},$ve.uh=function(){return uve(),het},$ve.wh=function(e){switch(e){case 9:return!this.c&&(this.c=new AU(Det,this,9,9)),void lme(this.c);case 10:return!this.a&&(this.a=new AU(Let,this,10,11)),void lme(this.a);case 11:return void _fe(this,null);case 12:return!this.b&&(this.b=new AU(Cet,this,12,3)),void lme(this.b)}Kee(this,e)},$ve.Ib=function(){return Ude(this)},$j(wOe,"ElkNodeImpl",238),Vle(199,712,{104:1,408:1,93:1,160:1,122:1,464:1,199:1,94:1,91:1,89:1,55:1,107:1,48:1,96:1,113:1,116:1},vw),$ve.Lg=function(e){return pre(this,e)},$ve.Wg=function(e,t,n){return 9==e?kH(this):$te(this,e,t,n)},$ve.bh=function(e,t,n){var r;return 9===t?(this.Cb&&(n=(r=this.Db>>16)>=0?pre(this,n):this.Cb.dh(this,-1-r,null,n)),WN(this,xL(e,34),n)):Vre(this,e,t,n)},$ve.eh=function(e,t,n){return 9==t?WN(this,null,n):Wre(this,e,t,n)},$ve.gh=function(e){return 9==e?!!kH(this):m4(this,e)},$ve.nh=function(e,t){9!==e?iue(this,e,t):hfe(this,xL(t,34))},$ve.uh=function(){return uve(),det},$ve.wh=function(e){9!==e?Kee(this,e):hfe(this,null)},$ve.Ib=function(){return jde(this)},$j(wOe,"ElkPortImpl",199);var Uet=TD(VOe,"BasicEMap/Entry");Vle(1072,116,{104:1,43:1,91:1,89:1,133:1,55:1,107:1,48:1,96:1,113:1,116:1},ac),$ve.Fb=function(e){return this===e},$ve.ad=function(){return this.b},$ve.Hb=function(){return eO(this)},$ve.Ph=function(e){m1(this,xL(e,146))},$ve.Wg=function(e,t,n){switch(e){case 0:return this.b;case 1:return this.c}return ate(this,e,t,n)},$ve.gh=function(e){switch(e){case 0:return!!this.b;case 1:return null!=this.c}return Fee(this,e)},$ve.nh=function(e,t){switch(e){case 0:return void m1(this,xL(t,146));case 1:return void w1(this,t)}$se(this,e,t)},$ve.uh=function(){return uve(),pet},$ve.wh=function(e){switch(e){case 0:return void m1(this,null);case 1:return void w1(this,null)}ase(this,e)},$ve.Nh=function(){var e;return-1==this.a&&(e=this.b,this.a=e?L4(e):0),this.a},$ve.bd=function(){return this.c},$ve.Oh=function(e){this.a=e},$ve.cd=function(e){var t;return t=this.c,w1(this,e),t},$ve.Ib=function(){var e;return 0!=(64&this.Db)?Iue(this):(Bk(Bk(Bk(e=new fy,this.b?this.b.og():cye),hTe),XI(this.c)),e.a)},$ve.a=-1,$ve.c=null;var jet,Bet,zet,$et,Het,Get,Vet,Wet,qet=$j(wOe,"ElkPropertyToValueMapEntryImpl",1072);Vle(964,1,{},oc),$j(XOe,"JsonAdapter",964),Vle(208,59,oEe,Wv),$j(XOe,"JsonImportException",208),Vle(836,1,{},vre),$j(XOe,"JsonImporter",836),Vle(870,1,{},VA),$j(XOe,"JsonImporter/lambda$0$Type",870),Vle(871,1,{},WA),$j(XOe,"JsonImporter/lambda$1$Type",871),Vle(879,1,{},$g),$j(XOe,"JsonImporter/lambda$10$Type",879),Vle(881,1,{},qA),$j(XOe,"JsonImporter/lambda$11$Type",881),Vle(882,1,{},XA),$j(XOe,"JsonImporter/lambda$12$Type",882),Vle(888,1,{},Bz),$j(XOe,"JsonImporter/lambda$13$Type",888),Vle(887,1,{},zz),$j(XOe,"JsonImporter/lambda$14$Type",887),Vle(883,1,{},YA),$j(XOe,"JsonImporter/lambda$15$Type",883),Vle(884,1,{},KA),$j(XOe,"JsonImporter/lambda$16$Type",884),Vle(885,1,{},ZA),$j(XOe,"JsonImporter/lambda$17$Type",885),Vle(886,1,{},QA),$j(XOe,"JsonImporter/lambda$18$Type",886),Vle(891,1,{},Hg),$j(XOe,"JsonImporter/lambda$19$Type",891),Vle(872,1,{},Gg),$j(XOe,"JsonImporter/lambda$2$Type",872),Vle(889,1,{},Vg),$j(XOe,"JsonImporter/lambda$20$Type",889),Vle(890,1,{},Wg),$j(XOe,"JsonImporter/lambda$21$Type",890),Vle(894,1,{},qg),$j(XOe,"JsonImporter/lambda$22$Type",894),Vle(892,1,{},Xg),$j(XOe,"JsonImporter/lambda$23$Type",892),Vle(893,1,{},Yg),$j(XOe,"JsonImporter/lambda$24$Type",893),Vle(896,1,{},Kg),$j(XOe,"JsonImporter/lambda$25$Type",896),Vle(895,1,{},Zg),$j(XOe,"JsonImporter/lambda$26$Type",895),Vle(897,1,Iye,JA),$ve.td=function(e){!function(e,t,n){var r,i;i=null,(r=sH(e,n))&&(i=hse(r)),yee(t,n,i)}(this.b,this.a,RN(e))},$j(XOe,"JsonImporter/lambda$27$Type",897),Vle(898,1,Iye,ek),$ve.td=function(e){!function(e,t,n){var r,i;i=null,(r=sH(e,n))&&(i=hse(r)),yee(t,n,i)}(this.b,this.a,RN(e))},$j(XOe,"JsonImporter/lambda$28$Type",898),Vle(899,1,{},tk),$j(XOe,"JsonImporter/lambda$29$Type",899),Vle(875,1,{},Qg),$j(XOe,"JsonImporter/lambda$3$Type",875),Vle(900,1,{},nk),$j(XOe,"JsonImporter/lambda$30$Type",900),Vle(901,1,{},Jg),$j(XOe,"JsonImporter/lambda$31$Type",901),Vle(902,1,{},eb),$j(XOe,"JsonImporter/lambda$32$Type",902),Vle(903,1,{},tb),$j(XOe,"JsonImporter/lambda$33$Type",903),Vle(904,1,{},nb),$j(XOe,"JsonImporter/lambda$34$Type",904),Vle(838,1,{},rb),$j(XOe,"JsonImporter/lambda$35$Type",838),Vle(908,1,{},JP),$j(XOe,"JsonImporter/lambda$36$Type",908),Vle(905,1,Iye,ib),$ve.td=function(e){!function(e,t){var n;s$(n=new lv,"x",t.a),s$(n,"y",t.b),uB(e,n)}(this.a,xL(e,463))},$j(XOe,"JsonImporter/lambda$37$Type",905),Vle(906,1,Iye,rk),$ve.td=function(e){!function(e,t,n){eie(t,xse(e,n))}(this.a,this.b,xL(e,201))},$j(XOe,"JsonImporter/lambda$38$Type",906),Vle(907,1,Iye,ik),$ve.td=function(e){!function(e,t,n){eie(t,xse(e,n))}(this.a,this.b,xL(e,201))},$j(XOe,"JsonImporter/lambda$39$Type",907),Vle(873,1,{},ab),$j(XOe,"JsonImporter/lambda$4$Type",873),Vle(909,1,Iye,ob),$ve.td=function(e){!function(e,t){var n;s$(n=new lv,"x",t.a),s$(n,"y",t.b),uB(e,n)}(this.a,xL(e,8))},$j(XOe,"JsonImporter/lambda$40$Type",909),Vle(874,1,{},sb),$j(XOe,"JsonImporter/lambda$5$Type",874),Vle(878,1,{},cb),$j(XOe,"JsonImporter/lambda$6$Type",878),Vle(876,1,{},lb),$j(XOe,"JsonImporter/lambda$7$Type",876),Vle(877,1,{},ub),$j(XOe,"JsonImporter/lambda$8$Type",877),Vle(880,1,{},fb),$j(XOe,"JsonImporter/lambda$9$Type",880),Vle(954,1,Iye,hb),$ve.td=function(e){uB(this.a,new lj(RN(e)))},$j(XOe,"JsonMetaDataConverter/lambda$0$Type",954),Vle(955,1,Iye,db),$ve.td=function(e){!function(e,t){uB(e,new lj(null!=t.f?t.f:""+t.g))}(this.a,xL(e,237))},$j(XOe,"JsonMetaDataConverter/lambda$1$Type",955),Vle(956,1,Iye,pb),$ve.td=function(e){!function(e,t){null!=t.c&&uB(e,new lj(t.c))}(this.a,xL(e,149))},$j(XOe,"JsonMetaDataConverter/lambda$2$Type",956),Vle(957,1,Iye,gb),$ve.td=function(e){!function(e,t){uB(e,new lj(null!=t.f?t.f:""+t.g))}(this.a,xL(e,175))},$j(XOe,"JsonMetaDataConverter/lambda$3$Type",957),Vle(237,22,{3:1,36:1,22:1,237:1},sk);var Xet,Yet=BJ(WSe,"GraphFeature",237,KLe,(function(){return $le(),m3(ay(Yet,1),Kye,237,0,[Wet,Het,Get,$et,Vet,Bet,jet,zet])}),(function(e){return $le(),zZ((b2(),Xet),e)}));Vle(13,1,{36:1,146:1},mb,$N,rC,iM),$ve.wd=function(e){return function(e,t){return IX(e.b,t.og())}(this,xL(e,146))},$ve.Fb=function(e){return $$(this,e)},$ve.rg=function(){return Mee(this)},$ve.og=function(){return this.b},$ve.Hb=function(){return vte(this.b)},$ve.Ib=function(){return this.b},$j(WSe,"Property",13),Vle(797,1,$_e,bb),$ve.ue=function(e,t){return function(e,t,n){var r,i;return r=xL(t.Xe(e.a),36),i=xL(n.Xe(e.a),36),null!=r&&null!=i?V0(r,i):null!=r?-1:null!=i?1:0}(this,xL(e,94),xL(t,94))},$ve.Fb=function(e){return this===e},$ve.ve=function(){return new od(this)},$j(WSe,"PropertyHolderComparator",797);var Ket=TD(VOe,"EList");Vle(66,51,{19:1,28:1,51:1,15:1,14:1,66:1,57:1}),$ve.Tc=function(e,t){v6(this,e,t)},$ve.Dc=function(e){return cK(this,e)},$ve.Uc=function(e,t){return T3(this,e,t)},$ve.Ec=function(e){return Bj(this,e)},$ve.Uh=function(){return new kO(this)},$ve.Vh=function(){return new CO(this)},$ve.Wh=function(e){return RJ(this,e)},$ve.Xh=function(){return!0},$ve.Yh=function(e,t){},$ve.Zh=function(){},$ve.$h=function(e,t){zY(this,e,t)},$ve._h=function(e,t,n){},$ve.ai=function(e,t){},$ve.bi=function(e,t,n){},$ve.Fb=function(e){return lde(this,e)},$ve.Hb=function(){return p3(this)},$ve.ci=function(){return!1},$ve.Ic=function(){return new gI(this)},$ve.Wc=function(){return new AO(this)},$ve.Xc=function(e){var t;if(t=this.gc(),e<0||e>t)throw Jb(new PR(e,t));return new fj(this,e)},$ve.ei=function(e,t){this.di(e,this.Vc(t))},$ve.Kc=function(e){return NZ(this,e)},$ve.gi=function(e,t){return t},$ve.Zc=function(e,t){return Xee(this,e,t)},$ve.Ib=function(){return _9(this)},$ve.ii=function(){return!0},$ve.ji=function(e,t){return C4(this,t)},$j(VOe,"AbstractEList",66),Vle(60,66,hNe,sc,yQ,J0),$ve.Qh=function(e,t){return bae(this,e,t)},$ve.Rh=function(e){return rne(this,e)},$ve.Sh=function(e,t){E6(this,e,t)},$ve.Th=function(e){xX(this,e)},$ve.ki=function(e){return vK(this,e)},$ve.$b=function(){SX(this)},$ve.Fc=function(e){return tie(this,e)},$ve.Xb=function(e){return FQ(this,e)},$ve.li=function(e){var t,n,r;++this.j,e>(n=null==this.g?0:this.g.length)&&(r=this.g,(t=n+(n/2|0)+4)=0&&(this.Yc(t),!0)},$ve.hi=function(e,t){return this.Pi(e,this.ji(e,t))},$ve.gc=function(){return this.Qi()},$ve.Nc=function(){return this.Ri()},$ve.Oc=function(e){return this.Si(e)},$ve.Ib=function(){return this.Ti()},$j(VOe,"DelegatingEList",1964),Vle(1965,1964,rRe),$ve.Qh=function(e,t){return cge(this,e,t)},$ve.Rh=function(e){return this.Qh(this.Qi(),e)},$ve.Sh=function(e,t){Dle(this,e,t)},$ve.Th=function(e){mle(this,e)},$ve.Xh=function(){return!this.Yi()},$ve.$b=function(){pme(this)},$ve.Ui=function(e,t,n,r,i){return new N$(this,e,t,n,r,i)},$ve.Vi=function(e){E2(this.vi(),e)},$ve.Wi=function(){return null},$ve.Xi=function(){return-1},$ve.vi=function(){return null},$ve.Yi=function(){return!1},$ve.Zi=function(e,t){return t},$ve.$i=function(e,t){return t},$ve._i=function(){return!1},$ve.aj=function(){return!this.Mi()},$ve.di=function(e,t){var n,r;return this._i()?(r=this.aj(),n=Pae(this,e,t),this.Vi(this.Ui(7,G6(t),n,e,r)),n):Pae(this,e,t)},$ve.Yc=function(e){var t,n,r,i;return this._i()?(n=null,r=this.aj(),t=this.Ui(4,i=xD(this,e),null,e,r),this.Yi()&&i?(n=this.$i(i,n))?(n.zi(t),n.Ai()):this.Vi(t):n?(n.zi(t),n.Ai()):this.Vi(t),i):(i=xD(this,e),this.Yi()&&i&&(n=this.$i(i,null))&&n.Ai(),i)},$ve.hi=function(e,t){return lge(this,e,t)},$j(cOe,"DelegatingNotifyingListImpl",1965),Vle(142,1,iRe),$ve.zi=function(e){return Rie(this,e)},$ve.Ai=function(){qK(this)},$ve.si=function(){return this.d},$ve.Wi=function(){return null},$ve.bj=function(){return null},$ve.ti=function(e){return-1},$ve.ui=function(){return whe(this)},$ve.vi=function(){return null},$ve.wi=function(){return vhe(this)},$ve.xi=function(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o},$ve.cj=function(){return!1},$ve.yi=function(e){var t,n,r,i,a,o,s,c;switch(this.d){case 1:case 2:switch(e.si()){case 1:case 2:if(Ak(e.vi())===Ak(this.vi())&&this.ti(null)==e.ti(null))return this.g=e.ui(),1==e.si()&&(this.d=1),!0}case 4:if(4===e.si()&&Ak(e.vi())===Ak(this.vi())&&this.ti(null)==e.ti(null))return o=Cme(this),a=this.o<0?this.o<-2?-2-this.o-1:-1:this.o,r=e.xi(),this.d=6,c=new yQ(2),a<=r?(cK(c,this.n),cK(c,e.wi()),this.g=m3(ay(Eit,1),kEe,24,15,[this.o=a,r+1])):(cK(c,e.wi()),cK(c,this.n),this.g=m3(ay(Eit,1),kEe,24,15,[this.o=r,a])),this.n=c,o||(this.o=-2-this.o-1),!0;break;case 6:if(4===e.si()&&Ak(e.vi())===Ak(this.vi())&&this.ti(null)==e.ti(null)){for(o=Cme(this),r=e.xi(),s=xL(this.g,47),n=HY(Eit,kEe,24,s.length+1,15,1),t=0;t>>0).toString(16))).a+=" (eventType: ",this.d){case 1:n.a+="SET";break;case 2:n.a+="UNSET";break;case 3:n.a+="ADD";break;case 5:n.a+="ADD_MANY";break;case 4:n.a+="REMOVE";break;case 6:n.a+="REMOVE_MANY";break;case 7:n.a+="MOVE";break;case 8:n.a+="REMOVING_ADAPTER";break;case 9:n.a+="RESOLVE";break;default:UE(n,this.d)}if(Zde(this)&&(n.a+=", touch: true"),n.a+=", position: ",UE(n,this.o<0?this.o<-2?-2-this.o-1:-1:this.o),n.a+=", notifier: ",Dk(n,this.vi()),n.a+=", feature: ",Dk(n,this.Wi()),n.a+=", oldValue: ",Dk(n,vhe(this)),n.a+=", newValue: ",6==this.d&&RM(this.g,47)){for(t=xL(this.g,47),n.a+="[",e=0;e10?(this.b&&this.c.j==this.a||(this.b=new UD(this),this.a=this.j),V_(this.b,e)):tie(this,e)},$ve.ii=function(){return!0},$ve.a=0,$j(VOe,"AbstractEList/1",959),Vle(295,73,ZEe,PR),$j(VOe,"AbstractEList/BasicIndexOutOfBoundsException",295),Vle(39,1,dye,gI),$ve.Nb=function(e){NU(this,e)},$ve.hj=function(){if(this.i.j!=this.f)throw Jb(new Sm)},$ve.ij=function(){return aee(this)},$ve.Ob=function(){return this.e!=this.i.gc()},$ve.Pb=function(){return this.ij()},$ve.Qb=function(){qre(this)},$ve.e=0,$ve.f=0,$ve.g=-1,$j(VOe,"AbstractEList/EIterator",39),Vle(276,39,_ye,AO,fj),$ve.Qb=function(){qre(this)},$ve.Rb=function(e){d9(this,e)},$ve.jj=function(){var e;try{return e=this.d.Xb(--this.e),this.hj(),this.g=this.e,e}catch(e){throw RM(e=H2(e),73)?(this.hj(),Jb(new mm)):Jb(e)}},$ve.kj=function(e){Hte(this,e)},$ve.Sb=function(){return 0!=this.e},$ve.Tb=function(){return this.e},$ve.Ub=function(){return this.jj()},$ve.Vb=function(){return this.e-1},$ve.Wb=function(e){this.kj(e)},$j(VOe,"AbstractEList/EListIterator",276),Vle(341,39,dye,kO),$ve.ij=function(){return oee(this)},$ve.Qb=function(){throw Jb(new _m)},$j(VOe,"AbstractEList/NonResolvingEIterator",341),Vle(384,276,_ye,CO,cP),$ve.Rb=function(e){throw Jb(new _m)},$ve.ij=function(){var e;try{return e=this.c.fi(this.e),this.hj(),this.g=this.e++,e}catch(e){throw RM(e=H2(e),73)?(this.hj(),Jb(new mm)):Jb(e)}},$ve.jj=function(){var e;try{return e=this.c.fi(--this.e),this.hj(),this.g=this.e,e}catch(e){throw RM(e=H2(e),73)?(this.hj(),Jb(new mm)):Jb(e)}},$ve.Qb=function(){throw Jb(new _m)},$ve.Wb=function(e){throw Jb(new _m)},$j(VOe,"AbstractEList/NonResolvingEListIterator",384),Vle(1955,66,sRe),$ve.Qh=function(e,t){var n,r,i,a,o,s,c,l,u;if(0!=(r=t.gc())){for(n=q4(this,(l=null==(c=xL(k2(this.a,4),124))?0:c.length)+r),(u=l-e)>0&&Abe(c,e,n,e+r,u),s=t.Ic(),a=0;an)throw Jb(new PR(e,n));return new OB(this,e)},$ve.$b=function(){var e,t;++this.j,t=null==(e=xL(k2(this.a,4),124))?0:e.length,See(this,null),zY(this,t,e)},$ve.Fc=function(e){var t,n,r,i;if(null!=(t=xL(k2(this.a,4),124)))if(null!=e){for(r=0,i=(n=t).length;r=(n=null==(t=xL(k2(this.a,4),124))?0:t.length))throw Jb(new PR(e,n));return t[e]},$ve.Vc=function(e){var t,n,r;if(null!=(t=xL(k2(this.a,4),124)))if(null!=e){for(n=0,r=t.length;nn)throw Jb(new PR(e,n));return new IB(this,e)},$ve.di=function(e,t){var n,r,i;if(e>=(i=null==(n=v7(this))?0:n.length))throw Jb(new Sv(lNe+e+uNe+i));if(t>=i)throw Jb(new Sv(fNe+t+uNe+i));return r=n[t],e!=t&&(e=(o=null==(n=xL(k2(e.a,4),124))?0:n.length))throw Jb(new PR(t,o));return i=n[t],1==o?r=null:(Abe(n,0,r=HY(itt,oRe,410,o-1,0,1),0,t),(a=o-t-1)>0&&Abe(n,t+1,r,t,a)),See(e,r),Hse(e,t,i),i}(this,e)},$ve.hi=function(e,t){var n,r;return r=(n=v7(this))[e],oM(n,e,C4(this,t)),See(this,n),r},$ve.gc=function(){var e;return null==(e=xL(k2(this.a,4),124))?0:e.length},$ve.Nc=function(){var e,t,n;return n=null==(e=xL(k2(this.a,4),124))?0:e.length,t=HY(itt,oRe,410,n,0,1),n>0&&Abe(e,0,t,0,n),t},$ve.Oc=function(e){var t,n;return(n=null==(t=xL(k2(this.a,4),124))?0:t.length)>0&&(e.lengthn&&Gj(e,n,null),e},$j(VOe,"ArrayDelegatingEList",1955),Vle(1026,39,dye,rX),$ve.hj=function(){if(this.b.j!=this.f||Ak(xL(k2(this.b.a,4),124))!==Ak(this.a))throw Jb(new Sm)},$ve.Qb=function(){qre(this),this.a=xL(k2(this.b.a,4),124)},$j(VOe,"ArrayDelegatingEList/EIterator",1026),Vle(698,276,_ye,_U,IB),$ve.hj=function(){if(this.b.j!=this.f||Ak(xL(k2(this.b.a,4),124))!==Ak(this.a))throw Jb(new Sm)},$ve.kj=function(e){Hte(this,e),this.a=xL(k2(this.b.a,4),124)},$ve.Qb=function(){qre(this),this.a=xL(k2(this.b.a,4),124)},$j(VOe,"ArrayDelegatingEList/EListIterator",698),Vle(1027,341,dye,iX),$ve.hj=function(){if(this.b.j!=this.f||Ak(xL(k2(this.b.a,4),124))!==Ak(this.a))throw Jb(new Sm)},$j(VOe,"ArrayDelegatingEList/NonResolvingEIterator",1027),Vle(699,384,_ye,SU,OB),$ve.hj=function(){if(this.b.j!=this.f||Ak(xL(k2(this.b.a,4),124))!==Ak(this.a))throw Jb(new Sm)},$j(VOe,"ArrayDelegatingEList/NonResolvingEListIterator",699),Vle(598,295,ZEe,iC),$j(VOe,"BasicEList/BasicIndexOutOfBoundsException",598),Vle(688,60,hNe,mk),$ve.Tc=function(e,t){throw Jb(new _m)},$ve.Dc=function(e){throw Jb(new _m)},$ve.Uc=function(e,t){throw Jb(new _m)},$ve.Ec=function(e){throw Jb(new _m)},$ve.$b=function(){throw Jb(new _m)},$ve.li=function(e){throw Jb(new _m)},$ve.Ic=function(){return this.Uh()},$ve.Wc=function(){return this.Vh()},$ve.Xc=function(e){return this.Wh(e)},$ve.di=function(e,t){throw Jb(new _m)},$ve.ei=function(e,t){throw Jb(new _m)},$ve.Yc=function(e){throw Jb(new _m)},$ve.Kc=function(e){throw Jb(new _m)},$ve.Zc=function(e,t){throw Jb(new _m)},$j(VOe,"BasicEList/UnmodifiableEList",688),Vle(697,1,{3:1,19:1,15:1,14:1,57:1,580:1}),$ve.Tc=function(e,t){!function(e,t,n){e.c.Tc(t,xL(n,133))}(this,e,xL(t,43))},$ve.Dc=function(e){return function(e,t){return e.c.Dc(xL(t,133))}(this,xL(e,43))},$ve.Hc=function(e){Jq(this,e)},$ve.Xb=function(e){return xL(FQ(this.c,e),133)},$ve.di=function(e,t){return xL(this.c.di(e,t),43)},$ve.ei=function(e,t){!function(e,t,n){e.c.ei(t,xL(n,133))}(this,e,xL(t,43))},$ve.Jc=function(){return new JD(null,new LG(this,16))},$ve.Yc=function(e){return xL(this.c.Yc(e),43)},$ve.Zc=function(e,t){return function(e,t,n){return xL(e.c.Zc(t,xL(n,133)),43)}(this,e,xL(t,43))},$ve.$c=function(e){J1(this,e)},$ve.Lc=function(){return new LG(this,16)},$ve.Mc=function(){return new JD(null,new LG(this,16))},$ve.Uc=function(e,t){return this.c.Uc(e,t)},$ve.Ec=function(e){return this.c.Ec(e)},$ve.$b=function(){this.c.$b()},$ve.Fc=function(e){return this.c.Fc(e)},$ve.Gc=function(e){return o3(this.c,e)},$ve.lj=function(){var e,t;if(null==this.d){for(this.d=HY(Zet,cRe,60,2*this.f+1,0,1),t=this.e,this.f=0,e=this.c.Ic();e.e!=e.i.gc();)Nte(this,xL(e.ij(),133));this.e=t}},$ve.Fb=function(e){return wP(this,e)},$ve.Hb=function(){return p3(this.c)},$ve.Vc=function(e){return this.c.Vc(e)},$ve.mj=function(){this.c=new wb(this)},$ve.dc=function(){return 0==this.f},$ve.Ic=function(){return this.c.Ic()},$ve.Wc=function(){return this.c.Wc()},$ve.Xc=function(e){return this.c.Xc(e)},$ve.nj=function(){return BY(this)},$ve.oj=function(e,t,n){return new eL(e,t,n)},$ve.pj=function(){return new fc},$ve.Kc=function(e){return ZJ(this,e)},$ve.gc=function(){return this.f},$ve._c=function(e,t){return new PG(this.c,e,t)},$ve.Nc=function(){return this.c.Nc()},$ve.Oc=function(e){return this.c.Oc(e)},$ve.Ib=function(){return _9(this.c)},$ve.e=0,$ve.f=0,$j(VOe,"BasicEMap",697),Vle(1021,60,hNe,wb),$ve.Yh=function(e,t){!function(e,t){Nte(e.a,t)}(this,xL(t,133))},$ve._h=function(e,t,n){++(xL(t,133),this).a.e},$ve.ai=function(e,t){!function(e,t){p8(e.a,t)}(this,xL(t,133))},$ve.bi=function(e,t,n){!function(e,t,n){p8(e.a,n),Nte(e.a,t)}(this,xL(t,133),xL(n,133))},$ve.$h=function(e,t){M2(this.a)},$j(VOe,"BasicEMap/1",1021),Vle(1022,60,hNe,fc),$ve.mi=function(e){return HY(stt,lRe,602,e,0,1)},$j(VOe,"BasicEMap/2",1022),Vle(1023,mye,wye,vb),$ve.$b=function(){this.a.c.$b()},$ve.Fc=function(e){return U9(this.a,e)},$ve.Ic=function(){return 0==this.a.f?(mN(),ott.a):new sE(this.a)},$ve.Kc=function(e){var t;return t=this.a.f,k7(this.a,e),this.a.f!=t},$ve.gc=function(){return this.a.f},$j(VOe,"BasicEMap/3",1023),Vle(uRe,28,bye,yb),$ve.$b=function(){this.a.c.$b()},$ve.Fc=function(e){return ude(this.a,e)},$ve.Ic=function(){return 0==this.a.f?(mN(),ott.a):new cE(this.a)},$ve.gc=function(){return this.a.f},$j(VOe,"BasicEMap/4",uRe),Vle(1025,mye,wye,Eb),$ve.$b=function(){this.a.c.$b()},$ve.Fc=function(e){var t,n,r,i,a,o,s,c,l;if(this.a.f>0&&RM(e,43)&&(this.a.lj(),i=null==(s=(c=xL(e,43)).ad())?0:L4(s),a=YN(this.a,i),t=this.a.d[a]))for(n=xL(t.g,364),l=t.i,o=0;o"+this.c},$ve.a=0;var ott,stt=$j(VOe,"BasicEMap/EntryImpl",602);Vle(531,1,{},nc),$j(VOe,"BasicEMap/View",531),Vle(751,1,{}),$ve.Fb=function(e){return aue((i$(),dFe),e)},$ve.Hb=function(){return _4((i$(),dFe))},$ve.Ib=function(){return Yae((i$(),dFe))},$j(VOe,"ECollections/BasicEmptyUnmodifiableEList",751),Vle(1283,1,_ye,hc),$ve.Nb=function(e){NU(this,e)},$ve.Rb=function(e){throw Jb(new _m)},$ve.Ob=function(){return!1},$ve.Sb=function(){return!1},$ve.Pb=function(){throw Jb(new mm)},$ve.Tb=function(){return 0},$ve.Ub=function(){throw Jb(new mm)},$ve.Vb=function(){return-1},$ve.Qb=function(){throw Jb(new _m)},$ve.Wb=function(e){throw Jb(new _m)},$j(VOe,"ECollections/BasicEmptyUnmodifiableEList/1",1283),Vle(1281,751,{19:1,15:1,14:1,57:1},yw),$ve.Tc=function(e,t){uE()},$ve.Dc=function(e){return fE()},$ve.Uc=function(e,t){return hE()},$ve.Ec=function(e){return dE()},$ve.$b=function(){pE()},$ve.Fc=function(e){return!1},$ve.Gc=function(e){return!1},$ve.Hc=function(e){Jq(this,e)},$ve.Xb=function(e){return $k((i$(),e)),null},$ve.Vc=function(e){return-1},$ve.dc=function(){return!0},$ve.Ic=function(){return this.a},$ve.Wc=function(){return this.a},$ve.Xc=function(e){return this.a},$ve.di=function(e,t){return gE()},$ve.ei=function(e,t){bE()},$ve.Jc=function(){return new JD(null,new LG(this,16))},$ve.Yc=function(e){return mE()},$ve.Kc=function(e){return wE()},$ve.Zc=function(e,t){return vE()},$ve.gc=function(){return 0},$ve.$c=function(e){J1(this,e)},$ve.Lc=function(){return new LG(this,16)},$ve.Mc=function(){return new JD(null,new LG(this,16))},$ve._c=function(e,t){return i$(),new PG(dFe,e,t)},$ve.Nc=function(){return nU((i$(),dFe))},$ve.Oc=function(e){return i$(),cne(dFe,e)},$j(VOe,"ECollections/EmptyUnmodifiableEList",1281),Vle(1282,751,{19:1,15:1,14:1,57:1,580:1},Ew),$ve.Tc=function(e,t){uE()},$ve.Dc=function(e){return fE()},$ve.Uc=function(e,t){return hE()},$ve.Ec=function(e){return dE()},$ve.$b=function(){pE()},$ve.Fc=function(e){return!1},$ve.Gc=function(e){return!1},$ve.Hc=function(e){Jq(this,e)},$ve.Xb=function(e){return $k((i$(),e)),null},$ve.Vc=function(e){return-1},$ve.dc=function(){return!0},$ve.Ic=function(){return this.a},$ve.Wc=function(){return this.a},$ve.Xc=function(e){return this.a},$ve.di=function(e,t){return gE()},$ve.ei=function(e,t){bE()},$ve.Jc=function(){return new JD(null,new LG(this,16))},$ve.Yc=function(e){return mE()},$ve.Kc=function(e){return wE()},$ve.Zc=function(e,t){return vE()},$ve.gc=function(){return 0},$ve.$c=function(e){J1(this,e)},$ve.Lc=function(){return new LG(this,16)},$ve.Mc=function(){return new JD(null,new LG(this,16))},$ve._c=function(e,t){return i$(),new PG(dFe,e,t)},$ve.Nc=function(){return nU((i$(),dFe))},$ve.Oc=function(e){return i$(),cne(dFe,e)},$ve.nj=function(){return i$(),i$(),pFe},$j(VOe,"ECollections/EmptyUnmodifiableEMap",1282);var ctt,ltt=TD(VOe,"Enumerator");Vle(279,1,{279:1},mde),$ve.Fb=function(e){var t;return this===e||!!RM(e,279)&&(t=xL(e,279),this.f==t.f&&function(e,t){return null==e?null==t:X7(e,t)}(this.i,t.i)&&lF(this.a,0!=(256&this.f)?0!=(256&t.f)?t.a:null:0!=(256&t.f)?null:t.a)&&lF(this.d,t.d)&&lF(this.g,t.g)&&lF(this.e,t.e)&&function(e,t){var n,r;if(e.j.length!=t.j.length)return!1;for(n=0,r=e.j.length;n=0?e.wh(n):Ece(e,t)},$j(mOe,"BasicEObjectImpl/4",1015),Vle(1956,1,{107:1}),$ve.Yj=function(e){this.e=0==e?pnt:HY(LLe,aye,1,e,5,1)},$ve.xh=function(e){return this.e[e]},$ve.yh=function(e,t){this.e[e]=t},$ve.zh=function(e){this.e[e]=null},$ve.Zj=function(){return this.c},$ve.$j=function(){throw Jb(new _m)},$ve._j=function(){throw Jb(new _m)},$ve.ak=function(){return this.d},$ve.bk=function(){return null!=this.e},$ve.ck=function(e){this.c=e},$ve.dk=function(e){throw Jb(new _m)},$ve.ek=function(e){throw Jb(new _m)},$ve.fk=function(e){this.d=e},$j(mOe,"BasicEObjectImpl/EPropertiesHolderBaseImpl",1956),Vle(187,1956,{107:1},Mf),$ve.$j=function(){return this.a},$ve._j=function(){return this.b},$ve.dk=function(e){this.a=e},$ve.ek=function(e){this.b=e},$j(mOe,"BasicEObjectImpl/EPropertiesHolderImpl",187),Vle(498,96,bOe,wc),$ve.Fg=function(){return this.f},$ve.Kg=function(){return this.k},$ve.Mg=function(e,t){this.g=e,this.i=t},$ve.Og=function(){return 0==(2&this.j)?this.uh():this.kh().Zj()},$ve.Qg=function(){return this.i},$ve.Hg=function(){return 0!=(1&this.j)},$ve.$g=function(){return this.g},$ve.fh=function(){return 0!=(4&this.j)},$ve.kh=function(){return!this.k&&(this.k=new Mf),this.k},$ve.oh=function(e){this.kh().ck(e),e?this.j|=2:this.j&=-3},$ve.qh=function(e){this.kh().ek(e),e?this.j|=4:this.j&=-5},$ve.uh=function(){return(Ij(),Gtt).S},$ve.i=0,$ve.j=1,$j(mOe,"EObjectImpl",498),Vle(763,498,{104:1,91:1,89:1,55:1,107:1,48:1,96:1},VL),$ve.xh=function(e){return this.e[e]},$ve.yh=function(e,t){this.e[e]=t},$ve.zh=function(e){this.e[e]=null},$ve.Og=function(){return this.d},$ve.Tg=function(e){return k9(this.d,e)},$ve.Vg=function(){return this.d},$ve.Zg=function(){return null!=this.e},$ve.kh=function(){return!this.k&&(this.k=new mc),this.k},$ve.oh=function(e){this.d=e},$ve.th=function(){var e;return null==this.e&&(e=Oj(this.d),this.e=0==e?gnt:HY(LLe,aye,1,e,5,1)),this},$ve.vh=function(){return 0},$j(mOe,"DynamicEObjectImpl",763),Vle(1347,763,{104:1,43:1,91:1,89:1,133:1,55:1,107:1,48:1,96:1},SD),$ve.Fb=function(e){return this===e},$ve.Hb=function(){return eO(this)},$ve.oh=function(e){this.d=e,this.b=Dfe(e,"key"),this.c=Dfe(e,kOe)},$ve.Nh=function(){var e;return-1==this.a&&(e=SZ(this,this.b),this.a=null==e?0:L4(e)),this.a},$ve.ad=function(){return SZ(this,this.b)},$ve.bd=function(){return SZ(this,this.c)},$ve.Oh=function(e){this.a=e},$ve.Ph=function(e){mH(this,this.b,e)},$ve.cd=function(e){var t;return t=SZ(this,this.c),mH(this,this.c,e),t},$ve.a=0,$j(mOe,"DynamicEObjectImpl/BasicEMapEntry",1347),Vle(1348,1,{107:1},mc),$ve.Yj=function(e){throw Jb(new _m)},$ve.xh=function(e){throw Jb(new _m)},$ve.yh=function(e,t){throw Jb(new _m)},$ve.zh=function(e){throw Jb(new _m)},$ve.Zj=function(){throw Jb(new _m)},$ve.$j=function(){return this.a},$ve._j=function(){return this.b},$ve.ak=function(){return this.c},$ve.bk=function(){throw Jb(new _m)},$ve.ck=function(e){throw Jb(new _m)},$ve.dk=function(e){this.a=e},$ve.ek=function(e){this.b=e},$ve.fk=function(e){this.c=e},$j(mOe,"DynamicEObjectImpl/DynamicEPropertiesHolderImpl",1348),Vle(502,150,{104:1,91:1,89:1,581:1,147:1,55:1,107:1,48:1,96:1,502:1,150:1,113:1,116:1},vc),$ve.Lg=function(e){return mre(this,e)},$ve.Wg=function(e,t,n){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),this.Ab;case 1:return this.d;case 2:return n?(!this.b&&(this.b=new rN((Fve(),unt),Dnt,this)),this.b):(!this.b&&(this.b=new rN((Fve(),unt),Dnt,this)),BY(this.b));case 3:return zH(this);case 4:return!this.a&&(this.a=new iI(_et,this,4)),this.a;case 5:return!this.c&&(this.c=new hI(_et,this,5)),this.c}return HK(this,e-Oj((Fve(),Vtt)),mQ(xL(k2(this,16),26)||Vtt,e),t,n)},$ve.bh=function(e,t,n){var r;switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),H9(this.Ab,e,n);case 3:return this.Cb&&(n=(r=this.Db>>16)>=0?mre(this,n):this.Cb.dh(this,-1-r,null,n)),BF(this,xL(e,147),n)}return xL(mQ(xL(k2(this,16),26)||(Fve(),Vtt),t),65).Ij().Lj(this,q7(this),t-Oj((Fve(),Vtt)),e,n)},$ve.eh=function(e,t,n){switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),Yee(this.Ab,e,n);case 2:return!this.b&&(this.b=new rN((Fve(),unt),Dnt,this)),vP(this.b,e,n);case 3:return BF(this,null,n);case 4:return!this.a&&(this.a=new iI(_et,this,4)),Yee(this.a,e,n)}return xL(mQ(xL(k2(this,16),26)||(Fve(),Vtt),t),65).Ij().Mj(this,q7(this),t-Oj((Fve(),Vtt)),e,n)},$ve.gh=function(e){switch(e){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.d;case 2:return!!this.b&&0!=this.b.f;case 3:return!!zH(this);case 4:return!!this.a&&0!=this.a.i;case 5:return!!this.c&&0!=this.c.i}return PW(this,e-Oj((Fve(),Vtt)),mQ(xL(k2(this,16),26)||Vtt,e))},$ve.nh=function(e,t){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),lme(this.Ab),!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void Bj(this.Ab,xL(t,15));case 1:return void function(e,t){v1(e,null==t?null:(sB(t),t))}(this,RN(t));case 2:return!this.b&&(this.b=new rN((Fve(),unt),Dnt,this)),void Y0(this.b,t);case 3:return void Nfe(this,xL(t,147));case 4:return!this.a&&(this.a=new iI(_et,this,4)),lme(this.a),!this.a&&(this.a=new iI(_et,this,4)),void Bj(this.a,xL(t,15));case 5:return!this.c&&(this.c=new hI(_et,this,5)),lme(this.c),!this.c&&(this.c=new hI(_et,this,5)),void Bj(this.c,xL(t,15))}G8(this,e-Oj((Fve(),Vtt)),mQ(xL(k2(this,16),26)||Vtt,e),t)},$ve.uh=function(){return Fve(),Vtt},$ve.wh=function(e){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void lme(this.Ab);case 1:return void v1(this,null);case 2:return!this.b&&(this.b=new rN((Fve(),unt),Dnt,this)),void this.b.c.$b();case 3:return void Nfe(this,null);case 4:return!this.a&&(this.a=new iI(_et,this,4)),void lme(this.a);case 5:return!this.c&&(this.c=new hI(_et,this,5)),void lme(this.c)}y6(this,e-Oj((Fve(),Vtt)),mQ(xL(k2(this,16),26)||Vtt,e))},$ve.Ib=function(){return P6(this)},$ve.d=null,$j(mOe,"EAnnotationImpl",502),Vle(143,697,ARe,iK),$ve.Sh=function(e,t){!function(e,t,n){xL(e.c,67).Sh(t,n)}(this,e,xL(t,43))},$ve.gk=function(e,t){return function(e,t,n){return xL(e.c,67).gk(t,n)}(this,xL(e,43),t)},$ve.ki=function(e){return xL(xL(this.c,67).ki(e),133)},$ve.Uh=function(){return xL(this.c,67).Uh()},$ve.Vh=function(){return xL(this.c,67).Vh()},$ve.Wh=function(e){return xL(this.c,67).Wh(e)},$ve.hk=function(e,t){return vP(this,e,t)},$ve.Rj=function(e){return xL(this.c,76).Rj(e)},$ve.mj=function(){},$ve.aj=function(){return xL(this.c,76).aj()},$ve.oj=function(e,t,n){var r;return(r=xL(WQ(this.b).Ih().Eh(this.b),133)).Oh(e),r.Ph(t),r.cd(n),r},$ve.pj=function(){return new Fb(this)},$ve.Wb=function(e){Y0(this,e)},$ve.Sj=function(){xL(this.c,76).Sj()},$j(xRe,"EcoreEMap",143),Vle(158,143,ARe,rN),$ve.lj=function(){var e,t,n,r,i;if(null==this.d){for(i=HY(Zet,cRe,60,2*this.f+1,0,1),n=this.c.Ic();n.e!=n.i.gc();)!(e=i[r=((t=xL(n.ij(),133)).Nh()&Jve)%i.length])&&(e=i[r]=new Fb(this)),e.Dc(t);this.d=i}},$j(mOe,"EAnnotationImpl/1",158),Vle(283,431,{104:1,91:1,89:1,147:1,191:1,55:1,107:1,466:1,48:1,96:1,150:1,283:1,113:1,116:1}),$ve.Wg=function(e,t,n){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return pO(),0!=(256&this.Bb);case 3:return pO(),0!=(512&this.Bb);case 4:return G6(this.s);case 5:return G6(this.t);case 6:return pO(),!!this.Vj();case 7:return pO(),this.s>=1;case 8:return t?Ere(this):this.r;case 9:return this.q}return HK(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e),t,n)},$ve.eh=function(e,t,n){switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),Yee(this.Ab,e,n);case 9:return jj(this,n)}return xL(mQ(xL(k2(this,16),26)||this.uh(),t),65).Ij().Mj(this,q7(this),t-Oj(this.uh()),e,n)},$ve.gh=function(e){switch(e){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return 0==(256&this.Bb);case 3:return 0==(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return this.Vj();case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==lB(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==lB(this.q).i)}return PW(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e))},$ve.nh=function(e,t){var n;switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),lme(this.Ab),!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void Bj(this.Ab,xL(t,15));case 1:return void this.Gh(RN(t));case 2:return void B6(this,Av(ON(t)));case 3:return void D6(this,Av(ON(t)));case 4:return void MJ(this,xL(t,20).a);case 5:return void this.jk(xL(t,20).a);case 8:return void D5(this,xL(t,138));case 9:return void((n=mae(this,xL(t,86),null))&&n.Ai())}G8(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e),t)},$ve.uh=function(){return Fve(),hnt},$ve.wh=function(e){var t;switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void lme(this.Ab);case 1:return void this.Gh(null);case 2:return void B6(this,!0);case 3:return void D6(this,!0);case 4:return void MJ(this,0);case 5:return void this.jk(1);case 8:return void D5(this,null);case 9:return void((t=mae(this,null,null))&&t.Ai())}y6(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e))},$ve.Bh=function(){Ere(this),this.Bb|=1},$ve.Tj=function(){return Ere(this)},$ve.Uj=function(){return this.t},$ve.Vj=function(){var e;return(e=this.t)>1||-1==e},$ve.ci=function(){return 0!=(512&this.Bb)},$ve.ik=function(e,t){return _6(this,e,t)},$ve.jk=function(e){IJ(this,e)},$ve.Ib=function(){return Sle(this)},$ve.s=0,$ve.t=1,$j(mOe,"ETypedElementImpl",283),Vle(443,283,{104:1,91:1,89:1,147:1,191:1,55:1,170:1,65:1,107:1,466:1,48:1,96:1,150:1,443:1,283:1,113:1,116:1,665:1}),$ve.Lg=function(e){return Yne(this,e)},$ve.Wg=function(e,t,n){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return pO(),0!=(256&this.Bb);case 3:return pO(),0!=(512&this.Bb);case 4:return G6(this.s);case 5:return G6(this.t);case 6:return pO(),!!this.Vj();case 7:return pO(),this.s>=1;case 8:return t?Ere(this):this.r;case 9:return this.q;case 10:return pO(),0!=(this.Bb&uRe);case 11:return pO(),0!=(this.Bb&MRe);case 12:return pO(),0!=(this.Bb&n_e);case 13:return this.j;case 14:return ofe(this);case 15:return pO(),0!=(this.Bb&CRe);case 16:return pO(),0!=(this.Bb&Cye);case 17:return HH(this)}return HK(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e),t,n)},$ve.bh=function(e,t,n){var r;switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),H9(this.Ab,e,n);case 17:return this.Cb&&(n=(r=this.Db>>16)>=0?Yne(this,n):this.Cb.dh(this,-1-r,null,n)),Fpe(this,e,17,n)}return xL(mQ(xL(k2(this,16),26)||this.uh(),t),65).Ij().Lj(this,q7(this),t-Oj(this.uh()),e,n)},$ve.eh=function(e,t,n){switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),Yee(this.Ab,e,n);case 9:return jj(this,n);case 17:return Fpe(this,null,17,n)}return xL(mQ(xL(k2(this,16),26)||this.uh(),t),65).Ij().Mj(this,q7(this),t-Oj(this.uh()),e,n)},$ve.gh=function(e){switch(e){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return 0==(256&this.Bb);case 3:return 0==(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return this.Vj();case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==lB(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==lB(this.q).i);case 10:return 0==(this.Bb&uRe);case 11:return 0!=(this.Bb&MRe);case 12:return 0!=(this.Bb&n_e);case 13:return null!=this.j;case 14:return null!=ofe(this);case 15:return 0!=(this.Bb&CRe);case 16:return 0!=(this.Bb&Cye);case 17:return!!HH(this)}return PW(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e))},$ve.nh=function(e,t){var n;switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),lme(this.Ab),!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void Bj(this.Ab,xL(t,15));case 1:return void AG(this,RN(t));case 2:return void B6(this,Av(ON(t)));case 3:return void D6(this,Av(ON(t)));case 4:return void MJ(this,xL(t,20).a);case 5:return void this.jk(xL(t,20).a);case 8:return void D5(this,xL(t,138));case 9:return void((n=mae(this,xL(t,86),null))&&n.Ai());case 10:return void f8(this,Av(ON(t)));case 11:return void h8(this,Av(ON(t)));case 12:return void u8(this,Av(ON(t)));case 13:return void uk(this,RN(t));case 15:return void d8(this,Av(ON(t)));case 16:return void _8(this,Av(ON(t)))}G8(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e),t)},$ve.uh=function(){return Fve(),fnt},$ve.wh=function(e){var t;switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void lme(this.Ab);case 1:return RM(this.Cb,87)&&cce(yX(xL(this.Cb,87)),4),void o0(this,null);case 2:return void B6(this,!0);case 3:return void D6(this,!0);case 4:return void MJ(this,0);case 5:return void this.jk(1);case 8:return void D5(this,null);case 9:return void((t=mae(this,null,null))&&t.Ai());case 10:return void f8(this,!0);case 11:return void h8(this,!1);case 12:return void u8(this,!1);case 13:return this.i=null,void N1(this,null);case 15:return void d8(this,!1);case 16:return void _8(this,!1)}y6(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e))},$ve.Bh=function(){Oz(gZ((yse(),$nt),this)),Ere(this),this.Bb|=1},$ve.Bj=function(){return this.f},$ve.uj=function(){return ofe(this)},$ve.Cj=function(){return HH(this)},$ve.Gj=function(){return null},$ve.kk=function(){return this.k},$ve.Xi=function(){return this.n},$ve.Hj=function(){return vie(this)},$ve.Ij=function(){var e,t,n,r,i,a,o,s,c;return this.p||((null==(n=HH(this)).i&&Oge(n),n.i).length,(r=this.Gj())&&Oj(HH(r)),e=(o=(i=Ere(this)).wj())?0!=(1&o.i)?o==_it?TDe:o==Eit?LDe:o==Ait?NDe:o==Tit?ODe:o==Sit?zDe:o==kit?HDe:o==xit?CDe:IDe:o:null,t=ofe(this),s=i.uj(),function(e){var t,n;for(n=function(e){var t,n,r,i,a,o,s;if((t=e.Ch(JRe))&&null!=(s=RN(G9((!t.b&&(t.b=new rN((Fve(),unt),Dnt,t)),t.b),"settingDelegates")))){for(n=new $b,a=0,o=(i=ipe(s,"\\w+")).length;a1||-1==c?this.nk()?0!=(this.Bb&CRe)?this.p=e?new $z(25,e,this,r):new aq(24,this,r):this.p=e?new $z(27,e,this,r):new aq(26,this,r):0!=(this.Bb&CRe)?this.p=e?new $z(29,e,this,r):new aq(28,this,r):this.p=e?new $z(31,e,this,r):new aq(30,this,r):this.nk()?0!=(this.Bb&CRe)?this.p=e?new $z(33,e,this,r):new aq(32,this,r):this.p=e?new $z(35,e,this,r):new aq(34,this,r):0!=(this.Bb&CRe)?this.p=e?new $z(37,e,this,r):new aq(36,this,r):this.p=e?new $z(39,e,this,r):new aq(38,this,r):this.nk()?0!=(this.Bb&CRe)?this.p=e?new tL(17,e,this):new P$(16,this):this.p=e?new tL(19,e,this):new P$(18,this):0!=(this.Bb&CRe)?this.p=e?new tL(21,e,this):new P$(20,this):this.p=e?new tL(23,e,this):new P$(22,this):this.lk()?this.nk()?this.p=new rL(xL(i,26),this,r):this.p=new rH(xL(i,26),this,r):RM(i,148)?e==Ent?this.p=new P$(40,this):0!=(this.Bb&CRe)?this.p=e?new VF(t,s,this,(Y9(),o==Eit?Nnt:o==_it?knt:o==Sit?Rnt:o==Ait?Ont:o==Tit?Int:o==kit?Lnt:o==xit?Cnt:o==yit?Mnt:Pnt)):new Gz(xL(i,148),t,s,this):this.p=e?new GF(t,s,this,(Y9(),o==Eit?Nnt:o==_it?knt:o==Sit?Rnt:o==Ait?Ont:o==Tit?Int:o==kit?Lnt:o==xit?Cnt:o==yit?Mnt:Pnt)):new Hz(xL(i,148),t,s,this):this.mk()?r?0!=(this.Bb&CRe)?this.nk()?this.p=new sL(xL(i,26),this,r):this.p=new oL(xL(i,26),this,r):this.nk()?this.p=new aL(xL(i,26),this,r):this.p=new iL(xL(i,26),this,r):0!=(this.Bb&CRe)?this.nk()?this.p=new fN(xL(i,26),this):this.p=new uN(xL(i,26),this):this.nk()?this.p=new lN(xL(i,26),this):this.p=new cN(xL(i,26),this):this.nk()?r?0!=(this.Bb&CRe)?this.p=new uL(xL(i,26),this,r):this.p=new cL(xL(i,26),this,r):0!=(this.Bb&CRe)?this.p=new pN(xL(i,26),this):this.p=new hN(xL(i,26),this):r?0!=(this.Bb&CRe)?this.p=new fL(xL(i,26),this,r):this.p=new lL(xL(i,26),this,r):0!=(this.Bb&CRe)?this.p=new dN(xL(i,26),this):this.p=new eF(xL(i,26),this)),this.p},$ve.Dj=function(){return 0!=(this.Bb&uRe)},$ve.lk=function(){return!1},$ve.mk=function(){return!1},$ve.Ej=function(){return 0!=(this.Bb&Cye)},$ve.Jj=function(){return RZ(this)},$ve.nk=function(){return!1},$ve.Fj=function(){return 0!=(this.Bb&CRe)},$ve.ok=function(e){this.k=e},$ve.Gh=function(e){AG(this,e)},$ve.Ib=function(){return Cde(this)},$ve.e=!1,$ve.n=0,$j(mOe,"EStructuralFeatureImpl",443),Vle(321,443,{104:1,91:1,89:1,32:1,147:1,191:1,55:1,170:1,65:1,107:1,466:1,48:1,96:1,321:1,150:1,443:1,283:1,113:1,116:1,665:1},Aw),$ve.Wg=function(e,t,n){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return pO(),0!=(256&this.Bb);case 3:return pO(),0!=(512&this.Bb);case 4:return G6(this.s);case 5:return G6(this.t);case 6:return pO(),!!Gce(this);case 7:return pO(),this.s>=1;case 8:return t?Ere(this):this.r;case 9:return this.q;case 10:return pO(),0!=(this.Bb&uRe);case 11:return pO(),0!=(this.Bb&MRe);case 12:return pO(),0!=(this.Bb&n_e);case 13:return this.j;case 14:return ofe(this);case 15:return pO(),0!=(this.Bb&CRe);case 16:return pO(),0!=(this.Bb&Cye);case 17:return HH(this);case 18:return pO(),0!=(this.Bb&gOe);case 19:return t?g3(this):KX(this)}return HK(this,e-Oj((Fve(),Wtt)),mQ(xL(k2(this,16),26)||Wtt,e),t,n)},$ve.gh=function(e){switch(e){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return 0==(256&this.Bb);case 3:return 0==(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return Gce(this);case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==lB(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==lB(this.q).i);case 10:return 0==(this.Bb&uRe);case 11:return 0!=(this.Bb&MRe);case 12:return 0!=(this.Bb&n_e);case 13:return null!=this.j;case 14:return null!=ofe(this);case 15:return 0!=(this.Bb&CRe);case 16:return 0!=(this.Bb&Cye);case 17:return!!HH(this);case 18:return 0!=(this.Bb&gOe);case 19:return!!KX(this)}return PW(this,e-Oj((Fve(),Wtt)),mQ(xL(k2(this,16),26)||Wtt,e))},$ve.nh=function(e,t){var n;switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),lme(this.Ab),!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void Bj(this.Ab,xL(t,15));case 1:return void AG(this,RN(t));case 2:return void B6(this,Av(ON(t)));case 3:return void D6(this,Av(ON(t)));case 4:return void MJ(this,xL(t,20).a);case 5:return void AE(this,xL(t,20).a);case 8:return void D5(this,xL(t,138));case 9:return void((n=mae(this,xL(t,86),null))&&n.Ai());case 10:return void f8(this,Av(ON(t)));case 11:return void h8(this,Av(ON(t)));case 12:return void u8(this,Av(ON(t)));case 13:return void uk(this,RN(t));case 15:return void d8(this,Av(ON(t)));case 16:return void _8(this,Av(ON(t)));case 18:return void y8(this,Av(ON(t)))}G8(this,e-Oj((Fve(),Wtt)),mQ(xL(k2(this,16),26)||Wtt,e),t)},$ve.uh=function(){return Fve(),Wtt},$ve.wh=function(e){var t;switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void lme(this.Ab);case 1:return RM(this.Cb,87)&&cce(yX(xL(this.Cb,87)),4),void o0(this,null);case 2:return void B6(this,!0);case 3:return void D6(this,!0);case 4:return void MJ(this,0);case 5:return this.b=0,void IJ(this,1);case 8:return void D5(this,null);case 9:return void((t=mae(this,null,null))&&t.Ai());case 10:return void f8(this,!0);case 11:return void h8(this,!1);case 12:return void u8(this,!1);case 13:return this.i=null,void N1(this,null);case 15:return void d8(this,!1);case 16:return void _8(this,!1);case 18:return void y8(this,!1)}y6(this,e-Oj((Fve(),Wtt)),mQ(xL(k2(this,16),26)||Wtt,e))},$ve.Bh=function(){g3(this),Oz(gZ((yse(),$nt),this)),Ere(this),this.Bb|=1},$ve.Vj=function(){return Gce(this)},$ve.ik=function(e,t){return this.b=0,this.a=null,_6(this,e,t)},$ve.jk=function(e){AE(this,e)},$ve.Ib=function(){var e;return 0!=(64&this.Db)?Cde(this):((e=new BI(Cde(this))).a+=" (iD: ",jE(e,0!=(this.Bb&gOe)),e.a+=")",e.a)},$ve.b=0,$j(mOe,"EAttributeImpl",321),Vle(348,431,{104:1,91:1,89:1,138:1,147:1,191:1,55:1,107:1,48:1,96:1,348:1,150:1,113:1,116:1,664:1}),$ve.pk=function(e){return e.Og()==this},$ve.Lg=function(e){return Lne(this,e)},$ve.Mg=function(e,t){this.w=null,this.Db=t<<16|255&this.Db,this.Cb=e},$ve.Wg=function(e,t,n){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return null!=this.D?this.D:this.B;case 3:return pne(this);case 4:return this.uj();case 5:return this.F;case 6:return t?WQ(this):GH(this);case 7:return!this.A&&(this.A=new lI(vnt,this,7)),this.A}return HK(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e),t,n)},$ve.bh=function(e,t,n){var r;switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),H9(this.Ab,e,n);case 6:return this.Cb&&(n=(r=this.Db>>16)>=0?Lne(this,n):this.Cb.dh(this,-1-r,null,n)),Fpe(this,e,6,n)}return xL(mQ(xL(k2(this,16),26)||this.uh(),t),65).Ij().Lj(this,q7(this),t-Oj(this.uh()),e,n)},$ve.eh=function(e,t,n){switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),Yee(this.Ab,e,n);case 6:return Fpe(this,null,6,n);case 7:return!this.A&&(this.A=new lI(vnt,this,7)),Yee(this.A,e,n)}return xL(mQ(xL(k2(this,16),26)||this.uh(),t),65).Ij().Mj(this,q7(this),t-Oj(this.uh()),e,n)},$ve.gh=function(e){switch(e){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.D&&this.D==this.F;case 3:return!!pne(this);case 4:return null!=this.uj();case 5:return null!=this.F&&this.F!=this.D&&this.F!=this.B;case 6:return!!GH(this);case 7:return!!this.A&&0!=this.A.i}return PW(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e))},$ve.nh=function(e,t){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),lme(this.Ab),!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void Bj(this.Ab,xL(t,15));case 1:return void kG(this,RN(t));case 2:return void jC(this,RN(t));case 5:return void kme(this,RN(t));case 7:return!this.A&&(this.A=new lI(vnt,this,7)),lme(this.A),!this.A&&(this.A=new lI(vnt,this,7)),void Bj(this.A,xL(t,15))}G8(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e),t)},$ve.uh=function(){return Fve(),Xtt},$ve.wh=function(e){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void lme(this.Ab);case 1:return RM(this.Cb,179)&&(xL(this.Cb,179).tb=null),void o0(this,null);case 2:return i5(this,null),void NJ(this,this.D);case 5:return void kme(this,null);case 7:return!this.A&&(this.A=new lI(vnt,this,7)),void lme(this.A)}y6(this,e-Oj(this.uh()),mQ(xL(k2(this,16),26)||this.uh(),e))},$ve.tj=function(){var e;return-1==this.G&&(this.G=(e=WQ(this))?dte(e.Hh(),this):-1),this.G},$ve.uj=function(){return null},$ve.vj=function(){return WQ(this)},$ve.qk=function(){return this.v},$ve.wj=function(){return pne(this)},$ve.xj=function(){return null!=this.D?this.D:this.B},$ve.yj=function(){return this.F},$ve.rj=function(e){return gge(this,e)},$ve.rk=function(e){this.v=e},$ve.sk=function(e){M0(this,e)},$ve.tk=function(e){this.C=e},$ve.Gh=function(e){kG(this,e)},$ve.Ib=function(){return I9(this)},$ve.C=null,$ve.D=null,$ve.G=-1,$j(mOe,"EClassifierImpl",348),Vle(87,348,{104:1,91:1,89:1,26:1,138:1,147:1,191:1,55:1,107:1,48:1,96:1,87:1,348:1,150:1,467:1,113:1,116:1,664:1},If),$ve.pk=function(e){return function(e,t){return t==e||tie(afe(t),e)}(this,e.Og())},$ve.Wg=function(e,t,n){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return null!=this.D?this.D:this.B;case 3:return pne(this);case 4:return null;case 5:return this.F;case 6:return t?WQ(this):GH(this);case 7:return!this.A&&(this.A=new lI(vnt,this,7)),this.A;case 8:return pO(),0!=(256&this.Bb);case 9:return pO(),0!=(512&this.Bb);case 10:return D$(this);case 11:return!this.q&&(this.q=new AU(jtt,this,11,10)),this.q;case 12:return Ebe(this);case 13:return fbe(this);case 14:return fbe(this),this.r;case 15:return Ebe(this),this.k;case 16:return Lse(this);case 17:return Jge(this);case 18:return Oge(this);case 19:return afe(this);case 20:return Ebe(this),this.o;case 21:return!this.s&&(this.s=new AU(Mtt,this,21,17)),this.s;case 22:return XW(this);case 23:return ode(this)}return HK(this,e-Oj((Fve(),qtt)),mQ(xL(k2(this,16),26)||qtt,e),t,n)},$ve.bh=function(e,t,n){var r;switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),H9(this.Ab,e,n);case 6:return this.Cb&&(n=(r=this.Db>>16)>=0?Lne(this,n):this.Cb.dh(this,-1-r,null,n)),Fpe(this,e,6,n);case 11:return!this.q&&(this.q=new AU(jtt,this,11,10)),H9(this.q,e,n);case 21:return!this.s&&(this.s=new AU(Mtt,this,21,17)),H9(this.s,e,n)}return xL(mQ(xL(k2(this,16),26)||(Fve(),qtt),t),65).Ij().Lj(this,q7(this),t-Oj((Fve(),qtt)),e,n)},$ve.eh=function(e,t,n){switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),Yee(this.Ab,e,n);case 6:return Fpe(this,null,6,n);case 7:return!this.A&&(this.A=new lI(vnt,this,7)),Yee(this.A,e,n);case 11:return!this.q&&(this.q=new AU(jtt,this,11,10)),Yee(this.q,e,n);case 21:return!this.s&&(this.s=new AU(Mtt,this,21,17)),Yee(this.s,e,n);case 22:return Yee(XW(this),e,n)}return xL(mQ(xL(k2(this,16),26)||(Fve(),qtt),t),65).Ij().Mj(this,q7(this),t-Oj((Fve(),qtt)),e,n)},$ve.gh=function(e){switch(e){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.D&&this.D==this.F;case 3:return!!pne(this);case 4:return!1;case 5:return null!=this.F&&this.F!=this.D&&this.F!=this.B;case 6:return!!GH(this);case 7:return!!this.A&&0!=this.A.i;case 8:return 0!=(256&this.Bb);case 9:return 0!=(512&this.Bb);case 10:return!(!this.u||0==XW(this.u.a).i||this.n&&jte(this.n));case 11:return!!this.q&&0!=this.q.i;case 12:return 0!=Ebe(this).i;case 13:return 0!=fbe(this).i;case 14:return fbe(this),0!=this.r.i;case 15:return Ebe(this),0!=this.k.i;case 16:return 0!=Lse(this).i;case 17:return 0!=Jge(this).i;case 18:return 0!=Oge(this).i;case 19:return 0!=afe(this).i;case 20:return Ebe(this),!!this.o;case 21:return!!this.s&&0!=this.s.i;case 22:return!!this.n&&jte(this.n);case 23:return 0!=ode(this).i}return PW(this,e-Oj((Fve(),qtt)),mQ(xL(k2(this,16),26)||qtt,e))},$ve.jh=function(e){return(null==this.i||this.q&&0!=this.q.i?null:Dfe(this,e))||Iwe(this,e)},$ve.nh=function(e,t){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),lme(this.Ab),!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void Bj(this.Ab,xL(t,15));case 1:return void kG(this,RN(t));case 2:return void jC(this,RN(t));case 5:return void kme(this,RN(t));case 7:return!this.A&&(this.A=new lI(vnt,this,7)),lme(this.A),!this.A&&(this.A=new lI(vnt,this,7)),void Bj(this.A,xL(t,15));case 8:return void U6(this,Av(ON(t)));case 9:return void F6(this,Av(ON(t)));case 10:return pme(D$(this)),void Bj(D$(this),xL(t,15));case 11:return!this.q&&(this.q=new AU(jtt,this,11,10)),lme(this.q),!this.q&&(this.q=new AU(jtt,this,11,10)),void Bj(this.q,xL(t,15));case 21:return!this.s&&(this.s=new AU(Mtt,this,21,17)),lme(this.s),!this.s&&(this.s=new AU(Mtt,this,21,17)),void Bj(this.s,xL(t,15));case 22:return lme(XW(this)),void Bj(XW(this),xL(t,15))}G8(this,e-Oj((Fve(),qtt)),mQ(xL(k2(this,16),26)||qtt,e),t)},$ve.uh=function(){return Fve(),qtt},$ve.wh=function(e){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void lme(this.Ab);case 1:return RM(this.Cb,179)&&(xL(this.Cb,179).tb=null),void o0(this,null);case 2:return i5(this,null),void NJ(this,this.D);case 5:return void kme(this,null);case 7:return!this.A&&(this.A=new lI(vnt,this,7)),void lme(this.A);case 8:return void U6(this,!1);case 9:return void F6(this,!1);case 10:return void(this.u&&pme(this.u));case 11:return!this.q&&(this.q=new AU(jtt,this,11,10)),void lme(this.q);case 21:return!this.s&&(this.s=new AU(Mtt,this,21,17)),void lme(this.s);case 22:return void(this.n&&lme(this.n))}y6(this,e-Oj((Fve(),qtt)),mQ(xL(k2(this,16),26)||qtt,e))},$ve.Bh=function(){var e,t;if(Ebe(this),fbe(this),Lse(this),Jge(this),Oge(this),afe(this),ode(this),SX(function(e){return!e.c&&(e.c=new Dc),e.c}(yX(this))),this.s)for(e=0,t=this.s.i;e=0;--e)FQ(this,e);return BW(this)},$ve.Oc=function(e){var t;if(this.zk())for(t=this.i-1;t>=0;--t)FQ(this,t);return B9(this,e)},$ve.Sj=function(){lme(this)},$ve.ji=function(e,t){return qQ(this,0,t)},$j(xRe,"EcoreEList",612),Vle(488,612,zRe,HL),$ve.Xh=function(){return!1},$ve.Xi=function(){return this.c},$ve.Yi=function(){return!1},$ve.Ak=function(){return!0},$ve.ci=function(){return!0},$ve.gi=function(e,t){return t},$ve.ii=function(){return!1},$ve.c=0,$j(xRe,"EObjectEList",488),Vle(82,488,zRe,iI),$ve.Yi=function(){return!0},$ve.yk=function(){return!1},$ve.mk=function(){return!0},$j(xRe,"EObjectContainmentEList",82),Vle(538,82,zRe,aI),$ve.Zh=function(){this.b=!0},$ve.aj=function(){return this.b},$ve.Sj=function(){var e;lme(this),NC(this.e)?(e=this.b,this.b=!1,E2(this.e,new aX(this.e,2,this.c,e,!1))):this.b=!1},$ve.b=!1,$j(xRe,"EObjectContainmentEList/Unsettable",538),Vle(1113,538,zRe,$F),$ve.di=function(e,t){var n,r;return n=xL(g8(this,e,t),86),NC(this.e)&&km(this,new oK(this.a,7,(Fve(),Ytt),G6(t),RM(r=n.c,87)?xL(r,26):int,e)),n},$ve.ej=function(e,t){return function(e,t,n){var r,i;return r=new fZ(e.e,3,10,null,RM(i=t.c,87)?xL(i,26):(Fve(),int),dte(e,t),!1),n?n.zi(r):n=r,n}(this,xL(e,86),t)},$ve.fj=function(e,t){return function(e,t,n){var r,i;return r=new fZ(e.e,4,10,RM(i=t.c,87)?xL(i,26):(Fve(),int),null,dte(e,t),!1),n?n.zi(r):n=r,n}(this,xL(e,86),t)},$ve.gj=function(e,t,n){return function(e,t,n,r){var i,a,o;return i=new fZ(e.e,1,10,RM(o=t.c,87)?xL(o,26):(Fve(),int),RM(a=n.c,87)?xL(a,26):(Fve(),int),dte(e,t),!1),r?r.zi(i):r=i,r}(this,xL(e,86),xL(t,86),n)},$ve.Ui=function(e,t,n,r,i){switch(e){case 3:return WH(this,e,t,n,r,this.i>1);case 5:return WH(this,e,t,n,r,this.i-xL(n,14).gc()>0);default:return new fZ(this.e,e,this.c,t,n,r,!0)}},$ve.dj=function(){return!0},$ve.aj=function(){return jte(this)},$ve.Sj=function(){lme(this)},$j(mOe,"EClassImpl/1",1113),Vle(1127,1126,nRe),$ve.pi=function(e){var t,n,r,i,a,o,s;if(8!=(n=e.si())){if(r=function(e){switch(e.ti(null)){case 10:return 0;case 15:return 1;case 14:return 2;case 11:return 3;case 21:return 4}return-1}(e),0==r)switch(n){case 1:case 9:null!=(s=e.wi())&&(!(t=yX(xL(s,467))).c&&(t.c=new Dc),NZ(t.c,e.vi())),null!=(o=e.ui())&&0==(1&(i=xL(o,467)).Bb)&&(!(t=yX(i)).c&&(t.c=new Dc),cK(t.c,xL(e.vi(),26)));break;case 3:null!=(o=e.ui())&&0==(1&(i=xL(o,467)).Bb)&&(!(t=yX(i)).c&&(t.c=new Dc),cK(t.c,xL(e.vi(),26)));break;case 5:if(null!=(o=e.ui()))for(a=xL(o,15).Ic();a.Ob();)0==(1&(i=xL(a.Pb(),467)).Bb)&&(!(t=yX(i)).c&&(t.c=new Dc),cK(t.c,xL(e.vi(),26)));break;case 4:null!=(s=e.wi())&&0==(1&(i=xL(s,467)).Bb)&&(!(t=yX(i)).c&&(t.c=new Dc),NZ(t.c,e.vi()));break;case 6:if(null!=(s=e.wi()))for(a=xL(s,15).Ic();a.Ob();)0==(1&(i=xL(a.Pb(),467)).Bb)&&(!(t=yX(i)).c&&(t.c=new Dc),NZ(t.c,e.vi()))}this.Ck(r)}},$ve.Ck=function(e){xde(this,e)},$ve.b=63,$j(mOe,"ESuperAdapter",1127),Vle(1128,1127,nRe,Sb),$ve.Ck=function(e){cce(this,e)},$j(mOe,"EClassImpl/10",1128),Vle(1117,688,zRe),$ve.Qh=function(e,t){return bae(this,e,t)},$ve.Rh=function(e){return rne(this,e)},$ve.Sh=function(e,t){E6(this,e,t)},$ve.Th=function(e){xX(this,e)},$ve.ki=function(e){return vK(this,e)},$ve.hi=function(e,t){return OZ(this,e,t)},$ve.gk=function(e,t){throw Jb(new _m)},$ve.Uh=function(){return new kO(this)},$ve.Vh=function(){return new CO(this)},$ve.Wh=function(e){return RJ(this,e)},$ve.hk=function(e,t){throw Jb(new _m)},$ve.Rj=function(e){return this},$ve.aj=function(){return 0!=this.i},$ve.Wb=function(e){throw Jb(new _m)},$ve.Sj=function(){throw Jb(new _m)},$j(xRe,"EcoreEList/UnmodifiableEList",1117),Vle(317,1117,zRe,aC),$ve.ii=function(){return!1},$j(xRe,"EcoreEList/UnmodifiableEList/FastCompare",317),Vle(1120,317,zRe,Y3),$ve.Vc=function(e){var t,n;if(RM(e,170)&&-1!=(t=xL(e,170).Xi()))for(n=this.i;t4){if(!this.rj(e))return!1;if(this.mk()){if(o=(t=(n=xL(e,48)).Pg())==this.b&&(this.yk()?n.Jg(n.Qg(),xL(mQ(F$(this.b),this.Xi()).Tj(),26).wj())==Ote(xL(mQ(F$(this.b),this.Xi()),17)).n:-1-n.Qg()==this.Xi()),this.zk()&&!o&&!t&&n.Ug())for(r=0;r1||-1==n)},$ve.yk=function(){var e;return!!RM(e=mQ(F$(this.b),this.Xi()),97)&&!!Ote(xL(e,17))},$ve.zk=function(){var e;return!!RM(e=mQ(F$(this.b),this.Xi()),97)&&0!=(xL(e,17).Bb&i_e)},$ve.Vc=function(e){var t,n,r;if((n=this.Li(e))>=0)return n;if(this.Ak())for(t=0,r=this.Qi();t=0;--e)Mme(this,e,this.Ji(e));return this.Ri()},$ve.Oc=function(e){var t;if(this.zk())for(t=this.Qi()-1;t>=0;--t)Mme(this,t,this.Ji(t));return this.Si(e)},$ve.Sj=function(){pme(this)},$ve.ji=function(e,t){return yK(this,0,t)},$j(xRe,"DelegatingEcoreEList",725),Vle(1123,725,WRe,ZN),$ve.Ci=function(e,t){!function(e,t,n){v6(XW(e.a),t,CG(n))}(this,e,xL(t,26))},$ve.Di=function(e){!function(e,t){cK(XW(e.a),CG(t))}(this,xL(e,26))},$ve.Ji=function(e){var t;return RM(t=xL(FQ(XW(this.a),e),86).c,87)?xL(t,26):(Fve(),int)},$ve.Oi=function(e){var t;return RM(t=xL(Fhe(XW(this.a),e),86).c,87)?xL(t,26):(Fve(),int)},$ve.Pi=function(e,t){return function(e,t,n){var r,i,a;return(0!=(64&(a=RM(i=(r=xL(FQ(XW(e.a),t),86)).c,87)?xL(i,26):(Fve(),int)).Db)?Q5(e.b,a):a)==n?pge(r):XQ(r,n),a}(this,e,xL(t,26))},$ve.Xh=function(){return!1},$ve.Ui=function(e,t,n,r,i){return null},$ve.Ei=function(){return new Tb(this)},$ve.Fi=function(){lme(XW(this.a))},$ve.Gi=function(e){return $6(this,e)},$ve.Hi=function(e){var t;for(t=e.Ic();t.Ob();)if(!$6(this,t.Pb()))return!1;return!0},$ve.Ii=function(e){var t,n,r;if(RM(e,14)&&(r=xL(e,14)).gc()==XW(this.a).i){for(t=r.Ic(),n=new gI(this);t.Ob();)if(Ak(t.Pb())!==Ak(aee(n)))return!1;return!0}return!1},$ve.Ki=function(){var e,t,n,r;for(t=1,e=new gI(XW(this.a));e.e!=e.i.gc();)t=31*t+((n=RM(r=xL(aee(e),86).c,87)?xL(r,26):(Fve(),int))?eO(n):0);return t},$ve.Li=function(e){var t,n,r,i;for(r=0,n=new gI(XW(this.a));n.e!=n.i.gc();){if(t=xL(aee(n),86),Ak(e)===Ak(RM(i=t.c,87)?xL(i,26):(Fve(),int)))return r;++r}return-1},$ve.Mi=function(){return 0==XW(this.a).i},$ve.Ni=function(){return null},$ve.Qi=function(){return XW(this.a).i},$ve.Ri=function(){var e,t,n,r,i,a;for(a=XW(this.a).i,i=HY(LLe,aye,1,a,5,1),n=0,t=new gI(XW(this.a));t.e!=t.i.gc();)e=xL(aee(t),86),i[n++]=RM(r=e.c,87)?xL(r,26):(Fve(),int);return i},$ve.Si=function(e){var t,n,r,i;for(i=XW(this.a).i,e.lengthi&&Gj(e,i,null),n=0,t=new gI(XW(this.a));t.e!=t.i.gc();)Gj(e,n++,RM(r=xL(aee(t),86).c,87)?xL(r,26):(Fve(),int));return e},$ve.Ti=function(){var e,t,n,r,i;for((i=new ly).a+="[",e=XW(this.a),t=0,r=XW(this.a).i;t>16)>=0?Lne(this,n):this.Cb.dh(this,-1-r,null,n)),Fpe(this,e,6,n);case 9:return!this.a&&(this.a=new AU(Ftt,this,9,5)),H9(this.a,e,n)}return xL(mQ(xL(k2(this,16),26)||(Fve(),Ztt),t),65).Ij().Lj(this,q7(this),t-Oj((Fve(),Ztt)),e,n)},$ve.eh=function(e,t,n){switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),Yee(this.Ab,e,n);case 6:return Fpe(this,null,6,n);case 7:return!this.A&&(this.A=new lI(vnt,this,7)),Yee(this.A,e,n);case 9:return!this.a&&(this.a=new AU(Ftt,this,9,5)),Yee(this.a,e,n)}return xL(mQ(xL(k2(this,16),26)||(Fve(),Ztt),t),65).Ij().Mj(this,q7(this),t-Oj((Fve(),Ztt)),e,n)},$ve.gh=function(e){switch(e){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.D&&this.D==this.F;case 3:return!!pne(this);case 4:return!!p5(this);case 5:return null!=this.F&&this.F!=this.D&&this.F!=this.B;case 6:return!!GH(this);case 7:return!!this.A&&0!=this.A.i;case 8:return 0==(256&this.Bb);case 9:return!!this.a&&0!=this.a.i}return PW(this,e-Oj((Fve(),Ztt)),mQ(xL(k2(this,16),26)||Ztt,e))},$ve.nh=function(e,t){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),lme(this.Ab),!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void Bj(this.Ab,xL(t,15));case 1:return void kG(this,RN(t));case 2:return void jC(this,RN(t));case 5:return void kme(this,RN(t));case 7:return!this.A&&(this.A=new lI(vnt,this,7)),lme(this.A),!this.A&&(this.A=new lI(vnt,this,7)),void Bj(this.A,xL(t,15));case 8:return void j6(this,Av(ON(t)));case 9:return!this.a&&(this.a=new AU(Ftt,this,9,5)),lme(this.a),!this.a&&(this.a=new AU(Ftt,this,9,5)),void Bj(this.a,xL(t,15))}G8(this,e-Oj((Fve(),Ztt)),mQ(xL(k2(this,16),26)||Ztt,e),t)},$ve.uh=function(){return Fve(),Ztt},$ve.wh=function(e){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void lme(this.Ab);case 1:return RM(this.Cb,179)&&(xL(this.Cb,179).tb=null),void o0(this,null);case 2:return i5(this,null),void NJ(this,this.D);case 5:return void kme(this,null);case 7:return!this.A&&(this.A=new lI(vnt,this,7)),void lme(this.A);case 8:return void j6(this,!0);case 9:return!this.a&&(this.a=new AU(Ftt,this,9,5)),void lme(this.a)}y6(this,e-Oj((Fve(),Ztt)),mQ(xL(k2(this,16),26)||Ztt,e))},$ve.Bh=function(){var e,t;if(this.a)for(e=0,t=this.a.i;e>16==5?xL(this.Cb,659):null}return HK(this,e-Oj((Fve(),Qtt)),mQ(xL(k2(this,16),26)||Qtt,e),t,n)},$ve.bh=function(e,t,n){var r;switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),H9(this.Ab,e,n);case 5:return this.Cb&&(n=(r=this.Db>>16)>=0?gre(this,n):this.Cb.dh(this,-1-r,null,n)),Fpe(this,e,5,n)}return xL(mQ(xL(k2(this,16),26)||(Fve(),Qtt),t),65).Ij().Lj(this,q7(this),t-Oj((Fve(),Qtt)),e,n)},$ve.eh=function(e,t,n){switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),Yee(this.Ab,e,n);case 5:return Fpe(this,null,5,n)}return xL(mQ(xL(k2(this,16),26)||(Fve(),Qtt),t),65).Ij().Mj(this,q7(this),t-Oj((Fve(),Qtt)),e,n)},$ve.gh=function(e){switch(e){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return 0!=this.d;case 3:return!!this.b;case 4:return null!=this.c;case 5:return!(this.Db>>16!=5||!xL(this.Cb,659))}return PW(this,e-Oj((Fve(),Qtt)),mQ(xL(k2(this,16),26)||Qtt,e))},$ve.nh=function(e,t){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),lme(this.Ab),!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void Bj(this.Ab,xL(t,15));case 1:return void o0(this,RN(t));case 2:return void OJ(this,xL(t,20).a);case 3:return void sle(this,xL(t,1912));case 4:return void E1(this,RN(t))}G8(this,e-Oj((Fve(),Qtt)),mQ(xL(k2(this,16),26)||Qtt,e),t)},$ve.uh=function(){return Fve(),Qtt},$ve.wh=function(e){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void lme(this.Ab);case 1:return void o0(this,null);case 2:return void OJ(this,0);case 3:return void sle(this,null);case 4:return void E1(this,null)}y6(this,e-Oj((Fve(),Qtt)),mQ(xL(k2(this,16),26)||Qtt,e))},$ve.Ib=function(){var e;return null==(e=this.c)?this.zb:e},$ve.b=null,$ve.c=null,$ve.d=0,$j(mOe,"EEnumLiteralImpl",565);var _nt,Snt,xnt,Tnt=TD(mOe,"EFactoryImpl/InternalEDateTimeFormat");Vle(482,1,{1984:1},Ab),$j(mOe,"EFactoryImpl/1ClientInternalEDateTimeFormat",482),Vle(240,116,{104:1,91:1,89:1,86:1,55:1,107:1,48:1,96:1,240:1,113:1,116:1},Wb),$ve.Ng=function(e,t,n){var r;return n=Fpe(this,e,t,n),this.e&&RM(e,170)&&(r=nfe(this,this.e))!=this.c&&(n=rwe(this,r,n)),n},$ve.Wg=function(e,t,n){switch(e){case 0:return this.f;case 1:return!this.d&&(this.d=new iI(Utt,this,1)),this.d;case 2:return t?pge(this):this.c;case 3:return this.b;case 4:return this.e;case 5:return t?Gte(this):this.a}return HK(this,e-Oj((Fve(),ent)),mQ(xL(k2(this,16),26)||ent,e),t,n)},$ve.eh=function(e,t,n){switch(t){case 0:return n6(this,null,n);case 1:return!this.d&&(this.d=new iI(Utt,this,1)),Yee(this.d,e,n);case 3:return t6(this,null,n)}return xL(mQ(xL(k2(this,16),26)||(Fve(),ent),t),65).Ij().Mj(this,q7(this),t-Oj((Fve(),ent)),e,n)},$ve.gh=function(e){switch(e){case 0:return!!this.f;case 1:return!!this.d&&0!=this.d.i;case 2:return!!this.c;case 3:return!!this.b;case 4:return!!this.e;case 5:return!!this.a}return PW(this,e-Oj((Fve(),ent)),mQ(xL(k2(this,16),26)||ent,e))},$ve.nh=function(e,t){switch(e){case 0:return void Tie(this,xL(t,86));case 1:return!this.d&&(this.d=new iI(Utt,this,1)),lme(this.d),!this.d&&(this.d=new iI(Utt,this,1)),void Bj(this.d,xL(t,15));case 3:return void xie(this,xL(t,86));case 4:return void Qae(this,xL(t,814));case 5:return void XQ(this,xL(t,138))}G8(this,e-Oj((Fve(),ent)),mQ(xL(k2(this,16),26)||ent,e),t)},$ve.uh=function(){return Fve(),ent},$ve.wh=function(e){switch(e){case 0:return void Tie(this,null);case 1:return!this.d&&(this.d=new iI(Utt,this,1)),void lme(this.d);case 3:return void xie(this,null);case 4:return void Qae(this,null);case 5:return void XQ(this,null)}y6(this,e-Oj((Fve(),ent)),mQ(xL(k2(this,16),26)||ent,e))},$ve.Ib=function(){var e;return(e=new zI(Iue(this))).a+=" (expression: ",Nbe(this,e),e.a+=")",e.a},$j(mOe,"EGenericTypeImpl",240),Vle(1950,1936,qRe),$ve.Sh=function(e,t){qN(this,e,t)},$ve.gk=function(e,t){return qN(this,this.gc(),e),t},$ve.ki=function(e){return Iee(this.Bi(),e)},$ve.Uh=function(){return this.Vh()},$ve.Bi=function(){return new Db(this)},$ve.Vh=function(){return this.Wh(0)},$ve.Wh=function(e){return this.Bi().Xc(e)},$ve.hk=function(e,t){return A9(this,e,!0),t},$ve.di=function(e,t){var n;return n=Wne(this,t),this.Xc(e).Rb(n),n},$ve.ei=function(e,t){A9(this,t,!0),this.Xc(e).Rb(t)},$j(xRe,"AbstractSequentialInternalEList",1950),Vle(481,1950,qRe,EO),$ve.ki=function(e){return Iee(this.Bi(),e)},$ve.Uh=function(){return null==this.b?($S(),$S(),xnt):this.Ek()},$ve.Bi=function(){return new sC(this.a,this.b)},$ve.Vh=function(){return null==this.b?($S(),$S(),xnt):this.Ek()},$ve.Wh=function(e){var t,n;if(null==this.b){if(e<0||e>1)throw Jb(new Sv(aRe+e+", size=0"));return $S(),$S(),xnt}for(n=this.Ek(),t=0;t0;)if(t=this.c[--this.d],(!this.e||t.Bj()!=Set||0!=t.Xi())&&(!this.Hk()||this.b.hh(t)))if(a=this.b.Yg(t,this.Gk()),this.f=(YS(),xL(t,65).Jj()),this.f||t.Vj()){if(this.Gk()?(r=xL(a,14),this.k=r):(r=xL(a,67),this.k=this.j=r),RM(this.k,53)?(this.o=this.k.gc(),this.n=this.o):this.p=this.j?this.j.Wh(this.k.gc()):this.k.Xc(this.k.gc()),this.p?mse(this,this.p):Qse(this))return i=this.p?this.p.Ub():this.j?this.j.ki(--this.n):this.k.Xb(--this.n),this.f?((e=xL(i,71)).Xj(),n=e.bd(),this.i=n):(n=i,this.i=n),this.g=-3,!0}else if(null!=a)return this.k=null,this.p=null,n=a,this.i=n,this.g=-2,!0;return this.k=null,this.p=null,this.g=-1,!1}},$ve.Pb=function(){return C2(this)},$ve.Tb=function(){return this.a},$ve.Ub=function(){var e;if(this.g<-1||this.Sb())return--this.a,this.g=0,e=this.i,this.Sb(),e;throw Jb(new mm)},$ve.Vb=function(){return this.a-1},$ve.Qb=function(){throw Jb(new _m)},$ve.Gk=function(){return!1},$ve.Wb=function(e){throw Jb(new _m)},$ve.Hk=function(){return!0},$ve.a=0,$ve.d=0,$ve.f=!1,$ve.g=0,$ve.n=0,$ve.o=0,$j(xRe,"EContentsEList/FeatureIteratorImpl",277),Vle(689,277,XRe,aN),$ve.Gk=function(){return!0},$j(xRe,"EContentsEList/ResolvingFeatureIteratorImpl",689),Vle(1130,689,XRe,sN),$ve.Hk=function(){return!1},$j(mOe,"ENamedElementImpl/1/1",1130),Vle(1131,277,XRe,oN),$ve.Hk=function(){return!1},$j(mOe,"ENamedElementImpl/1/2",1131),Vle(35,142,iRe,rq,iq,xU,aK,fZ,aX,HJ,fV,GJ,hV,sX,dV,qJ,pV,cX,gV,VJ,bV,TU,oK,k$,WJ,mV,oX,wV),$ve.Wi=function(){return tK(this)},$ve.bj=function(){var e;return(e=tK(this))?e.uj():null},$ve.ti=function(e){return-1==this.b&&this.a&&(this.b=this.c.Sg(this.a.Xi(),this.a.Bj())),this.c.Jg(this.b,e)},$ve.vi=function(){return this.c},$ve.cj=function(){var e;return!!(e=tK(this))&&e.Fj()},$ve.b=-1,$j(mOe,"ENotificationImpl",35),Vle(395,283,{104:1,91:1,89:1,147:1,191:1,55:1,58:1,107:1,466:1,48:1,96:1,150:1,395:1,283:1,113:1,116:1},Cw),$ve.Lg=function(e){return Are(this,e)},$ve.Wg=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return pO(),0!=(256&this.Bb);case 3:return pO(),0!=(512&this.Bb);case 4:return G6(this.s);case 5:return G6(this.t);case 6:return pO(),(r=this.t)>1||-1==r;case 7:return pO(),this.s>=1;case 8:return t?Ere(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?xL(this.Cb,26):null;case 11:return!this.d&&(this.d=new lI(vnt,this,11)),this.d;case 12:return!this.c&&(this.c=new AU(Btt,this,12,10)),this.c;case 13:return!this.a&&(this.a=new QN(this,this)),this.a;case 14:return dZ(this)}return HK(this,e-Oj((Fve(),ant)),mQ(xL(k2(this,16),26)||ant,e),t,n)},$ve.bh=function(e,t,n){var r;switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),H9(this.Ab,e,n);case 10:return this.Cb&&(n=(r=this.Db>>16)>=0?Are(this,n):this.Cb.dh(this,-1-r,null,n)),Fpe(this,e,10,n);case 12:return!this.c&&(this.c=new AU(Btt,this,12,10)),H9(this.c,e,n)}return xL(mQ(xL(k2(this,16),26)||(Fve(),ant),t),65).Ij().Lj(this,q7(this),t-Oj((Fve(),ant)),e,n)},$ve.eh=function(e,t,n){switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),Yee(this.Ab,e,n);case 9:return jj(this,n);case 10:return Fpe(this,null,10,n);case 11:return!this.d&&(this.d=new lI(vnt,this,11)),Yee(this.d,e,n);case 12:return!this.c&&(this.c=new AU(Btt,this,12,10)),Yee(this.c,e,n);case 14:return Yee(dZ(this),e,n)}return xL(mQ(xL(k2(this,16),26)||(Fve(),ant),t),65).Ij().Mj(this,q7(this),t-Oj((Fve(),ant)),e,n)},$ve.gh=function(e){var t;switch(e){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return 0==(256&this.Bb);case 3:return 0==(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return(t=this.t)>1||-1==t;case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==lB(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==lB(this.q).i);case 10:return!(this.Db>>16!=10||!xL(this.Cb,26));case 11:return!!this.d&&0!=this.d.i;case 12:return!!this.c&&0!=this.c.i;case 13:return!(!this.a||0==dZ(this.a.a).i||this.b&&Bte(this.b));case 14:return!!this.b&&Bte(this.b)}return PW(this,e-Oj((Fve(),ant)),mQ(xL(k2(this,16),26)||ant,e))},$ve.nh=function(e,t){var n;switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),lme(this.Ab),!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void Bj(this.Ab,xL(t,15));case 1:return void o0(this,RN(t));case 2:return void B6(this,Av(ON(t)));case 3:return void D6(this,Av(ON(t)));case 4:return void MJ(this,xL(t,20).a);case 5:return void IJ(this,xL(t,20).a);case 8:return void D5(this,xL(t,138));case 9:return void((n=mae(this,xL(t,86),null))&&n.Ai());case 11:return!this.d&&(this.d=new lI(vnt,this,11)),lme(this.d),!this.d&&(this.d=new lI(vnt,this,11)),void Bj(this.d,xL(t,15));case 12:return!this.c&&(this.c=new AU(Btt,this,12,10)),lme(this.c),!this.c&&(this.c=new AU(Btt,this,12,10)),void Bj(this.c,xL(t,15));case 13:return!this.a&&(this.a=new QN(this,this)),pme(this.a),!this.a&&(this.a=new QN(this,this)),void Bj(this.a,xL(t,15));case 14:return lme(dZ(this)),void Bj(dZ(this),xL(t,15))}G8(this,e-Oj((Fve(),ant)),mQ(xL(k2(this,16),26)||ant,e),t)},$ve.uh=function(){return Fve(),ant},$ve.wh=function(e){var t;switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void lme(this.Ab);case 1:return void o0(this,null);case 2:return void B6(this,!0);case 3:return void D6(this,!0);case 4:return void MJ(this,0);case 5:return void IJ(this,1);case 8:return void D5(this,null);case 9:return void((t=mae(this,null,null))&&t.Ai());case 11:return!this.d&&(this.d=new lI(vnt,this,11)),void lme(this.d);case 12:return!this.c&&(this.c=new AU(Btt,this,12,10)),void lme(this.c);case 13:return void(this.a&&pme(this.a));case 14:return void(this.b&&lme(this.b))}y6(this,e-Oj((Fve(),ant)),mQ(xL(k2(this,16),26)||ant,e))},$ve.Bh=function(){var e,t;if(this.c)for(e=0,t=this.c.i;er&&Gj(e,r,null),n=0,t=new gI(dZ(this.a));t.e!=t.i.gc();)Gj(e,n++,xL(aee(t),86).c||(Fve(),tnt));return e},$ve.Ti=function(){var e,t,n,r;for((r=new ly).a+="[",e=dZ(this.a),t=0,n=dZ(this.a).i;t1);case 5:return WH(this,e,t,n,r,this.i-xL(n,14).gc()>0);default:return new fZ(this.e,e,this.c,t,n,r,!0)}},$ve.dj=function(){return!0},$ve.aj=function(){return Bte(this)},$ve.Sj=function(){lme(this)},$j(mOe,"EOperationImpl/2",1312),Vle(490,1,{1910:1,490:1},pk),$j(mOe,"EPackageImpl/1",490),Vle(16,82,zRe,AU),$ve.uk=function(){return this.d},$ve.vk=function(){return this.b},$ve.yk=function(){return!0},$ve.b=0,$j(xRe,"EObjectContainmentWithInverseEList",16),Vle(350,16,zRe,RR),$ve.zk=function(){return!0},$ve.gi=function(e,t){return Mle(this,e,xL(t,55))},$j(xRe,"EObjectContainmentWithInverseEList/Resolving",350),Vle(298,350,zRe,IU),$ve.Zh=function(){this.a.tb=null},$j(mOe,"EPackageImpl/2",298),Vle(1201,1,{},Tc),$j(mOe,"EPackageImpl/3",1201),Vle(705,44,w_e,Iw),$ve._b=function(e){return Mk(e)?p$(this,e):!!H$(this.f,e)},$j(mOe,"EPackageRegistryImpl",705),Vle(501,283,{104:1,91:1,89:1,147:1,191:1,55:1,1986:1,107:1,466:1,48:1,96:1,150:1,501:1,283:1,113:1,116:1},Mw),$ve.Lg=function(e){return kre(this,e)},$ve.Wg=function(e,t,n){var r;switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return pO(),0!=(256&this.Bb);case 3:return pO(),0!=(512&this.Bb);case 4:return G6(this.s);case 5:return G6(this.t);case 6:return pO(),(r=this.t)>1||-1==r;case 7:return pO(),this.s>=1;case 8:return t?Ere(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?xL(this.Cb,58):null}return HK(this,e-Oj((Fve(),cnt)),mQ(xL(k2(this,16),26)||cnt,e),t,n)},$ve.bh=function(e,t,n){var r;switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),H9(this.Ab,e,n);case 10:return this.Cb&&(n=(r=this.Db>>16)>=0?kre(this,n):this.Cb.dh(this,-1-r,null,n)),Fpe(this,e,10,n)}return xL(mQ(xL(k2(this,16),26)||(Fve(),cnt),t),65).Ij().Lj(this,q7(this),t-Oj((Fve(),cnt)),e,n)},$ve.eh=function(e,t,n){switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),Yee(this.Ab,e,n);case 9:return jj(this,n);case 10:return Fpe(this,null,10,n)}return xL(mQ(xL(k2(this,16),26)||(Fve(),cnt),t),65).Ij().Mj(this,q7(this),t-Oj((Fve(),cnt)),e,n)},$ve.gh=function(e){var t;switch(e){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return 0==(256&this.Bb);case 3:return 0==(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return(t=this.t)>1||-1==t;case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==lB(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==lB(this.q).i);case 10:return!(this.Db>>16!=10||!xL(this.Cb,58))}return PW(this,e-Oj((Fve(),cnt)),mQ(xL(k2(this,16),26)||cnt,e))},$ve.uh=function(){return Fve(),cnt},$j(mOe,"EParameterImpl",501),Vle(97,443,{104:1,91:1,89:1,147:1,191:1,55:1,17:1,170:1,65:1,107:1,466:1,48:1,96:1,150:1,97:1,443:1,283:1,113:1,116:1,665:1},kN),$ve.Wg=function(e,t,n){var r,i;switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return pO(),0!=(256&this.Bb);case 3:return pO(),0!=(512&this.Bb);case 4:return G6(this.s);case 5:return G6(this.t);case 6:return pO(),(i=this.t)>1||-1==i;case 7:return pO(),this.s>=1;case 8:return t?Ere(this):this.r;case 9:return this.q;case 10:return pO(),0!=(this.Bb&uRe);case 11:return pO(),0!=(this.Bb&MRe);case 12:return pO(),0!=(this.Bb&n_e);case 13:return this.j;case 14:return ofe(this);case 15:return pO(),0!=(this.Bb&CRe);case 16:return pO(),0!=(this.Bb&Cye);case 17:return HH(this);case 18:return pO(),0!=(this.Bb&gOe);case 19:return pO(),!(!(r=Ote(this))||0==(r.Bb&gOe));case 20:return pO(),0!=(this.Bb&i_e);case 21:return t?Ote(this):this.b;case 22:return t?i4(this):uX(this);case 23:return!this.a&&(this.a=new hI(Itt,this,23)),this.a}return HK(this,e-Oj((Fve(),lnt)),mQ(xL(k2(this,16),26)||lnt,e),t,n)},$ve.gh=function(e){var t,n;switch(e){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return 0==(256&this.Bb);case 3:return 0==(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return(n=this.t)>1||-1==n;case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==lB(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==lB(this.q).i);case 10:return 0==(this.Bb&uRe);case 11:return 0!=(this.Bb&MRe);case 12:return 0!=(this.Bb&n_e);case 13:return null!=this.j;case 14:return null!=ofe(this);case 15:return 0!=(this.Bb&CRe);case 16:return 0!=(this.Bb&Cye);case 17:return!!HH(this);case 18:return 0!=(this.Bb&gOe);case 19:return!!(t=Ote(this))&&0!=(t.Bb&gOe);case 20:return 0==(this.Bb&i_e);case 21:return!!this.b;case 22:return!!uX(this);case 23:return!!this.a&&0!=this.a.i}return PW(this,e-Oj((Fve(),lnt)),mQ(xL(k2(this,16),26)||lnt,e))},$ve.nh=function(e,t){var n;switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),lme(this.Ab),!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void Bj(this.Ab,xL(t,15));case 1:return void AG(this,RN(t));case 2:return void B6(this,Av(ON(t)));case 3:return void D6(this,Av(ON(t)));case 4:return void MJ(this,xL(t,20).a);case 5:return void IJ(this,xL(t,20).a);case 8:return void D5(this,xL(t,138));case 9:return void((n=mae(this,xL(t,86),null))&&n.Ai());case 10:return void f8(this,Av(ON(t)));case 11:return void h8(this,Av(ON(t)));case 12:return void u8(this,Av(ON(t)));case 13:return void uk(this,RN(t));case 15:return void d8(this,Av(ON(t)));case 16:return void _8(this,Av(ON(t)));case 18:return void function(e,t){E8(e,t),RM(e.Cb,87)&&cce(yX(xL(e.Cb,87)),2)}(this,Av(ON(t)));case 20:return void S8(this,Av(ON(t)));case 21:return void L1(this,xL(t,17));case 23:return!this.a&&(this.a=new hI(Itt,this,23)),lme(this.a),!this.a&&(this.a=new hI(Itt,this,23)),void Bj(this.a,xL(t,15))}G8(this,e-Oj((Fve(),lnt)),mQ(xL(k2(this,16),26)||lnt,e),t)},$ve.uh=function(){return Fve(),lnt},$ve.wh=function(e){var t;switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void lme(this.Ab);case 1:return RM(this.Cb,87)&&cce(yX(xL(this.Cb,87)),4),void o0(this,null);case 2:return void B6(this,!0);case 3:return void D6(this,!0);case 4:return void MJ(this,0);case 5:return void IJ(this,1);case 8:return void D5(this,null);case 9:return void((t=mae(this,null,null))&&t.Ai());case 10:return void f8(this,!0);case 11:return void h8(this,!1);case 12:return void u8(this,!1);case 13:return this.i=null,void N1(this,null);case 15:return void d8(this,!1);case 16:return void _8(this,!1);case 18:return E8(this,!1),void(RM(this.Cb,87)&&cce(yX(xL(this.Cb,87)),2));case 20:return void S8(this,!0);case 21:return void L1(this,null);case 23:return!this.a&&(this.a=new hI(Itt,this,23)),void lme(this.a)}y6(this,e-Oj((Fve(),lnt)),mQ(xL(k2(this,16),26)||lnt,e))},$ve.Bh=function(){i4(this),Oz(gZ((yse(),$nt),this)),Ere(this),this.Bb|=1},$ve.Gj=function(){return Ote(this)},$ve.lk=function(){var e;return!!(e=Ote(this))&&0!=(e.Bb&gOe)},$ve.mk=function(){return 0!=(this.Bb&gOe)},$ve.nk=function(){return 0!=(this.Bb&i_e)},$ve.ik=function(e,t){return this.c=null,_6(this,e,t)},$ve.Ib=function(){var e;return 0!=(64&this.Db)?Cde(this):((e=new BI(Cde(this))).a+=" (containment: ",jE(e,0!=(this.Bb&gOe)),e.a+=", resolveProxies: ",jE(e,0!=(this.Bb&i_e)),e.a+=")",e.a)},$j(mOe,"EReferenceImpl",97),Vle(541,116,{104:1,43:1,91:1,89:1,133:1,55:1,107:1,48:1,96:1,541:1,113:1,116:1},Ac),$ve.Fb=function(e){return this===e},$ve.ad=function(){return this.b},$ve.bd=function(){return this.c},$ve.Hb=function(){return eO(this)},$ve.Ph=function(e){!function(e,t){_1(e,null==t?null:(sB(t),t))}(this,RN(e))},$ve.cd=function(e){return function(e,t){var n;return n=e.c,S1(e,t),n}(this,RN(e))},$ve.Wg=function(e,t,n){switch(e){case 0:return this.b;case 1:return this.c}return HK(this,e-Oj((Fve(),unt)),mQ(xL(k2(this,16),26)||unt,e),t,n)},$ve.gh=function(e){switch(e){case 0:return null!=this.b;case 1:return null!=this.c}return PW(this,e-Oj((Fve(),unt)),mQ(xL(k2(this,16),26)||unt,e))},$ve.nh=function(e,t){switch(e){case 0:return void function(e,t){_1(e,null==t?null:(sB(t),t))}(this,RN(t));case 1:return void S1(this,RN(t))}G8(this,e-Oj((Fve(),unt)),mQ(xL(k2(this,16),26)||unt,e),t)},$ve.uh=function(){return Fve(),unt},$ve.wh=function(e){switch(e){case 0:return void _1(this,null);case 1:return void S1(this,null)}y6(this,e-Oj((Fve(),unt)),mQ(xL(k2(this,16),26)||unt,e))},$ve.Nh=function(){var e;return-1==this.a&&(e=this.b,this.a=null==e?0:vte(e)),this.a},$ve.Oh=function(e){this.a=e},$ve.Ib=function(){var e;return 0!=(64&this.Db)?Iue(this):((e=new BI(Iue(this))).a+=" (key: ",Fk(e,this.b),e.a+=", value: ",Fk(e,this.c),e.a+=")",e.a)},$ve.a=-1,$ve.b=null,$ve.c=null;var Ant,knt,Cnt,Mnt,Int,Ont,Nnt,Rnt,Pnt,Lnt,Dnt=$j(mOe,"EStringToStringMapEntryImpl",541),Fnt=TD(xRe,"FeatureMap/Entry/Internal");Vle(558,1,YRe),$ve.Jk=function(e){return this.Kk(xL(e,48))},$ve.Kk=function(e){return this.Jk(e)},$ve.Fb=function(e){var t,n;return this===e||!!RM(e,71)&&(t=xL(e,71)).Xj()==this.c&&(null==(n=this.bd())?null==t.bd():C6(n,t.bd()))},$ve.Xj=function(){return this.c},$ve.Hb=function(){var e;return e=this.bd(),L4(this.c)^(null==e?0:L4(e))},$ve.Ib=function(){var e,t;return t=WQ((e=this.c).Cj()).Kh(),e.ne(),(null!=t&&0!=t.length?t+":"+e.ne():e.ne())+"="+this.bd()},$j(mOe,"EStructuralFeatureImpl/BasicFeatureMapEntry",558),Vle(759,558,YRe,hR),$ve.Kk=function(e){return new hR(this.c,e)},$ve.bd=function(){return this.a},$ve.Lk=function(e,t,n){return function(e,t,n,r,i){var a;return n&&(a=k9(t.Og(),e.c),i=n.ah(t,-1-(-1==a?r:a),null,i)),i}(this,e,this.a,t,n)},$ve.Mk=function(e,t,n){return function(e,t,n,r,i){var a;return n&&(a=k9(t.Og(),e.c),i=n.dh(t,-1-(-1==a?r:a),null,i)),i}(this,e,this.a,t,n)},$j(mOe,"EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry",759),Vle(1285,1,{},gk),$ve.Kj=function(e,t,n,r,i){return xL(gK(e,this.b),212).il(this.a).Rj(r)},$ve.Lj=function(e,t,n,r,i){return xL(gK(e,this.b),212)._k(this.a,r,i)},$ve.Mj=function(e,t,n,r,i){return xL(gK(e,this.b),212).al(this.a,r,i)},$ve.Nj=function(e,t,n){return xL(gK(e,this.b),212).il(this.a).aj()},$ve.Oj=function(e,t,n,r){xL(gK(e,this.b),212).il(this.a).Wb(r)},$ve.Pj=function(e,t,n){return xL(gK(e,this.b),212).il(this.a)},$ve.Qj=function(e,t,n){xL(gK(e,this.b),212).il(this.a).Sj()},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator",1285),Vle(88,1,{},tL,$z,P$,aq),$ve.Kj=function(e,t,n,r,i){var a;if(null==(a=t.xh(n))&&t.yh(n,a=kve(this,e)),!i)switch(this.e){case 50:case 41:return xL(a,580).nj();case 40:return xL(a,212).fl()}return a},$ve.Lj=function(e,t,n,r,i){var a;return null==(a=t.xh(n))&&t.yh(n,a=kve(this,e)),xL(a,67).gk(r,i)},$ve.Mj=function(e,t,n,r,i){var a;return null!=(a=t.xh(n))&&(i=xL(a,67).hk(r,i)),i},$ve.Nj=function(e,t,n){var r;return null!=(r=t.xh(n))&&xL(r,76).aj()},$ve.Oj=function(e,t,n,r){var i;!(i=xL(t.xh(n),76))&&t.yh(n,i=kve(this,e)),i.Wb(r)},$ve.Pj=function(e,t,n){var r;return null==(r=t.xh(n))&&t.yh(n,r=kve(this,e)),RM(r,76)?xL(r,76):new Ob(xL(t.xh(n),14))},$ve.Qj=function(e,t,n){var r;!(r=xL(t.xh(n),76))&&t.yh(n,r=kve(this,e)),r.Sj()},$ve.b=0,$ve.e=0,$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateMany",88),Vle(495,1,{}),$ve.Lj=function(e,t,n,r,i){throw Jb(new _m)},$ve.Mj=function(e,t,n,r,i){throw Jb(new _m)},$ve.Pj=function(e,t,n){return new jz(this,e,t,n)},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingle",495),Vle(1302,1,TRe,jz),$ve.Rj=function(e){return this.a.Kj(this.c,this.d,this.b,e,!0)},$ve.aj=function(){return this.a.Nj(this.c,this.d,this.b)},$ve.Wb=function(e){this.a.Oj(this.c,this.d,this.b,e)},$ve.Sj=function(){this.a.Qj(this.c,this.d,this.b)},$ve.b=0,$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingle/1",1302),Vle(752,495,{},rH),$ve.Kj=function(e,t,n,r,i){return tpe(e,e.$g(),e.Qg())==this.b?this.nk()&&r?Fle(e):e.$g():null},$ve.Lj=function(e,t,n,r,i){var a,o;return e.$g()&&(i=(a=e.Qg())>=0?e.Lg(i):e.$g().dh(e,-1-a,null,i)),o=k9(e.Og(),this.e),e.Ng(r,o,i)},$ve.Mj=function(e,t,n,r,i){var a;return a=k9(e.Og(),this.e),e.Ng(null,a,i)},$ve.Nj=function(e,t,n){var r;return r=k9(e.Og(),this.e),!!e.$g()&&e.Qg()==r},$ve.Oj=function(e,t,n,r){var i,a,o,s,c;if(null!=r&&!gge(this.a,r))throw Jb(new Nv(KRe+(RM(r,55)?_ie(xL(r,55).Og()):zQ(D4(r)))+ZRe+this.a+"'"));if(i=e.$g(),o=k9(e.Og(),this.e),Ak(r)!==Ak(i)||e.Qg()!=o&&null!=r){if(yre(e,xL(r,55)))throw Jb(new Rv(vOe+e.Ib()));c=null,i&&(c=(a=e.Qg())>=0?e.Lg(c):e.$g().dh(e,-1-a,null,c)),(s=xL(r,48))&&(c=s.ah(e,k9(s.Og(),this.b),null,c)),(c=e.Ng(s,o,c))&&c.Ai()}else e.Gg()&&e.Hg()&&E2(e,new xU(e,1,o,r,r))},$ve.Qj=function(e,t,n){var r,i,a;e.$g()?(a=(r=e.Qg())>=0?e.Lg(null):e.$g().dh(e,-1-r,null,null),i=k9(e.Og(),this.e),(a=e.Ng(null,i,a))&&a.Ai()):e.Gg()&&e.Hg()&&E2(e,new TU(e,1,this.e,null,null))},$ve.nk=function(){return!1},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainer",752),Vle(1286,752,{},rL),$ve.nk=function(){return!0},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving",1286),Vle(556,495,{}),$ve.Kj=function(e,t,n,r,i){var a;return null==(a=t.xh(n))?this.b:Ak(a)===Ak(Ant)?null:a},$ve.Nj=function(e,t,n){var r;return null!=(r=t.xh(n))&&(Ak(r)===Ak(Ant)||!C6(r,this.b))},$ve.Oj=function(e,t,n,r){var i,a;e.Gg()&&e.Hg()?(i=null==(a=t.xh(n))?this.b:Ak(a)===Ak(Ant)?null:a,null==r?null!=this.c?(t.yh(n,null),r=this.b):null!=this.b?t.yh(n,Ant):t.yh(n,null):(this.Nk(r),t.yh(n,r)),E2(e,this.d.Ok(e,1,this.e,i,r))):null==r?null!=this.c?t.yh(n,null):null!=this.b?t.yh(n,Ant):t.yh(n,null):(this.Nk(r),t.yh(n,r))},$ve.Qj=function(e,t,n){var r,i;e.Gg()&&e.Hg()?(r=null==(i=t.xh(n))?this.b:Ak(i)===Ak(Ant)?null:i,t.zh(n),E2(e,this.d.Ok(e,1,this.e,r,this.b))):t.zh(n)},$ve.Nk=function(e){throw Jb(new wm)},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleData",556),Vle(QRe,1,{},kc),$ve.Ok=function(e,t,n,r,i){return new TU(e,t,n,r,i)},$ve.Pk=function(e,t,n,r,i,a){return new k$(e,t,n,r,i,a)},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator",QRe),Vle(1303,QRe,{},Cc),$ve.Ok=function(e,t,n,r,i){return new oX(e,t,n,Av(ON(r)),Av(ON(i)))},$ve.Pk=function(e,t,n,r,i,a){return new wV(e,t,n,Av(ON(r)),Av(ON(i)),a)},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1",1303),Vle(1304,QRe,{},Mc),$ve.Ok=function(e,t,n,r,i){return new HJ(e,t,n,xL(r,215).a,xL(i,215).a)},$ve.Pk=function(e,t,n,r,i,a){return new fV(e,t,n,xL(r,215).a,xL(i,215).a,a)},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2",1304),Vle(1305,QRe,{},Ic),$ve.Ok=function(e,t,n,r,i){return new GJ(e,t,n,xL(r,172).a,xL(i,172).a)},$ve.Pk=function(e,t,n,r,i,a){return new hV(e,t,n,xL(r,172).a,xL(i,172).a,a)},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3",1305),Vle(1306,QRe,{},Oc),$ve.Ok=function(e,t,n,r,i){return new sX(e,t,n,Mv(NN(r)),Mv(NN(i)))},$ve.Pk=function(e,t,n,r,i,a){return new dV(e,t,n,Mv(NN(r)),Mv(NN(i)),a)},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4",1306),Vle(1307,QRe,{},Nc),$ve.Ok=function(e,t,n,r,i){return new qJ(e,t,n,xL(r,155).a,xL(i,155).a)},$ve.Pk=function(e,t,n,r,i,a){return new pV(e,t,n,xL(r,155).a,xL(i,155).a,a)},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5",1307),Vle(1308,QRe,{},Rc),$ve.Ok=function(e,t,n,r,i){return new cX(e,t,n,xL(r,20).a,xL(i,20).a)},$ve.Pk=function(e,t,n,r,i,a){return new gV(e,t,n,xL(r,20).a,xL(i,20).a,a)},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6",1308),Vle(1309,QRe,{},Pc),$ve.Ok=function(e,t,n,r,i){return new VJ(e,t,n,xL(r,162).a,xL(i,162).a)},$ve.Pk=function(e,t,n,r,i,a){return new bV(e,t,n,xL(r,162).a,xL(i,162).a,a)},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7",1309),Vle(1310,QRe,{},Lc),$ve.Ok=function(e,t,n,r,i){return new WJ(e,t,n,xL(r,186).a,xL(i,186).a)},$ve.Pk=function(e,t,n,r,i,a){return new mV(e,t,n,xL(r,186).a,xL(i,186).a,a)},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8",1310),Vle(1288,556,{},Hz),$ve.Nk=function(e){if(!this.a.rj(e))throw Jb(new Nv(KRe+D4(e)+ZRe+this.a+"'"))},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic",1288),Vle(1289,556,{},GF),$ve.Nk=function(e){},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic",1289),Vle(753,556,{}),$ve.Nj=function(e,t,n){return null!=t.xh(n)},$ve.Oj=function(e,t,n,r){var i,a;e.Gg()&&e.Hg()?(i=!0,null==(a=t.xh(n))?(i=!1,a=this.b):Ak(a)===Ak(Ant)&&(a=null),null==r?null!=this.c?(t.yh(n,null),r=this.b):t.yh(n,Ant):(this.Nk(r),t.yh(n,r)),E2(e,this.d.Pk(e,1,this.e,a,r,!i))):null==r?null!=this.c?t.yh(n,null):t.yh(n,Ant):(this.Nk(r),t.yh(n,r))},$ve.Qj=function(e,t,n){var r,i;e.Gg()&&e.Hg()?(r=!0,null==(i=t.xh(n))?(r=!1,i=this.b):Ak(i)===Ak(Ant)&&(i=null),t.zh(n),E2(e,this.d.Pk(e,2,this.e,i,this.b,r))):t.zh(n)},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable",753),Vle(1290,753,{},Gz),$ve.Nk=function(e){if(!this.a.rj(e))throw Jb(new Nv(KRe+D4(e)+ZRe+this.a+"'"))},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic",1290),Vle(1291,753,{},VF),$ve.Nk=function(e){},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic",1291),Vle(394,495,{},eF),$ve.Kj=function(e,t,n,r,i){var a,o,s,c,l;if(l=t.xh(n),this.Fj()&&Ak(l)===Ak(Ant))return null;if(this.nk()&&r&&null!=l){if((s=xL(l,48)).fh()&&s!=(c=Q5(e,s))){if(!gge(this.a,c))throw Jb(new Nv(KRe+D4(c)+ZRe+this.a+"'"));t.yh(n,l=c),this.mk()&&(a=xL(c,48),o=s.dh(e,this.b?k9(s.Og(),this.b):-1-k9(e.Og(),this.e),null,null),!a.$g()&&(o=a.ah(e,this.b?k9(a.Og(),this.b):-1-k9(e.Og(),this.e),null,o)),o&&o.Ai()),e.Gg()&&e.Hg()&&E2(e,new TU(e,9,this.e,s,c))}return l}return l},$ve.Lj=function(e,t,n,r,i){var a,o;return Ak(o=t.xh(n))===Ak(Ant)&&(o=null),t.yh(n,r),this.Yi()?Ak(o)!==Ak(r)&&null!=o&&(i=(a=xL(o,48)).dh(e,k9(a.Og(),this.b),null,i)):this.mk()&&null!=o&&(i=xL(o,48).dh(e,-1-k9(e.Og(),this.e),null,i)),e.Gg()&&e.Hg()&&(!i&&(i=new oE(4)),i.zi(new TU(e,1,this.e,o,r))),i},$ve.Mj=function(e,t,n,r,i){var a;return Ak(a=t.xh(n))===Ak(Ant)&&(a=null),t.zh(n),e.Gg()&&e.Hg()&&(!i&&(i=new oE(4)),this.Fj()?i.zi(new TU(e,2,this.e,a,null)):i.zi(new TU(e,1,this.e,a,null))),i},$ve.Nj=function(e,t,n){return null!=t.xh(n)},$ve.Oj=function(e,t,n,r){var i,a,o,s,c;if(null!=r&&!gge(this.a,r))throw Jb(new Nv(KRe+(RM(r,55)?_ie(xL(r,55).Og()):zQ(D4(r)))+ZRe+this.a+"'"));s=null!=(c=t.xh(n)),this.Fj()&&Ak(c)===Ak(Ant)&&(c=null),o=null,this.Yi()?Ak(c)!==Ak(r)&&(null!=c&&(o=(i=xL(c,48)).dh(e,k9(i.Og(),this.b),null,o)),null!=r&&(o=(i=xL(r,48)).ah(e,k9(i.Og(),this.b),null,o))):this.mk()&&Ak(c)!==Ak(r)&&(null!=c&&(o=xL(c,48).dh(e,-1-k9(e.Og(),this.e),null,o)),null!=r&&(o=xL(r,48).ah(e,-1-k9(e.Og(),this.e),null,o))),null==r&&this.Fj()?t.yh(n,Ant):t.yh(n,r),e.Gg()&&e.Hg()?(a=new k$(e,1,this.e,c,r,this.Fj()&&!s),o?(o.zi(a),o.Ai()):E2(e,a)):o&&o.Ai()},$ve.Qj=function(e,t,n){var r,i,a,o,s;o=null!=(s=t.xh(n)),this.Fj()&&Ak(s)===Ak(Ant)&&(s=null),a=null,null!=s&&(this.Yi()?a=(r=xL(s,48)).dh(e,k9(r.Og(),this.b),null,a):this.mk()&&(a=xL(s,48).dh(e,-1-k9(e.Og(),this.e),null,a))),t.zh(n),e.Gg()&&e.Hg()?(i=new k$(e,this.Fj()?2:1,this.e,s,null,o),a?(a.zi(i),a.Ai()):E2(e,i)):a&&a.Ai()},$ve.Yi=function(){return!1},$ve.mk=function(){return!1},$ve.nk=function(){return!1},$ve.Fj=function(){return!1},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObject",394),Vle(557,394,{},cN),$ve.mk=function(){return!0},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment",557),Vle(1294,557,{},lN),$ve.nk=function(){return!0},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving",1294),Vle(755,557,{},uN),$ve.Fj=function(){return!0},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable",755),Vle(1296,755,{},fN),$ve.nk=function(){return!0},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving",1296),Vle(630,557,{},iL),$ve.Yi=function(){return!0},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse",630),Vle(1295,630,{},aL),$ve.nk=function(){return!0},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving",1295),Vle(756,630,{},oL),$ve.Fj=function(){return!0},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable",756),Vle(1297,756,{},sL),$ve.nk=function(){return!0},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving",1297),Vle(631,394,{},hN),$ve.nk=function(){return!0},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving",631),Vle(1298,631,{},pN),$ve.Fj=function(){return!0},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable",1298),Vle(757,631,{},cL),$ve.Yi=function(){return!0},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse",757),Vle(1299,757,{},uL),$ve.Fj=function(){return!0},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable",1299),Vle(1292,394,{},dN),$ve.Fj=function(){return!0},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable",1292),Vle(754,394,{},lL),$ve.Yi=function(){return!0},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse",754),Vle(1293,754,{},fL),$ve.Fj=function(){return!0},$j(mOe,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable",1293),Vle(758,558,YRe,bB),$ve.Kk=function(e){return new bB(this.a,this.c,e)},$ve.bd=function(){return this.b},$ve.Lk=function(e,t,n){return function(e,t,n,r){return n&&(r=n.ah(t,k9(n.Og(),e.c.Gj()),null,r)),r}(this,e,this.b,n)},$ve.Mk=function(e,t,n){return function(e,t,n,r){return n&&(r=n.dh(t,k9(n.Og(),e.c.Gj()),null,r)),r}(this,e,this.b,n)},$j(mOe,"EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry",758),Vle(1300,1,TRe,Ob),$ve.Rj=function(e){return this.a},$ve.aj=function(){return RM(this.a,95)?xL(this.a,95).aj():!this.a.dc()},$ve.Wb=function(e){this.a.$b(),this.a.Ec(xL(e,14))},$ve.Sj=function(){RM(this.a,95)?xL(this.a,95).Sj():this.a.$b()},$j(mOe,"EStructuralFeatureImpl/SettingMany",1300),Vle(1301,558,YRe,cq),$ve.Jk=function(e){return new dR((Tme(),Mrt),this.b.Dh(this.a,e))},$ve.bd=function(){return null},$ve.Lk=function(e,t,n){return n},$ve.Mk=function(e,t,n){return n},$j(mOe,"EStructuralFeatureImpl/SimpleContentFeatureMapEntry",1301),Vle(632,558,YRe,dR),$ve.Jk=function(e){return new dR(this.c,e)},$ve.bd=function(){return this.a},$ve.Lk=function(e,t,n){return n},$ve.Mk=function(e,t,n){return n},$j(mOe,"EStructuralFeatureImpl/SimpleFeatureMapEntry",632),Vle(387,489,hNe,Dc),$ve.mi=function(e){return HY(Ntt,aye,26,e,0,1)},$ve.ii=function(){return!1},$j(mOe,"ESuperAdapter/1",387),Vle(438,431,{104:1,91:1,89:1,147:1,191:1,55:1,107:1,814:1,48:1,96:1,150:1,438:1,113:1,116:1},Fc),$ve.Wg=function(e,t,n){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),this.Ab;case 1:return this.zb;case 2:return!this.a&&(this.a=new tF(this,Utt,this)),this.a}return HK(this,e-Oj((Fve(),dnt)),mQ(xL(k2(this,16),26)||dnt,e),t,n)},$ve.eh=function(e,t,n){switch(t){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),Yee(this.Ab,e,n);case 2:return!this.a&&(this.a=new tF(this,Utt,this)),Yee(this.a,e,n)}return xL(mQ(xL(k2(this,16),26)||(Fve(),dnt),t),65).Ij().Mj(this,q7(this),t-Oj((Fve(),dnt)),e,n)},$ve.gh=function(e){switch(e){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!!this.a&&0!=this.a.i}return PW(this,e-Oj((Fve(),dnt)),mQ(xL(k2(this,16),26)||dnt,e))},$ve.nh=function(e,t){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),lme(this.Ab),!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void Bj(this.Ab,xL(t,15));case 1:return void o0(this,RN(t));case 2:return!this.a&&(this.a=new tF(this,Utt,this)),lme(this.a),!this.a&&(this.a=new tF(this,Utt,this)),void Bj(this.a,xL(t,15))}G8(this,e-Oj((Fve(),dnt)),mQ(xL(k2(this,16),26)||dnt,e),t)},$ve.uh=function(){return Fve(),dnt},$ve.wh=function(e){switch(e){case 0:return!this.Ab&&(this.Ab=new AU(ktt,this,0,3)),void lme(this.Ab);case 1:return void o0(this,null);case 2:return!this.a&&(this.a=new tF(this,Utt,this)),void lme(this.a)}y6(this,e-Oj((Fve(),dnt)),mQ(xL(k2(this,16),26)||dnt,e))},$j(mOe,"ETypeParameterImpl",438),Vle(439,82,zRe,tF),$ve.Zi=function(e,t){return function(e,t,n){var r,i;for(n=qee(t,e.e,-1-e.c,n),i=new Rb(new F4(new Fh(jB(e.a).a).a));i.a.b;)n=rwe(r=xL(JQ(i.a).ad(),86),nfe(r,e.a),n);return n}(this,xL(e,86),t)},$ve.$i=function(e,t){return function(e,t,n){var r,i;for(n=Z$(t,e.e,-1-e.c,n),i=new Rb(new F4(new Fh(jB(e.a).a).a));i.a.b;)n=rwe(r=xL(JQ(i.a).ad(),86),nfe(r,e.a),n);return n}(this,xL(e,86),t)},$j(mOe,"ETypeParameterImpl/1",439),Vle(624,44,w_e,Ow),$ve.ec=function(){return new Nb(this)},$j(mOe,"ETypeParameterImpl/2",624),Vle(550,mye,wye,Nb),$ve.Dc=function(e){return LR(this,xL(e,86))},$ve.Ec=function(e){var t,n,r;for(r=!1,n=e.Ic();n.Ob();)t=xL(n.Pb(),86),null==zB(this.a,t,"")&&(r=!0);return r},$ve.$b=function(){zU(this.a)},$ve.Fc=function(e){return UU(this.a,e)},$ve.Ic=function(){return new Rb(new F4(new Fh(this.a).a))},$ve.Kc=function(e){return tY(this,e)},$ve.gc=function(){return W_(this.a)},$j(mOe,"ETypeParameterImpl/2/1",550),Vle(551,1,dye,Rb),$ve.Nb=function(e){NU(this,e)},$ve.Pb=function(){return xL(JQ(this.a).ad(),86)},$ve.Ob=function(){return this.a.b},$ve.Qb=function(){uK(this.a)},$j(mOe,"ETypeParameterImpl/2/1/1",551),Vle(1248,44,w_e,Nw),$ve._b=function(e){return Mk(e)?p$(this,e):!!H$(this.f,e)},$ve.vc=function(e){var t;return RM(t=Mk(e)?fH(this,e):Tk(H$(this.f,e)),815)?(t=xL(t,815).Wj(),zB(this,xL(e,234),t),t):null!=t?t:null==e?(XS(),qnt):null},$j(mOe,"EValidatorRegistryImpl",1248),Vle(1284,696,{104:1,91:1,89:1,465:1,147:1,55:1,107:1,1913:1,48:1,96:1,150:1,113:1,116:1},Uc),$ve.Dh=function(e,t){switch(e.tj()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return null==t?null:K8(t);case 25:return function(e){var t;return null==e?null:function(e,t){var n,r,i,a,o;if(null==e)return null;for(o=HY(yit,dEe,24,2*t,15,1),r=0,i=0;r>4&15,a=15&e[r],o[i++]=vet[n],o[i++]=vet[a];return A7(o,0,o.length)}(t=xL(e,190),t.length)}(t);case 27:case 28:return function(e){return RM(e,172)?""+xL(e,172).a:null==e?null:K8(e)}(t);case 29:return null==t?null:IM(wet[0],xL(t,198));case 41:return null==t?"":LE(xL(t,289));case 42:return K8(t);case 50:return RN(t);default:throw Jb(new Rv(yOe+e.ne()+EOe))}},$ve.Eh=function(e){var t;switch(-1==e.G&&(e.G=(t=WQ(e))?dte(t.Hh(),e):-1),e.G){case 0:return new Aw;case 1:return new vc;case 2:return new If;case 4:return new hm;case 5:return new kw;case 6:return new fm;case 7:return new Cf;case 10:return new wc;case 11:return new Cw;case 12:return new f$;case 13:return new Mw;case 14:return new kN;case 17:return new Ac;case 18:return new Wb;case 19:return new Fc;default:throw Jb(new Rv(xOe+e.zb+EOe))}},$ve.Fh=function(e,t){switch(e.tj()){case 20:return null==t?null:new QE(t);case 21:return null==t?null:new XC(t);case 23:case 22:return null==t?null:function(e){if(X7(uIe,e))return pO(),_De;if(X7(fIe,e))return pO(),EDe;throw Jb(new Rv("Expecting true or false"))}(t);case 26:case 24:return null==t?null:HZ(kpe(t,-128,127)<<24>>24);case 25:return function(e){var t,n,r,i,a,o,s;if(null==e)return null;for(s=e.length,o=HY(xit,SOe,24,i=(s+1)/2|0,15,1),s%2!=0&&(o[--i]=fde((pG(s-1,e.length),e.charCodeAt(s-1)))),n=0,r=0;n>24;return o}(t);case 27:return function(e){var t;if(null==e)return null;t=0;try{t=kpe(e,iEe,Jve)&pEe}catch(n){if(!RM(n=H2(n),127))throw Jb(n);t=mZ(e)[0]}return v3(t)}(t);case 28:return function(e){var t;if(null==e)return null;t=0;try{t=kpe(e,iEe,Jve)&pEe}catch(n){if(!RM(n=H2(n),127))throw Jb(n);t=mZ(e)[0]}return v3(t)}(t);case 29:return function(e){var t,n;if(null==e)return null;for(t=null,n=0;n>16);case 50:return t;default:throw Jb(new Rv(yOe+e.ne()+EOe))}},$j(mOe,"EcoreFactoryImpl",1284),Vle(540,179,{104:1,91:1,89:1,147:1,191:1,55:1,234:1,107:1,1911:1,48:1,96:1,150:1,179:1,540:1,113:1,116:1,663:1},NB),$ve.gb=!1,$ve.hb=!1;var Unt,jnt=!1;$j(mOe,"EcorePackageImpl",540),Vle(1157,1,{815:1},jc),$ve.Wj=function(){return CI(),Xnt},$j(mOe,"EcorePackageImpl/1",1157),Vle(1166,1,dPe,Bc),$ve.rj=function(e){return RM(e,147)},$ve.sj=function(e){return HY(Iet,aye,147,e,0,1)},$j(mOe,"EcorePackageImpl/10",1166),Vle(1167,1,dPe,zc),$ve.rj=function(e){return RM(e,191)},$ve.sj=function(e){return HY(Net,aye,191,e,0,1)},$j(mOe,"EcorePackageImpl/11",1167),Vle(1168,1,dPe,$c),$ve.rj=function(e){return RM(e,55)},$ve.sj=function(e){return HY(_et,aye,55,e,0,1)},$j(mOe,"EcorePackageImpl/12",1168),Vle(1169,1,dPe,Hc),$ve.rj=function(e){return RM(e,395)},$ve.sj=function(e){return HY(jtt,jRe,58,e,0,1)},$j(mOe,"EcorePackageImpl/13",1169),Vle(1170,1,dPe,Gc),$ve.rj=function(e){return RM(e,234)},$ve.sj=function(e){return HY(Ret,aye,234,e,0,1)},$j(mOe,"EcorePackageImpl/14",1170),Vle(1171,1,dPe,Vc),$ve.rj=function(e){return RM(e,501)},$ve.sj=function(e){return HY(Btt,aye,1986,e,0,1)},$j(mOe,"EcorePackageImpl/15",1171),Vle(1172,1,dPe,Wc),$ve.rj=function(e){return RM(e,97)},$ve.sj=function(e){return HY(ztt,URe,17,e,0,1)},$j(mOe,"EcorePackageImpl/16",1172),Vle(1173,1,dPe,qc),$ve.rj=function(e){return RM(e,170)},$ve.sj=function(e){return HY(Mtt,URe,170,e,0,1)},$j(mOe,"EcorePackageImpl/17",1173),Vle(1174,1,dPe,Xc),$ve.rj=function(e){return RM(e,466)},$ve.sj=function(e){return HY(Ctt,aye,466,e,0,1)},$j(mOe,"EcorePackageImpl/18",1174),Vle(1175,1,dPe,Yc),$ve.rj=function(e){return RM(e,541)},$ve.sj=function(e){return HY(Dnt,lRe,541,e,0,1)},$j(mOe,"EcorePackageImpl/19",1175),Vle(1158,1,dPe,Kc),$ve.rj=function(e){return RM(e,321)},$ve.sj=function(e){return HY(Itt,URe,32,e,0,1)},$j(mOe,"EcorePackageImpl/2",1158),Vle(1176,1,dPe,Zc),$ve.rj=function(e){return RM(e,240)},$ve.sj=function(e){return HY(Utt,VRe,86,e,0,1)},$j(mOe,"EcorePackageImpl/20",1176),Vle(1177,1,dPe,Qc),$ve.rj=function(e){return RM(e,438)},$ve.sj=function(e){return HY(vnt,aye,814,e,0,1)},$j(mOe,"EcorePackageImpl/21",1177),Vle(1178,1,dPe,Jc),$ve.rj=function(e){return kk(e)},$ve.sj=function(e){return HY(TDe,kye,470,e,8,1)},$j(mOe,"EcorePackageImpl/22",1178),Vle(1179,1,dPe,el),$ve.rj=function(e){return RM(e,190)},$ve.sj=function(e){return HY(xit,kye,190,e,0,2)},$j(mOe,"EcorePackageImpl/23",1179),Vle(1180,1,dPe,tl),$ve.rj=function(e){return RM(e,215)},$ve.sj=function(e){return HY(CDe,kye,215,e,0,1)},$j(mOe,"EcorePackageImpl/24",1180),Vle(1181,1,dPe,nl),$ve.rj=function(e){return RM(e,172)},$ve.sj=function(e){return HY(IDe,kye,172,e,0,1)},$j(mOe,"EcorePackageImpl/25",1181),Vle(1182,1,dPe,rl),$ve.rj=function(e){return RM(e,198)},$ve.sj=function(e){return HY(SDe,kye,198,e,0,1)},$j(mOe,"EcorePackageImpl/26",1182),Vle(1183,1,dPe,il),$ve.rj=function(e){return!1},$ve.sj=function(e){return HY(Mit,aye,2078,e,0,1)},$j(mOe,"EcorePackageImpl/27",1183),Vle(1184,1,dPe,al),$ve.rj=function(e){return Ck(e)},$ve.sj=function(e){return HY(ODe,kye,331,e,7,1)},$j(mOe,"EcorePackageImpl/28",1184),Vle(1185,1,dPe,ol),$ve.rj=function(e){return RM(e,57)},$ve.sj=function(e){return HY(Ket,mxe,57,e,0,1)},$j(mOe,"EcorePackageImpl/29",1185),Vle(1159,1,dPe,sl),$ve.rj=function(e){return RM(e,502)},$ve.sj=function(e){return HY(ktt,{3:1,4:1,5:1,1906:1},581,e,0,1)},$j(mOe,"EcorePackageImpl/3",1159),Vle(1186,1,dPe,cl),$ve.rj=function(e){return RM(e,565)},$ve.sj=function(e){return HY(ltt,aye,1912,e,0,1)},$j(mOe,"EcorePackageImpl/30",1186),Vle(1187,1,dPe,ll),$ve.rj=function(e){return RM(e,152)},$ve.sj=function(e){return HY(Znt,mxe,152,e,0,1)},$j(mOe,"EcorePackageImpl/31",1187),Vle(1188,1,dPe,ul),$ve.rj=function(e){return RM(e,71)},$ve.sj=function(e){return HY(Ent,pPe,71,e,0,1)},$j(mOe,"EcorePackageImpl/32",1188),Vle(1189,1,dPe,fl),$ve.rj=function(e){return RM(e,155)},$ve.sj=function(e){return HY(NDe,kye,155,e,0,1)},$j(mOe,"EcorePackageImpl/33",1189),Vle(1190,1,dPe,hl),$ve.rj=function(e){return RM(e,20)},$ve.sj=function(e){return HY(LDe,kye,20,e,0,1)},$j(mOe,"EcorePackageImpl/34",1190),Vle(1191,1,dPe,dl),$ve.rj=function(e){return RM(e,289)},$ve.sj=function(e){return HY(DLe,aye,289,e,0,1)},$j(mOe,"EcorePackageImpl/35",1191),Vle(1192,1,dPe,pl),$ve.rj=function(e){return RM(e,162)},$ve.sj=function(e){return HY(zDe,kye,162,e,0,1)},$j(mOe,"EcorePackageImpl/36",1192),Vle(1193,1,dPe,gl),$ve.rj=function(e){return RM(e,84)},$ve.sj=function(e){return HY(ULe,aye,84,e,0,1)},$j(mOe,"EcorePackageImpl/37",1193),Vle(1194,1,dPe,bl),$ve.rj=function(e){return RM(e,582)},$ve.sj=function(e){return HY(Wnt,aye,582,e,0,1)},$j(mOe,"EcorePackageImpl/38",1194),Vle(1195,1,dPe,ml),$ve.rj=function(e){return!1},$ve.sj=function(e){return HY(Iit,aye,2079,e,0,1)},$j(mOe,"EcorePackageImpl/39",1195),Vle(1160,1,dPe,wl),$ve.rj=function(e){return RM(e,87)},$ve.sj=function(e){return HY(Ntt,aye,26,e,0,1)},$j(mOe,"EcorePackageImpl/4",1160),Vle(1196,1,dPe,vl),$ve.rj=function(e){return RM(e,186)},$ve.sj=function(e){return HY(HDe,kye,186,e,0,1)},$j(mOe,"EcorePackageImpl/40",1196),Vle(1197,1,dPe,yl),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(mOe,"EcorePackageImpl/41",1197),Vle(1198,1,dPe,El),$ve.rj=function(e){return RM(e,579)},$ve.sj=function(e){return HY(Qet,aye,579,e,0,1)},$j(mOe,"EcorePackageImpl/42",1198),Vle(1199,1,dPe,_l),$ve.rj=function(e){return!1},$ve.sj=function(e){return HY(Oit,kye,2080,e,0,1)},$j(mOe,"EcorePackageImpl/43",1199),Vle(1200,1,dPe,Sl),$ve.rj=function(e){return RM(e,43)},$ve.sj=function(e){return HY(WLe,jye,43,e,0,1)},$j(mOe,"EcorePackageImpl/44",1200),Vle(1161,1,dPe,xl),$ve.rj=function(e){return RM(e,138)},$ve.sj=function(e){return HY(Ott,aye,138,e,0,1)},$j(mOe,"EcorePackageImpl/5",1161),Vle(1162,1,dPe,Tl),$ve.rj=function(e){return RM(e,148)},$ve.sj=function(e){return HY(Rtt,aye,148,e,0,1)},$j(mOe,"EcorePackageImpl/6",1162),Vle(1163,1,dPe,Al),$ve.rj=function(e){return RM(e,450)},$ve.sj=function(e){return HY(Dtt,aye,659,e,0,1)},$j(mOe,"EcorePackageImpl/7",1163),Vle(1164,1,dPe,kl),$ve.rj=function(e){return RM(e,565)},$ve.sj=function(e){return HY(Ftt,aye,666,e,0,1)},$j(mOe,"EcorePackageImpl/8",1164),Vle(1165,1,dPe,Cl),$ve.rj=function(e){return RM(e,465)},$ve.sj=function(e){return HY(Oet,aye,465,e,0,1)},$j(mOe,"EcorePackageImpl/9",1165),Vle(1013,1955,sRe,wv),$ve.Yh=function(e,t){!function(e,t){var n,r,i;if(t.qi(e.a),null!=(i=xL(k2(e.a,8),1908)))for(n=0,r=i.length;n0){if(pG(0,e.length),47==e.charCodeAt(0)){for(a=new dY(4),i=1,t=1;t0)try{r=kpe(t,iEe,Jve)}catch(e){throw RM(e=H2(e),127)?Jb(new uZ(e)):Jb(e)}return!e.a&&(e.a=new Pb(e)),r<(n=e.a).i&&r>=0?xL(FQ(n,r),55):null}(e,0==(i=t.c.length)?"":(dG(0,t.c.length),RN(t.c[0]))),r=1;r0&&(e=e.substr(0,n))}return function(e,t){var n,r,i,a,o,s;for(a=null,i=new kU((!e.a&&(e.a=new Pb(e)),e.a));ole(i);)if(Ebe(o=(n=xL(Yue(i),55)).Og()),null!=(r=(s=o.o)&&n.hh(s)?ZR(g3(s),n.Xg(s)):null)&&eP(r,t)){a=n;break}return a}(this,e)},$ve.Sk=function(){return this.c},$ve.Ib=function(){return LE(this.bm)+"@"+(L4(this)>>>0).toString(16)+" uri='"+this.d+"'"},$ve.b=!1,$j(mPe,"ResourceImpl",764),Vle(1350,764,bPe,Lb),$j(mPe,"BinaryResourceImpl",1350),Vle(1142,687,dNe),$ve.ni=function(e){return RM(e,55)?function(e,t){return e.a?t.Rg().Ic():xL(t.Rg(),67).Uh()}(this,xL(e,55)):RM(e,582)?new gI(xL(e,582).Qk()):Ak(e)===Ak(this.f)?xL(e,15).Ic():(mN(),ott.a)},$ve.Ob=function(){return ole(this)},$ve.a=!1,$j(xRe,"EcoreUtil/ContentTreeIterator",1142),Vle(1351,1142,dNe,kU),$ve.ni=function(e){return Ak(e)===Ak(this.f)?xL(e,14).Ic():new bW(xL(e,55))},$j(mPe,"ResourceImpl/5",1351),Vle(638,1963,BRe,Pb),$ve.Fc=function(e){return this.i<=4?tie(this,e):RM(e,48)&&xL(e,48).Ug()==this.a},$ve.Yh=function(e,t){e==this.i-1&&(this.a.b||(this.a.b=!0))},$ve.$h=function(e,t){0==e?this.a.b||(this.a.b=!0):zY(this,e,t)},$ve.ai=function(e,t){},$ve.bi=function(e,t,n){},$ve.Xi=function(){return 2},$ve.vi=function(){return this.a},$ve.Yi=function(){return!0},$ve.Zi=function(e,t){return xL(e,48).rh(this.a,t)},$ve.$i=function(e,t){return xL(e,48).rh(null,t)},$ve._i=function(){return!1},$ve.ci=function(){return!0},$ve.mi=function(e){return HY(_et,aye,55,e,0,1)},$ve.ii=function(){return!1},$j(mPe,"ResourceImpl/ContentsEList",638),Vle(963,1936,Zye,Db),$ve.Xc=function(e){return this.a.Wh(e)},$ve.gc=function(){return this.a.gc()},$j(xRe,"AbstractSequentialInternalEList/1",963),Vle(614,1,{},WL),$j(xRe,"BasicExtendedMetaData",614),Vle(1133,1,{},vk),$ve.Vk=function(){return null},$ve.Wk=function(){var e;return-2==this.a&&(this,e=function(e,t){var n,r,i;if((n=t.Ch(e.a))&&null!=(i=G9((!n.b&&(n.b=new rN((Fve(),unt),Dnt,n)),n.b),GRe)))for(r=1;r<(yse(),Bnt).length;++r)if(eP(Bnt[r],i))return r;return 0}(this.d,this.b),this.a=e),this.a},$ve.Xk=function(){return null},$ve.Yk=function(){return i$(),i$(),dFe},$ve.ne=function(){var e;return this.c==NPe&&(this,e=Z7(this.d,this.b),this.c=e),this.c},$ve.Zk=function(){return 0},$ve.a=-2,$ve.c=NPe,$j(xRe,"BasicExtendedMetaData/EClassExtendedMetaDataImpl",1133),Vle(1134,1,{},yV),$ve.Vk=function(){var e;return this.a==(cY(),Gnt)&&(this,e=function(e,t){var n,r,i,a;return(r=t.Ch(e.a))&&(!r.b&&(r.b=new rN((Fve(),unt),Dnt,r)),null!=(n=RN(G9(r.b,nPe)))&&RM(a=-1==(i=n.lastIndexOf("#"))?gN(e,t.vj(),n):0==i?dK(e,null,n.substr(1)):dK(e,n.substr(0,i),n.substr(i+1)),148))?xL(a,148):null}(this.f,this.b),this.a=e),this.a},$ve.Wk=function(){return 0},$ve.Xk=function(){var e;return this.c==(cY(),Gnt)&&(this,e=function(e,t){var n,r,i,a;return(n=t.Ch(e.a))&&(!n.b&&(n.b=new rN((Fve(),unt),Dnt,n)),null!=(i=RN(G9(n.b,TPe)))&&RM(a=-1==(r=i.lastIndexOf("#"))?gN(e,t.vj(),i):0==r?dK(e,null,i.substr(1)):dK(e,i.substr(0,r),i.substr(r+1)),148))?xL(a,148):null}(this.f,this.b),this.c=e),this.c},$ve.Yk=function(){var e;return!this.d&&(this,e=function(e,t){var n,r,i,a,o,s,c,l,u;if((n=t.Ch(e.a))&&null!=(c=RN(G9((!n.b&&(n.b=new rN((Fve(),unt),Dnt,n)),n.b),"memberTypes")))){for(l=new $b,o=0,s=(a=ipe(c,"\\w")).length;on?t:n;l<=f;++l)l==n?s=r++:(a=i[l],u=p.ml(a.Xj()),l==t&&(c=l!=f||u?r:r-1),u&&++r);return h=xL(g8(e,t,n),71),s!=c&&km(e,new oK(e.e,7,o,G6(s),d.bd(),c)),h}return xL(g8(e,t,n),71)}(this,e,t)},$ve.gi=function(e,t){return function(e,t,n){var r,i,a,o,s,c,l,u,f,h,d,p,g,b;if(RM(o=n.Xj(),97)&&0!=(xL(o,17).Bb&i_e)&&(h=xL(n.bd(),48),(g=Q5(e.e,h))!=h)){if(rI(e,t,Yie(e,0,u=GW(o,g))),f=null,NC(e.e)&&(r=_me((yse(),$nt),e.e.Og(),o))!=mQ(e.e.Og(),e.c)){for(b=Kfe(e.e.Og(),o),s=0,a=xL(e.g,118),c=0;c=0;)if(t=e[this.c],this.k.ml(t.Xj()))return this.j=this.f?t:t.bd(),this.i=-2,!0;return this.i=-1,this.g=-1,!1},$j(xRe,"BasicFeatureMap/FeatureEIterator",405),Vle(650,405,_ye,oC),$ve.Gk=function(){return!0},$j(xRe,"BasicFeatureMap/ResolvingFeatureEIterator",650),Vle(961,481,qRe,UM),$ve.Bi=function(){return this},$j(xRe,"EContentsEList/1",961),Vle(962,481,qRe,sC),$ve.Gk=function(){return!1},$j(xRe,"EContentsEList/2",962),Vle(960,277,XRe,jM),$ve.Ik=function(e){},$ve.Ob=function(){return!1},$ve.Sb=function(){return!1},$j(xRe,"EContentsEList/FeatureIteratorImpl/1",960),Vle(804,576,zRe,oI),$ve.Zh=function(){this.a=!0},$ve.aj=function(){return this.a},$ve.Sj=function(){var e;lme(this),NC(this.e)?(e=this.a,this.a=!1,E2(this.e,new aX(this.e,2,this.c,e,!1))):this.a=!1},$ve.a=!1,$j(xRe,"EDataTypeEList/Unsettable",804),Vle(1821,576,zRe,sI),$ve.ci=function(){return!0},$j(xRe,"EDataTypeUniqueEList",1821),Vle(1822,804,zRe,cI),$ve.ci=function(){return!0},$j(xRe,"EDataTypeUniqueEList/Unsettable",1822),Vle(139,82,zRe,lI),$ve.zk=function(){return!0},$ve.gi=function(e,t){return Mle(this,e,xL(t,55))},$j(xRe,"EObjectContainmentEList/Resolving",139),Vle(1136,538,zRe,uI),$ve.zk=function(){return!0},$ve.gi=function(e,t){return Mle(this,e,xL(t,55))},$j(xRe,"EObjectContainmentEList/Unsettable/Resolving",1136),Vle(731,16,zRe,UR),$ve.Zh=function(){this.a=!0},$ve.aj=function(){return this.a},$ve.Sj=function(){var e;lme(this),NC(this.e)?(e=this.a,this.a=!1,E2(this.e,new aX(this.e,2,this.c,e,!1))):this.a=!1},$ve.a=!1,$j(xRe,"EObjectContainmentWithInverseEList/Unsettable",731),Vle(1146,731,zRe,jR),$ve.zk=function(){return!0},$ve.gi=function(e,t){return Mle(this,e,xL(t,55))},$j(xRe,"EObjectContainmentWithInverseEList/Unsettable/Resolving",1146),Vle(726,488,zRe,fI),$ve.Zh=function(){this.a=!0},$ve.aj=function(){return this.a},$ve.Sj=function(){var e;lme(this),NC(this.e)?(e=this.a,this.a=!1,E2(this.e,new aX(this.e,2,this.c,e,!1))):this.a=!1},$ve.a=!1,$j(xRe,"EObjectEList/Unsettable",726),Vle(326,488,zRe,hI),$ve.zk=function(){return!0},$ve.gi=function(e,t){return Mle(this,e,xL(t,55))},$j(xRe,"EObjectResolvingEList",326),Vle(1611,726,zRe,dI),$ve.zk=function(){return!0},$ve.gi=function(e,t){return Mle(this,e,xL(t,55))},$j(xRe,"EObjectResolvingEList/Unsettable",1611),Vle(1352,1,{},Ml),$j(xRe,"EObjectValidator",1352),Vle(539,488,zRe,CU),$ve.uk=function(){return this.d},$ve.vk=function(){return this.b},$ve.Yi=function(){return!0},$ve.yk=function(){return!0},$ve.b=0,$j(xRe,"EObjectWithInverseEList",539),Vle(1149,539,zRe,BR),$ve.xk=function(){return!0},$j(xRe,"EObjectWithInverseEList/ManyInverse",1149),Vle(615,539,zRe,zR),$ve.Zh=function(){this.a=!0},$ve.aj=function(){return this.a},$ve.Sj=function(){var e;lme(this),NC(this.e)?(e=this.a,this.a=!1,E2(this.e,new aX(this.e,2,this.c,e,!1))):this.a=!1},$ve.a=!1,$j(xRe,"EObjectWithInverseEList/Unsettable",615),Vle(1148,615,zRe,HR),$ve.xk=function(){return!0},$j(xRe,"EObjectWithInverseEList/Unsettable/ManyInverse",1148),Vle(732,539,zRe,$R),$ve.zk=function(){return!0},$ve.gi=function(e,t){return Mle(this,e,xL(t,55))},$j(xRe,"EObjectWithInverseResolvingEList",732),Vle(33,732,zRe,VR),$ve.xk=function(){return!0},$j(xRe,"EObjectWithInverseResolvingEList/ManyInverse",33),Vle(733,615,zRe,GR),$ve.zk=function(){return!0},$ve.gi=function(e,t){return Mle(this,e,xL(t,55))},$j(xRe,"EObjectWithInverseResolvingEList/Unsettable",733),Vle(1147,733,zRe,WR),$ve.xk=function(){return!0},$j(xRe,"EObjectWithInverseResolvingEList/Unsettable/ManyInverse",1147),Vle(1137,612,zRe),$ve.Xh=function(){return 0==(1792&this.b)},$ve.Zh=function(){this.b|=1},$ve.wk=function(){return 0!=(4&this.b)},$ve.Yi=function(){return 0!=(40&this.b)},$ve.xk=function(){return 0!=(16&this.b)},$ve.yk=function(){return 0!=(8&this.b)},$ve.zk=function(){return 0!=(this.b&MRe)},$ve.mk=function(){return 0!=(32&this.b)},$ve.Ak=function(){return 0!=(this.b&uRe)},$ve.rj=function(e){return this.d?FW(this.d,e):this.Xj().Tj().rj(e)},$ve.aj=function(){return 0!=(2&this.b)?0!=(1&this.b):0!=this.i},$ve.ci=function(){return 0!=(128&this.b)},$ve.Sj=function(){var e;lme(this),0!=(2&this.b)&&(NC(this.e)?(e=0!=(1&this.b),this.b&=-2,km(this,new aX(this.e,2,k9(this.e.Og(),this.Xj()),e,!1))):this.b&=-2)},$ve.ii=function(){return 0==(1536&this.b)},$ve.b=0,$j(xRe,"EcoreEList/Generic",1137),Vle(1138,1137,zRe,C$),$ve.Xj=function(){return this.a},$j(xRe,"EcoreEList/Dynamic",1138),Vle(730,60,hNe,Fb),$ve.mi=function(e){return DJ(this.a.a,e)},$j(xRe,"EcoreEMap/1",730),Vle(729,82,zRe,MU),$ve.Yh=function(e,t){Nte(this.b,xL(t,133))},$ve.$h=function(e,t){M2(this.b)},$ve._h=function(e,t,n){var r;++(r=this.b,xL(t,133),r).e},$ve.ai=function(e,t){p8(this.b,xL(t,133))},$ve.bi=function(e,t,n){p8(this.b,xL(n,133)),Ak(n)===Ak(t)&&xL(n,133).Oh(function(e){return null==e?0:L4(e)}(xL(t,133).ad())),Nte(this.b,xL(t,133))},$j(xRe,"EcoreEMap/DelegateEObjectContainmentEList",729),Vle(1144,143,ARe,a1),$j(xRe,"EcoreEMap/Unsettable",1144),Vle(1145,729,zRe,qR),$ve.Zh=function(){this.a=!0},$ve.aj=function(){return this.a},$ve.Sj=function(){var e;lme(this),NC(this.e)?(e=this.a,this.a=!1,E2(this.e,new aX(this.e,2,this.c,e,!1))):this.a=!1},$ve.a=!1,$j(xRe,"EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList",1145),Vle(1141,226,w_e,Cj),$ve.a=!1,$ve.b=!1,$j(xRe,"EcoreUtil/Copier",1141),Vle(728,1,dye,bW),$ve.Nb=function(e){NU(this,e)},$ve.Ob=function(){return r7(this)},$ve.Pb=function(){var e;return r7(this),e=this.b,this.b=null,e},$ve.Qb=function(){this.a.Qb()},$j(xRe,"EcoreUtil/ProperContentIterator",728),Vle(1353,1352,{},Of),$j(xRe,"EcoreValidator",1353),TD(xRe,"FeatureMapUtil/Validator"),Vle(1234,1,{1914:1},Nl),$ve.ml=function(e){return!0},$j(xRe,"FeatureMapUtil/1",1234),Vle(740,1,{1914:1},Mwe),$ve.ml=function(e){var t;return this.c==e||(null==(t=ON(qj(this.a,e)))?function(e,t){var n;return e.f==Knt?(n=UB(gZ((yse(),$nt),t)),e.e?4==n&&t!=(dle(),trt)&&t!=(dle(),Qnt)&&t!=(dle(),Jnt)&&t!=(dle(),ert):2==n):!(!e.d||!(e.d.Fc(t)||e.d.Fc(zG(gZ((yse(),$nt),t)))||e.d.Fc(_me((yse(),$nt),e.b,t))))||!(!e.f||!xfe((yse(),e.f),Nz(gZ($nt,t))))&&(n=UB(gZ($nt,t)),e.e?4==n:2==n)}(this,e)?(kX(this.a,e,(pO(),_De)),!0):(kX(this.a,e,(pO(),EDe)),!1):t==(pO(),_De))},$ve.e=!1,$j(xRe,"FeatureMapUtil/BasicValidator",740),Vle(741,44,w_e,pI),$j(xRe,"FeatureMapUtil/BasicValidator/Cache",741),Vle(492,51,{19:1,28:1,51:1,15:1,14:1,57:1,76:1,67:1,95:1},Ek),$ve.Tc=function(e,t){uhe(this.c,this.b,e,t)},$ve.Dc=function(e){return hpe(this.c,this.b,e)},$ve.Uc=function(e,t){return function(e,t,n,r){var i,a,o,s,c,l,u,f;if(0==r.gc())return!1;if(YS(),o=(c=xL(t,65).Jj())?r:new yQ(r.gc()),phe(e.e,t)){if(t.ci())for(u=r.Ic();u.Ob();)Pge(e,t,l=u.Pb(),RM(t,97)&&0!=(xL(t,17).Bb&i_e))||(a=GW(t,l),o.Dc(a));else if(!c)for(u=r.Ic();u.Ob();)a=GW(t,l=u.Pb()),o.Dc(a)}else{for(f=Kfe(e.e.Og(),t),i=xL(e.g,118),s=0;s1)throw Jb(new Rv(RPe));c||(a=GW(t,r.Ic().Pb()),o.Dc(a))}return T3(e,ise(e,t,n),o)}(this.c,this.b,e,t)},$ve.Ec=function(e){return NM(this,e)},$ve.Sh=function(e,t){!function(e,t,n,r){e.j=-1,Cle(e,ise(e,t,n),(YS(),xL(t,65).Hj().Jk(r)))}(this.c,this.b,e,t)},$ve.gk=function(e,t){return Mde(this.c,this.b,e,t)},$ve.ki=function(e){return xbe(this.c,this.b,e,!1)},$ve.Uh=function(){return BC(this.c,this.b)},$ve.Vh=function(){return e=this.c,new R2(this.b,e);var e},$ve.Wh=function(e){return function(e,t,n){var r,i;for(i=new R2(t,e),r=0;r>24,l=(3&t)<<24>>24,d=0==(-128&t)?t>>2<<24>>24:(t>>2^192)<<24>>24,p=0==(-128&n)?n>>4<<24>>24:(n>>4^240)<<24>>24,g=0==(-128&(r=e[i++]))?r>>6<<24>>24:(r>>6^252)<<24>>24,a[o++]=Urt[d],a[o++]=Urt[p|l<<4],a[o++]=Urt[u<<2|g],a[o++]=Urt[63&r];return 8==s?(l=(3&(t=e[i]))<<24>>24,d=0==(-128&t)?t>>2<<24>>24:(t>>2^192)<<24>>24,a[o++]=Urt[d],a[o++]=Urt[l<<4],a[o++]=61,a[o++]=61):16==s&&(t=e[i],u=(15&(n=e[i+1]))<<24>>24,l=(3&t)<<24>>24,d=0==(-128&t)?t>>2<<24>>24:(t>>2^192)<<24>>24,p=0==(-128&n)?n>>4<<24>>24:(n>>4^240)<<24>>24,a[o++]=Urt[d],a[o++]=Urt[p|l<<4],a[o++]=Urt[u<<2],a[o++]=61),A7(a,0,a.length)}(e)}(xL(t,190));case 12:case 47:case 49:case 11:return qme(this,e,t);case 13:return null==t?null:function(e){var t,n,i,a;if(i=Eve((!e.c&&(e.c=o6(e.f)),e.c),0),0==e.e||0==e.a&&-1!=e.f&&e.e<0)return i;if(t=KJ(e)<0?1:0,n=e.e,i.length,r.Math.abs(dH(e.e)),a=new hy,1==t&&(a.a+="-"),e.e>0)if((n-=i.length-t)>=0){for(a.a+="0.";n>qDe.length;n-=qDe.length)GD(a,qDe);aR(a,qDe,dH(n)),Bk(a,i.substr(t))}else Bk(a,OO(i,t,dH(n=t-n))),a.a+=".",Bk(a,Pk(i,dH(n)));else{for(Bk(a,i.substr(t));n<-qDe.length;n+=qDe.length)GD(a,qDe);aR(a,qDe,dH(-n))}return a.a}(xL(t,239));case 15:case 14:return null==t?null:function(e){return e==e_e?jPe:e==t_e?"-INF":""+e}(Mv(NN(t)));case 17:return Aie((Tme(),t));case 18:return Aie(t);case 21:case 20:return null==t?null:function(e){return e==e_e?jPe:e==t_e?"-INF":""+e}(xL(t,155).a);case 27:return function(e){return null==e?null:function(e){var t,n,r,i;if(tde(),null==e)return null;for(r=e.length,t=HY(yit,dEe,24,2*r,15,1),n=0;n>4],t[2*n+1]=Brt[15&i];return A7(t,0,t.length)}(e)}(xL(t,190));case 30:return yne((Tme(),xL(t,14)));case 31:return yne(xL(t,14));case 40:case 59:case 48:return function(e){return null==e?null:K8(e)}((Tme(),t));case 42:return kie((Tme(),t));case 43:return kie(t);default:throw Jb(new Rv(yOe+e.ne()+EOe))}},$ve.Eh=function(e){var t;switch(-1==e.G&&(e.G=(t=WQ(e))?dte(t.Hh(),e):-1),e.G){case 0:return new Rw;case 1:return new Rl;case 2:return new Lw;case 3:return new Pw;default:throw Jb(new Rv(xOe+e.zb+EOe))}},$ve.Fh=function(e,t){var n,r,i,a,o,s,c,l,u,f,h,d,p,g,b,m;switch(e.tj()){case 5:case 52:case 4:return t;case 6:return function(e){var t;if(null==e)return null;if(t=function(e){var t,n,r,i,a,o,s,c,l,u,f,h,d,p,g,b;if(yge(),null==e)return null;if(p=function(e){var t,n,r;for(r=0,n=e.length,t=0;t>4)<<24>>24,f[h++]=((15&n)<<4|r>>2&15)<<24>>24,f[h++]=(r<<6|i)<<24>>24}return q_(o=a[u++])&&q_(s=a[u++])?(t=Frt[o],n=Frt[s],c=a[u++],l=a[u++],-1==Frt[c]||-1==Frt[l]?61==c&&61==l?0!=(15&n)?null:(Abe(f,0,b=HY(xit,SOe,24,3*d+1,15,1),0,3*d),b[h]=(t<<2|n>>4)<<24>>24,b):61!=c&&61==l?0!=(3&(r=Frt[c]))?null:(Abe(f,0,b=HY(xit,SOe,24,3*d+2,15,1),0,3*d),b[h++]=(t<<2|n>>4)<<24>>24,b[h]=((15&n)<<4|r>>2&15)<<24>>24,b):null:(r=Frt[c],i=Frt[l],f[h++]=(t<<2|n>>4)<<24>>24,f[h++]=((15&n)<<4|r>>2&15)<<24>>24,f[h++]=(r<<6|i)<<24>>24,f)):null}(pbe(e,!0)),null==t)throw Jb(new qv("Invalid base64Binary value: '"+e+"'"));return t}(t);case 8:case 7:return null==t?null:function(e){if(e=pbe(e,!0),eP(uIe,e)||eP("1",e))return pO(),_De;if(eP(fIe,e)||eP("0",e))return pO(),EDe;throw Jb(new qv("Invalid boolean value: '"+e+"'"))}(t);case 9:return null==t?null:HZ(kpe((r=pbe(t,!0)).length>0&&(pG(0,r.length),43==r.charCodeAt(0))?r.substr(1):r,-128,127)<<24>>24);case 10:return null==t?null:HZ(kpe((i=pbe(t,!0)).length>0&&(pG(0,i.length),43==i.charCodeAt(0))?i.substr(1):i,-128,127)<<24>>24);case 11:return RN(gve(this,(Tme(),urt),t));case 12:return RN(gve(this,(Tme(),frt),t));case 13:return null==t?null:new QE(pbe(t,!0));case 15:case 14:return function(e){var t,n,r;if(null==e)return null;if(3,eP((r=pbe(e,!0)).substr(r.length-3,3),jPe))if(4==(n=r.length)){if(pG(0,r.length),43==(t=r.charCodeAt(0)))return Ort;if(45==t)return Irt}else if(3==n)return Ort;return woe(r)}(t);case 16:return RN(gve(this,(Tme(),hrt),t));case 17:return y7((Tme(),t));case 18:return y7(t);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return pbe(t,!0);case 21:case 20:return function(e){var t,n,r;if(null==e)return null;if(3,eP((r=pbe(e,!0)).substr(r.length-3,3),jPe))if(4==(n=r.length)){if(pG(0,r.length),43==(t=r.charCodeAt(0)))return Rrt;if(45==t)return Nrt}else if(3==n)return Rrt;return new ew(r)}(t);case 22:return RN(gve(this,(Tme(),drt),t));case 23:return RN(gve(this,(Tme(),prt),t));case 24:return RN(gve(this,(Tme(),grt),t));case 25:return RN(gve(this,(Tme(),brt),t));case 26:return RN(gve(this,(Tme(),mrt),t));case 27:return function(e){var t;if(null==e)return null;if(t=function(e){var t,n,r,i,a,o,s;if(tde(),null==e)return null;if((i=e.length)%2!=0)return null;for(t=mZ(e),n=HY(xit,SOe,24,a=i/2|0,15,1),r=0;r>24}return n}(pbe(e,!0)),null==t)throw Jb(new qv("Invalid hexBinary value: '"+e+"'"));return t}(t);case 30:return E7((Tme(),t));case 31:return E7(t);case 32:return null==t?null:G6(kpe((u=pbe(t,!0)).length>0&&(pG(0,u.length),43==u.charCodeAt(0))?u.substr(1):u,iEe,Jve));case 33:return null==t?null:new XC((f=pbe(t,!0)).length>0&&(pG(0,f.length),43==f.charCodeAt(0))?f.substr(1):f);case 34:return null==t?null:G6(kpe((h=pbe(t,!0)).length>0&&(pG(0,h.length),43==h.charCodeAt(0))?h.substr(1):h,iEe,Jve));case 36:return null==t?null:D7(Twe((d=pbe(t,!0)).length>0&&(pG(0,d.length),43==d.charCodeAt(0))?d.substr(1):d));case 37:return null==t?null:D7(Twe((p=pbe(t,!0)).length>0&&(pG(0,p.length),43==p.charCodeAt(0))?p.substr(1):p));case 40:case 59:case 48:return function(e){var t;return null==e?null:new XC((t=pbe(e,!0)).length>0&&(pG(0,t.length),43==t.charCodeAt(0))?t.substr(1):t)}((Tme(),t));case 42:return _7((Tme(),t));case 43:return _7(t);case 44:return null==t?null:new XC((g=pbe(t,!0)).length>0&&(pG(0,g.length),43==g.charCodeAt(0))?g.substr(1):g);case 45:return null==t?null:new XC((b=pbe(t,!0)).length>0&&(pG(0,b.length),43==b.charCodeAt(0))?b.substr(1):b);case 46:return pbe(t,!1);case 47:return RN(gve(this,(Tme(),wrt),t));case 49:return RN(gve(this,(Tme(),yrt),t));case 50:return null==t?null:H6(kpe((m=pbe(t,!0)).length>0&&(pG(0,m.length),43==m.charCodeAt(0))?m.substr(1):m,ePe,32767)<<16>>16);case 51:return null==t?null:H6(kpe((a=pbe(t,!0)).length>0&&(pG(0,a.length),43==a.charCodeAt(0))?a.substr(1):a,ePe,32767)<<16>>16);case 53:return RN(gve(this,(Tme(),Srt),t));case 55:return null==t?null:H6(kpe((o=pbe(t,!0)).length>0&&(pG(0,o.length),43==o.charCodeAt(0))?o.substr(1):o,ePe,32767)<<16>>16);case 56:return null==t?null:H6(kpe((s=pbe(t,!0)).length>0&&(pG(0,s.length),43==s.charCodeAt(0))?s.substr(1):s,ePe,32767)<<16>>16);case 57:return null==t?null:D7(Twe((c=pbe(t,!0)).length>0&&(pG(0,c.length),43==c.charCodeAt(0))?c.substr(1):c));case 58:return null==t?null:D7(Twe((l=pbe(t,!0)).length>0&&(pG(0,l.length),43==l.charCodeAt(0))?l.substr(1):l));case 60:return null==t?null:G6(kpe((n=pbe(t,!0)).length>0&&(pG(0,n.length),43==n.charCodeAt(0))?n.substr(1):n,iEe,Jve));case 61:return null==t?null:G6(kpe(pbe(t,!0),iEe,Jve));default:throw Jb(new Rv(yOe+e.ne()+EOe))}},$j(UPe,"XMLTypeFactoryImpl",1891),Vle(577,179,{104:1,91:1,89:1,147:1,191:1,55:1,234:1,107:1,48:1,96:1,150:1,179:1,113:1,116:1,663:1,1917:1,577:1},RB),$ve.N=!1,$ve.O=!1;var Frt,Urt,jrt,Brt,zrt,$rt=!1;$j(UPe,"XMLTypePackageImpl",577),Vle(1824,1,{815:1},Pl),$ve.Wj=function(){return dge(),dit},$j(UPe,"XMLTypePackageImpl/1",1824),Vle(1833,1,dPe,Il),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/10",1833),Vle(1834,1,dPe,Ll),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/11",1834),Vle(1835,1,dPe,Dl),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/12",1835),Vle(1836,1,dPe,Fl),$ve.rj=function(e){return Ck(e)},$ve.sj=function(e){return HY(ODe,kye,331,e,7,1)},$j(UPe,"XMLTypePackageImpl/13",1836),Vle(1837,1,dPe,Ul),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/14",1837),Vle(1838,1,dPe,jl),$ve.rj=function(e){return RM(e,14)},$ve.sj=function(e){return HY(zLe,mxe,14,e,0,1)},$j(UPe,"XMLTypePackageImpl/15",1838),Vle(1839,1,dPe,Bl),$ve.rj=function(e){return RM(e,14)},$ve.sj=function(e){return HY(zLe,mxe,14,e,0,1)},$j(UPe,"XMLTypePackageImpl/16",1839),Vle(1840,1,dPe,zl),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/17",1840),Vle(1841,1,dPe,$l),$ve.rj=function(e){return RM(e,155)},$ve.sj=function(e){return HY(NDe,kye,155,e,0,1)},$j(UPe,"XMLTypePackageImpl/18",1841),Vle(1842,1,dPe,Hl),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/19",1842),Vle(1825,1,dPe,Gl),$ve.rj=function(e){return RM(e,822)},$ve.sj=function(e){return HY(rrt,aye,822,e,0,1)},$j(UPe,"XMLTypePackageImpl/2",1825),Vle(1843,1,dPe,Vl),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/20",1843),Vle(1844,1,dPe,Wl),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/21",1844),Vle(1845,1,dPe,ql),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/22",1845),Vle(1846,1,dPe,Xl),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/23",1846),Vle(1847,1,dPe,Yl),$ve.rj=function(e){return RM(e,190)},$ve.sj=function(e){return HY(xit,kye,190,e,0,2)},$j(UPe,"XMLTypePackageImpl/24",1847),Vle(1848,1,dPe,Kl),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/25",1848),Vle(1849,1,dPe,Zl),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/26",1849),Vle(1850,1,dPe,Ql),$ve.rj=function(e){return RM(e,14)},$ve.sj=function(e){return HY(zLe,mxe,14,e,0,1)},$j(UPe,"XMLTypePackageImpl/27",1850),Vle(1851,1,dPe,Jl),$ve.rj=function(e){return RM(e,14)},$ve.sj=function(e){return HY(zLe,mxe,14,e,0,1)},$j(UPe,"XMLTypePackageImpl/28",1851),Vle(1852,1,dPe,eu),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/29",1852),Vle(1826,1,dPe,tu),$ve.rj=function(e){return RM(e,655)},$ve.sj=function(e){return HY(Prt,aye,1990,e,0,1)},$j(UPe,"XMLTypePackageImpl/3",1826),Vle(1853,1,dPe,nu),$ve.rj=function(e){return RM(e,20)},$ve.sj=function(e){return HY(LDe,kye,20,e,0,1)},$j(UPe,"XMLTypePackageImpl/30",1853),Vle(1854,1,dPe,ru),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/31",1854),Vle(1855,1,dPe,iu),$ve.rj=function(e){return RM(e,162)},$ve.sj=function(e){return HY(zDe,kye,162,e,0,1)},$j(UPe,"XMLTypePackageImpl/32",1855),Vle(1856,1,dPe,au),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/33",1856),Vle(1857,1,dPe,ou),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/34",1857),Vle(1858,1,dPe,su),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/35",1858),Vle(1859,1,dPe,cu),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/36",1859),Vle(1860,1,dPe,lu),$ve.rj=function(e){return RM(e,14)},$ve.sj=function(e){return HY(zLe,mxe,14,e,0,1)},$j(UPe,"XMLTypePackageImpl/37",1860),Vle(1861,1,dPe,uu),$ve.rj=function(e){return RM(e,14)},$ve.sj=function(e){return HY(zLe,mxe,14,e,0,1)},$j(UPe,"XMLTypePackageImpl/38",1861),Vle(1862,1,dPe,fu),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/39",1862),Vle(1827,1,dPe,hu),$ve.rj=function(e){return RM(e,656)},$ve.sj=function(e){return HY(Lrt,aye,1991,e,0,1)},$j(UPe,"XMLTypePackageImpl/4",1827),Vle(1863,1,dPe,du),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/40",1863),Vle(1864,1,dPe,pu),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/41",1864),Vle(1865,1,dPe,gu),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/42",1865),Vle(1866,1,dPe,bu),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/43",1866),Vle(1867,1,dPe,mu),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/44",1867),Vle(1868,1,dPe,wu),$ve.rj=function(e){return RM(e,186)},$ve.sj=function(e){return HY(HDe,kye,186,e,0,1)},$j(UPe,"XMLTypePackageImpl/45",1868),Vle(1869,1,dPe,vu),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/46",1869),Vle(1870,1,dPe,yu),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/47",1870),Vle(1871,1,dPe,Eu),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/48",1871),Vle(1872,1,dPe,_u),$ve.rj=function(e){return RM(e,186)},$ve.sj=function(e){return HY(HDe,kye,186,e,0,1)},$j(UPe,"XMLTypePackageImpl/49",1872),Vle(1828,1,dPe,Su),$ve.rj=function(e){return RM(e,657)},$ve.sj=function(e){return HY(Drt,aye,1992,e,0,1)},$j(UPe,"XMLTypePackageImpl/5",1828),Vle(1873,1,dPe,xu),$ve.rj=function(e){return RM(e,162)},$ve.sj=function(e){return HY(zDe,kye,162,e,0,1)},$j(UPe,"XMLTypePackageImpl/50",1873),Vle(1874,1,dPe,Tu),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/51",1874),Vle(1875,1,dPe,Au),$ve.rj=function(e){return RM(e,20)},$ve.sj=function(e){return HY(LDe,kye,20,e,0,1)},$j(UPe,"XMLTypePackageImpl/52",1875),Vle(1829,1,dPe,ku),$ve.rj=function(e){return Mk(e)},$ve.sj=function(e){return HY(eFe,kye,2,e,6,1)},$j(UPe,"XMLTypePackageImpl/6",1829),Vle(1830,1,dPe,Cu),$ve.rj=function(e){return RM(e,190)},$ve.sj=function(e){return HY(xit,kye,190,e,0,2)},$j(UPe,"XMLTypePackageImpl/7",1830),Vle(1831,1,dPe,Mu),$ve.rj=function(e){return kk(e)},$ve.sj=function(e){return HY(TDe,kye,470,e,8,1)},$j(UPe,"XMLTypePackageImpl/8",1831),Vle(1832,1,dPe,Iu),$ve.rj=function(e){return RM(e,215)},$ve.sj=function(e){return HY(CDe,kye,215,e,0,1)},$j(UPe,"XMLTypePackageImpl/9",1832),Vle(50,59,oEe,Xv),$j(uLe,"RegEx/ParseException",50),Vle(799,1,{},Ou),$ve.nl=function(e){return e16*n)throw Jb(new Xv(Bve((cM(),VNe))));n=16*n+i}if(125!=this.a)throw Jb(new Xv(Bve((cM(),WNe))));if(n>fLe)throw Jb(new Xv(Bve((cM(),qNe))));e=n}else{if(i=0,0!=this.c||(i=Vte(this.a))<0)throw Jb(new Xv(Bve((cM(),GNe))));if(n=i,Tve(this),0!=this.c||(i=Vte(this.a))<0)throw Jb(new Xv(Bve((cM(),GNe))));e=n=16*n+i}break;case 117:if(r=0,Tve(this),0!=this.c||(r=Vte(this.a))<0)throw Jb(new Xv(Bve((cM(),GNe))));if(t=r,Tve(this),0!=this.c||(r=Vte(this.a))<0)throw Jb(new Xv(Bve((cM(),GNe))));if(t=16*t+r,Tve(this),0!=this.c||(r=Vte(this.a))<0)throw Jb(new Xv(Bve((cM(),GNe))));if(t=16*t+r,Tve(this),0!=this.c||(r=Vte(this.a))<0)throw Jb(new Xv(Bve((cM(),GNe))));e=t=16*t+r;break;case 118:if(Tve(this),0!=this.c||(r=Vte(this.a))<0)throw Jb(new Xv(Bve((cM(),GNe))));if(t=r,Tve(this),0!=this.c||(r=Vte(this.a))<0)throw Jb(new Xv(Bve((cM(),GNe))));if(t=16*t+r,Tve(this),0!=this.c||(r=Vte(this.a))<0)throw Jb(new Xv(Bve((cM(),GNe))));if(t=16*t+r,Tve(this),0!=this.c||(r=Vte(this.a))<0)throw Jb(new Xv(Bve((cM(),GNe))));if(t=16*t+r,Tve(this),0!=this.c||(r=Vte(this.a))<0)throw Jb(new Xv(Bve((cM(),GNe))));if(t=16*t+r,Tve(this),0!=this.c||(r=Vte(this.a))<0)throw Jb(new Xv(Bve((cM(),GNe))));if((t=16*t+r)>fLe)throw Jb(new Xv(Bve((cM(),"parser.descappe.4"))));e=t;break;case 65:case 90:case 122:throw Jb(new Xv(Bve((cM(),XNe))))}return e},$ve.pl=function(e){var t;switch(e){case 100:t=32==(32&this.e)?Kwe("Nd",!0):(Lve(),Krt);break;case 68:t=32==(32&this.e)?Kwe("Nd",!1):(Lve(),tit);break;case 119:t=32==(32&this.e)?Kwe("IsWord",!0):(Lve(),uit);break;case 87:t=32==(32&this.e)?Kwe("IsWord",!1):(Lve(),rit);break;case 115:t=32==(32&this.e)?Kwe("IsSpace",!0):(Lve(),ait);break;case 83:t=32==(32&this.e)?Kwe("IsSpace",!1):(Lve(),nit);break;default:throw Jb(new sv(hLe+e.toString(16)))}return t},$ve.ql=function(e){var t,n,r,i,a,o,s,c,l,u,f;for(this.b=1,Tve(this),t=null,0==this.c&&94==this.a?(Tve(this),e?(Lve(),Lve(),l=new VG(5)):(Lve(),Lve(),Ahe(t=new VG(4),0,fLe),l=new VG(4))):(Lve(),Lve(),l=new VG(4)),i=!0;1!=(f=this.c)&&(0!=f||93!=this.a||i);){if(i=!1,n=this.a,r=!1,10==f)switch(n){case 100:case 68:case 119:case 87:case 115:case 83:Mbe(l,this.pl(n)),r=!0;break;case 105:case 73:case 99:case 67:(n=this.Gl(l,n))<0&&(r=!0);break;case 112:case 80:if(!(u=Fce(this,n)))throw Jb(new Xv(Bve((cM(),RNe))));Mbe(l,u),r=!0;break;default:n=this.ol()}else if(20==f){if((a=IO(this.i,58,this.d))<0)throw Jb(new Xv(Bve((cM(),PNe))));if(o=!0,94==ez(this.i,this.d)&&(++this.d,o=!1),!(s=sK(OO(this.i,this.d,a),o,512==(512&this.e))))throw Jb(new Xv(Bve((cM(),DNe))));if(Mbe(l,s),r=!0,a+1>=this.j||93!=ez(this.i,a+1))throw Jb(new Xv(Bve((cM(),PNe))));this.d=a+2}if(Tve(this),!r)if(0!=this.c||45!=this.a)Ahe(l,n,n);else{if(Tve(this),1==(f=this.c))throw Jb(new Xv(Bve((cM(),LNe))));0==f&&93==this.a?(Ahe(l,n,n),Ahe(l,45,45)):(c=this.a,10==f&&(c=this.ol()),Tve(this),Ahe(l,n,c))}(this.e&uRe)==uRe&&0==this.c&&44==this.a&&Tve(this)}if(1==this.c)throw Jb(new Xv(Bve((cM(),LNe))));return t&&(Kme(t,l),l=t),kue(l),Qbe(l),this.b=0,Tve(this),l},$ve.rl=function(){var e,t,n,r;for(n=this.ql(!1);7!=(r=this.c);){if(e=this.a,(0!=r||45!=e&&38!=e)&&4!=r)throw Jb(new Xv(Bve((cM(),$Ne))));if(Tve(this),9!=this.c)throw Jb(new Xv(Bve((cM(),zNe))));if(t=this.ql(!1),4==r)Mbe(n,t);else if(45==e)Kme(n,t);else{if(38!=e)throw Jb(new sv("ASSERT"));Bme(n,t)}}return Tve(this),n},$ve.sl=function(){var e,t;return e=this.a-48,Lve(),Lve(),t=new nH(12,null,e),!this.g&&(this.g=new Rm),Cm(this.g,new Ub(e)),Tve(this),t},$ve.tl=function(){return Tve(this),Lve(),oit},$ve.ul=function(){return Tve(this),Lve(),iit},$ve.vl=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.wl=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.xl=function(){return Tve(this),function(){var e;return Lve(),bit||(e=function(e){return new nq(3,e)}(Kwe("M",!0)),e=cF(Kwe("M",!1),e),bit=e)}()},$ve.yl=function(){return Tve(this),Lve(),cit},$ve.zl=function(){return Tve(this),Lve(),fit},$ve.Al=function(){var e;if(this.d>=this.j||64!=(65504&(e=ez(this.i,this.d++))))throw Jb(new Xv(Bve((cM(),MNe))));return Tve(this),Lve(),Lve(),new sF(0,e-64)},$ve.Bl=function(){return Tve(this),function(){var e,t,n,r,i,a;if(Lve(),mit)return mit;for(Mbe(e=new VG(4),Kwe(ELe,!0)),Kme(e,Kwe("M",!0)),Kme(e,Kwe("C",!0)),a=new VG(4),r=0;r<11;r++)Ahe(a,r,r);return Mbe(t=new VG(4),Kwe("M",!0)),Ahe(t,4448,4607),Ahe(t,65438,65439),ime(i=new mM(2),e),ime(i,Qrt),(n=new mM(2)).Vl(cF(a,Kwe("L",!0))),n.Vl(t),n=new uj(i,n=new nq(3,n)),mit=n}()},$ve.Cl=function(){return Tve(this),Lve(),hit},$ve.Dl=function(){var e;return Lve(),Lve(),e=new sF(0,105),Tve(this),e},$ve.El=function(){return Tve(this),Lve(),lit},$ve.Fl=function(){return Tve(this),Lve(),sit},$ve.Gl=function(e,t){return this.ol()},$ve.Hl=function(){return Tve(this),Lve(),Jrt},$ve.Il=function(){var e,t,n,r,i;if(this.d+1>=this.j)throw Jb(new Xv(Bve((cM(),ANe))));if(r=-1,t=null,49<=(e=ez(this.i,this.d))&&e<=57){if(r=e-48,!this.g&&(this.g=new Rm),Cm(this.g,new Ub(r)),++this.d,41!=ez(this.i,this.d))throw Jb(new Xv(Bve((cM(),SNe))));++this.d}else switch(63==e&&--this.d,Tve(this),(t=fve(this)).e){case 20:case 21:case 22:case 23:break;case 8:if(7!=this.c)throw Jb(new Xv(Bve((cM(),SNe))));break;default:throw Jb(new Xv(Bve((cM(),kNe))))}if(Tve(this),n=null,2==(i=C7(this)).e){if(2!=i._l())throw Jb(new Xv(Bve((cM(),CNe))));n=i.Xl(1),i=i.Xl(0)}if(7!=this.c)throw Jb(new Xv(Bve((cM(),SNe))));return Tve(this),Lve(),Lve(),new VZ(r,t,i,n)},$ve.Jl=function(){return Tve(this),Lve(),eit},$ve.Kl=function(){var e;if(Tve(this),e=qU(24,C7(this)),7!=this.c)throw Jb(new Xv(Bve((cM(),SNe))));return Tve(this),e},$ve.Ll=function(){var e;if(Tve(this),e=qU(20,C7(this)),7!=this.c)throw Jb(new Xv(Bve((cM(),SNe))));return Tve(this),e},$ve.Ml=function(){var e;if(Tve(this),e=qU(22,C7(this)),7!=this.c)throw Jb(new Xv(Bve((cM(),SNe))));return Tve(this),e},$ve.Nl=function(){var e,t,n,r,i;for(e=0,n=0,t=-1;this.d=this.j)throw Jb(new Xv(Bve((cM(),xNe))));if(45==t){for(++this.d;this.d=this.j)throw Jb(new Xv(Bve((cM(),xNe))))}if(58==t){if(++this.d,Tve(this),r=Fj(C7(this),e,n),7!=this.c)throw Jb(new Xv(Bve((cM(),SNe))));Tve(this)}else{if(41!=t)throw Jb(new Xv(Bve((cM(),TNe))));++this.d,Tve(this),r=Fj(C7(this),e,n)}return r},$ve.Ol=function(){var e;if(Tve(this),e=qU(21,C7(this)),7!=this.c)throw Jb(new Xv(Bve((cM(),SNe))));return Tve(this),e},$ve.Pl=function(){var e;if(Tve(this),e=qU(23,C7(this)),7!=this.c)throw Jb(new Xv(Bve((cM(),SNe))));return Tve(this),e},$ve.Ql=function(){var e,t;if(Tve(this),e=this.f++,t=XU(C7(this),e),7!=this.c)throw Jb(new Xv(Bve((cM(),SNe))));return Tve(this),t},$ve.Rl=function(){var e;if(Tve(this),e=XU(C7(this),0),7!=this.c)throw Jb(new Xv(Bve((cM(),SNe))));return Tve(this),e},$ve.Sl=function(e){return Tve(this),5==this.c?(Tve(this),cF(e,(Lve(),Lve(),new nq(9,e)))):cF(e,(Lve(),Lve(),new nq(3,e)))},$ve.Tl=function(e){var t;return Tve(this),Lve(),Lve(),t=new mM(2),5==this.c?(Tve(this),ime(t,Qrt),ime(t,e)):(ime(t,e),ime(t,Qrt)),t},$ve.Ul=function(e){return Tve(this),5==this.c?(Tve(this),Lve(),Lve(),new nq(9,e)):(Lve(),Lve(),new nq(3,e))},$ve.a=0,$ve.b=0,$ve.c=0,$ve.d=0,$ve.e=0,$ve.f=1,$ve.g=null,$ve.j=0,$j(uLe,"RegEx/RegexParser",799),Vle(1796,799,{},Dw),$ve.nl=function(e){return!1},$ve.ol=function(){return nde(this)},$ve.pl=function(e){return Rpe(e)},$ve.ql=function(e){return Ave(this)},$ve.rl=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.sl=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.tl=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.ul=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.vl=function(){return Tve(this),Rpe(67)},$ve.wl=function(){return Tve(this),Rpe(73)},$ve.xl=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.yl=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.zl=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.Al=function(){return Tve(this),Rpe(99)},$ve.Bl=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.Cl=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.Dl=function(){return Tve(this),Rpe(105)},$ve.El=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.Fl=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.Gl=function(e,t){return Mbe(e,Rpe(t)),-1},$ve.Hl=function(){return Tve(this),Lve(),Lve(),new sF(0,94)},$ve.Il=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.Jl=function(){return Tve(this),Lve(),Lve(),new sF(0,36)},$ve.Kl=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.Ll=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.Ml=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.Nl=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.Ol=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.Pl=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.Ql=function(){var e;if(Tve(this),e=XU(C7(this),0),7!=this.c)throw Jb(new Xv(Bve((cM(),SNe))));return Tve(this),e},$ve.Rl=function(){throw Jb(new Xv(Bve((cM(),YNe))))},$ve.Sl=function(e){return Tve(this),cF(e,(Lve(),Lve(),new nq(3,e)))},$ve.Tl=function(e){var t;return Tve(this),Lve(),Lve(),ime(t=new mM(2),e),ime(t,Qrt),t},$ve.Ul=function(e){return Tve(this),Lve(),Lve(),new nq(3,e)};var Hrt=null,Grt=null;$j(uLe,"RegEx/ParserForXMLSchema",1796),Vle(117,1,xLe,jb),$ve.Vl=function(e){throw Jb(new sv("Not supported."))},$ve.Wl=function(){return-1},$ve.Xl=function(e){return null},$ve.Yl=function(){return null},$ve.Zl=function(e){},$ve.$l=function(e){},$ve._l=function(){return 0},$ve.Ib=function(){return this.am(0)},$ve.am=function(e){return 11==this.e?".":""},$ve.e=0;var Vrt,Wrt,qrt,Xrt,Yrt,Krt,Zrt,Qrt,Jrt,eit,tit,nit,rit,iit,ait,oit,sit,cit,lit,uit,fit,hit,dit,pit,git=null,bit=null,mit=null,wit=$j(uLe,"RegEx/Token",117);Vle(136,117,{3:1,136:1,117:1},VG),$ve.am=function(e){var t,n,r;if(4==this.e)if(this==Zrt)n=".";else if(this==Krt)n="\\d";else if(this==uit)n="\\w";else if(this==ait)n="\\s";else{for((r=new ly).a+="[",t=0;t0&&(r.a+=","),this.b[t]===this.b[t+1]?Fk(r,Vge(this.b[t])):(Fk(r,Vge(this.b[t])),r.a+="-",Fk(r,Vge(this.b[t+1])));r.a+="]",n=r.a}else if(this==tit)n="\\D";else if(this==rit)n="\\W";else if(this==nit)n="\\S";else{for((r=new ly).a+="[^",t=0;t0&&(r.a+=","),this.b[t]===this.b[t+1]?Fk(r,Vge(this.b[t])):(Fk(r,Vge(this.b[t])),r.a+="-",Fk(r,Vge(this.b[t+1])));r.a+="]",n=r.a}return n},$ve.a=!1,$ve.c=!1,$j(uLe,"RegEx/RangeToken",136),Vle(575,1,{575:1},Ub),$ve.a=0,$j(uLe,"RegEx/RegexParser/ReferencePosition",575),Vle(574,1,{3:1,574:1},JE),$ve.Fb=function(e){var t;return null!=e&&!!RM(e,574)&&(t=xL(e,574),eP(this.b,t.b)&&this.a==t.a)},$ve.Hb=function(){return vte(this.b+"/"+Yfe(this.a))},$ve.Ib=function(){return this.c.am(this.a)},$ve.a=0,$j(uLe,"RegEx/RegularExpression",574),Vle(221,117,xLe,sF),$ve.Wl=function(){return this.a},$ve.am=function(e){var t,n;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:n="\\"+rR(this.a&pEe);break;case 12:n="\\f";break;case 10:n="\\n";break;case 13:n="\\r";break;case 9:n="\\t";break;case 27:n="\\e";break;default:n=this.a>=i_e?"\\v"+OO(t="0"+(this.a>>>0).toString(16),t.length-6,t.length):""+rR(this.a&pEe)}break;case 8:n=this==Jrt||this==eit?""+rR(this.a&pEe):"\\"+rR(this.a&pEe);break;default:n=null}return n},$ve.a=0,$j(uLe,"RegEx/Token/CharToken",221),Vle(307,117,xLe,nq),$ve.Xl=function(e){return this.a},$ve.Zl=function(e){this.b=e},$ve.$l=function(e){this.c=e},$ve._l=function(){return 1},$ve.am=function(e){var t;if(3==this.e)if(this.c<0&&this.b<0)t=this.a.am(e)+"*";else if(this.c==this.b)t=this.a.am(e)+"{"+this.c+"}";else if(this.c>=0&&this.b>=0)t=this.a.am(e)+"{"+this.c+","+this.b+"}";else{if(!(this.c>=0&&this.b<0))throw Jb(new sv("Token#toString(): CLOSURE "+this.c+rye+this.b));t=this.a.am(e)+"{"+this.c+",}"}else if(this.c<0&&this.b<0)t=this.a.am(e)+"*?";else if(this.c==this.b)t=this.a.am(e)+"{"+this.c+"}?";else if(this.c>=0&&this.b>=0)t=this.a.am(e)+"{"+this.c+","+this.b+"}?";else{if(!(this.c>=0&&this.b<0))throw Jb(new sv("Token#toString(): NONGREEDYCLOSURE "+this.c+rye+this.b));t=this.a.am(e)+"{"+this.c+",}?"}return t},$ve.b=0,$ve.c=0,$j(uLe,"RegEx/Token/ClosureToken",307),Vle(800,117,xLe,uj),$ve.Xl=function(e){return 0==e?this.a:this.b},$ve._l=function(){return 2},$ve.am=function(e){return 3==this.b.e&&this.b.Xl(0)==this.a?this.a.am(e)+"+":9==this.b.e&&this.b.Xl(0)==this.a?this.a.am(e)+"+?":this.a.am(e)+""+this.b.am(e)},$j(uLe,"RegEx/Token/ConcatToken",800),Vle(1794,117,xLe,VZ),$ve.Xl=function(e){if(0==e)return this.d;if(1==e)return this.b;throw Jb(new sv("Internal Error: "+e))},$ve._l=function(){return this.b?2:1},$ve.am=function(e){var t;return t=this.c>0?"(?("+this.c+")":8==this.a.e?"(?("+this.a+")":"(?"+this.a,this.b?t+=this.d+"|"+this.b+")":t+=this.d+")",t},$ve.c=0,$j(uLe,"RegEx/Token/ConditionToken",1794),Vle(1795,117,xLe,WG),$ve.Xl=function(e){return this.b},$ve._l=function(){return 1},$ve.am=function(e){return"(?"+(0==this.a?"":Yfe(this.a))+(0==this.c?"":Yfe(this.c))+":"+this.b.am(e)+")"},$ve.a=0,$ve.c=0,$j(uLe,"RegEx/Token/ModifierToken",1795),Vle(801,117,xLe,wB),$ve.Xl=function(e){return this.a},$ve._l=function(){return 1},$ve.am=function(e){var t;switch(t=null,this.e){case 6:t=0==this.b?"(?:"+this.a.am(e)+")":"("+this.a.am(e)+")";break;case 20:t="(?="+this.a.am(e)+")";break;case 21:t="(?!"+this.a.am(e)+")";break;case 22:t="(?<="+this.a.am(e)+")";break;case 23:t="(?"+this.a.am(e)+")"}return t},$ve.b=0,$j(uLe,"RegEx/Token/ParenToken",801),Vle(514,117,{3:1,117:1,514:1},nH),$ve.Yl=function(){return this.b},$ve.am=function(e){return 12==this.e?"\\"+this.a:function(e){var t,n,r,i;for(i=e.length,t=null,r=0;r=0?(t||(t=new uy,r>0&&Fk(t,e.substr(0,r))),t.a+="\\",Vj(t,n&pEe)):t&&Vj(t,n&pEe);return t?t.a:e}(this.b)},$ve.a=0,$j(uLe,"RegEx/Token/StringToken",514),Vle(459,117,xLe,mM),$ve.Vl=function(e){ime(this,e)},$ve.Xl=function(e){return xL(AB(this.a,e),117)},$ve._l=function(){return this.a?this.a.a.c.length:0},$ve.am=function(e){var t,n,r,i,a;if(1==this.e){if(2==this.a.a.c.length)t=xL(AB(this.a,0),117),i=3==(n=xL(AB(this.a,1),117)).e&&n.Xl(0)==t?t.am(e)+"+":9==n.e&&n.Xl(0)==t?t.am(e)+"+?":t.am(e)+""+n.am(e);else{for(a=new ly,r=0;r=e.c.b:e.a<=e.c.b))throw Jb(new mm);return t=e.a,e.a+=e.c.c,++e.b,G6(t)}(this)},$ve.Ub=function(){return function(e){if(e.b<=0)throw Jb(new mm);return--e.b,e.a-=e.c.c,G6(e.a)}(this)},$ve.Wb=function(e){xL(e,20),function(){throw Jb(new Fv(MLe))}()},$ve.Ob=function(){return this.c.c<0?this.a>=this.c.b:this.a<=this.c.b},$ve.Sb=function(){return this.b>0},$ve.Tb=function(){return this.b},$ve.Vb=function(){return this.b-1},$ve.Qb=function(){throw Jb(new Fv(ILe))},$ve.a=0,$ve.b=0,$j(kLe,"ExclusiveRange/RangeIterator",253);var vit,yit=YB(ORe,"C"),Eit=YB(PRe,"I"),_it=YB(Yve,"Z"),Sit=YB(LRe,"J"),xit=YB(IRe,"B"),Tit=YB(NRe,"D"),Ait=YB(RRe,"F"),kit=YB(DRe,"S"),Cit=TD("org.eclipse.elk.core.labels","ILabelManager"),Mit=TD(VOe,"DiagnosticChain"),Iit=TD(gPe,"ResourceSet"),Oit=$j(VOe,"InvocationTargetException",null),Nit=(Ry(),function(e){return Ry(),function(){return function(e,t,n){var i;i=function(){var e;return 0!=lDe&&(e=Date.now?Date.now():(new Date).getTime())-uDe>2e3&&(uDe=e,fDe=r.setTimeout(LS,10)),0==lDe++&&(function(e){var t,n;if(e.a){n=null;do{t=e.a,e.a=null,n=ese(t,n)}while(e.a);e.a=n}}((hv(),aDe)),!0)}();try{return function(e,t,n){return e.apply(t,n)}(e,t,n)}finally{!function(e){e&&function(e){var t,n;if(e.b){n=null;do{t=e.b,e.b=null,n=ese(t,n)}while(e.b);e.b=n}}((hv(),aDe)),--lDe,e&&-1!=fDe&&(function(e){r.clearTimeout(e)}(fDe),fDe=-1)}(i)}}(e,this,arguments)}}),Rit=Rit=function(e,t,n,r){T_();var i=Gve;function a(){for(var e=0;e{"use strict";var r=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=Object.assign({},e),i=!1;try{i=!0}catch(e){}if(e.workerUrl)if(i){var a=n(9841);r.workerFactory=function(e){return new a(e)}}else console.warn("Web worker requested but 'web-worker' package not installed. \nConsider installing the package or pass your own 'workerFactory' to ELK's constructor.\n... Falling back to non-web worker version.");if(!r.workerFactory){var o=n(1771).Worker;r.workerFactory=function(e){return new o(e)}}return function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,r))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(n(6799).default);Object.defineProperty(e.exports,"__esModule",{value:!0}),e.exports=r,r.default=r},9693:(e,t,n)=>{var r;!function(){"use strict";var i=!("undefined"==typeof window||!window.document||!window.document.createElement),a={canUseDOM:i,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:i&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:i&&!!window.screen};void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},9769:e=>{e.exports=function(e){return[...e].reduce(((e,[t,n])=>(e[t]=n,e)),{})}},7618:e=>{"use strict";e.exports=function(e,n){for(var r,i,a,o=e||"",s=n||"div",c={},l=0;l{"use strict";var r=n(9286),i=n(4202),a=n(7618),o=n(4426).q,s=n(1813).q;e.exports=function(e,t,n){var i=n?function(e){for(var t,n=e.length,r=-1,i={};++r{"use strict";var r=n(4236),i=n(3690)(r,"div");i.displayName="html",e.exports=i},3116:(e,t,n)=>{"use strict";e.exports=n(7755)},2396:(e,t,n)=>{"use strict";var r=n(261),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 c(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 l=Object.defineProperty,u=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var i=d(n);i&&i!==p&&e(t,i,r)}var o=u(n);f&&(o=o.concat(f(n)));for(var s=c(t),g=c(n),b=0;b{"use strict";e.exports=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}},1904:(e,t,n)=>{"use strict";var r=n(2212),i=n(9713);e.exports=function(e){return r(e)||i(e)}},9713:e=>{"use strict";e.exports=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=48&&t<=57}},4933:e=>{"use strict";e.exports=function(e){var t="string"==typeof e?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}},5368:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},1977:e=>{"use strict";for(var t=function(e){return null!==e&&!Array.isArray(e)&&"object"==typeof e},n={3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"},r=0;r<24;r+=1)n[112+r]="F"+(r+1);for(var i=0;i<26;i+=1){var a=i+65;n[a]=[String.fromCharCode(a+32),String.fromCharCode(a)]}var o={codes:n,getCode:function(e){return t(e)?e.keyCode||e.which||this[e.key]:this[e]},getKey:function(e){var r=t(e);if(r&&e.key)return e.key;var i=n[r?e.keyCode||e.which:e];return Array.isArray(i)&&(i=r?i[e.shiftKey?1:0]:i[0]),i},Cancel:3,Help:6,Backspace:8,Tab:9,Clear:12,Enter:13,Shift:16,Control:17,Alt:18,Pause:19,CapsLock:20,Escape:27,Convert:28,NonConvert:29,Accept:30,ModeChange:31," ":32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Select:41,Print:42,Execute:43,PrintScreen:44,Insert:45,Delete:46,0:48,")":48,1:49,"!":49,2:50,"@":50,3:51,"#":51,4:52,$:52,5:53,"%":53,6:54,"^":54,7:55,"&":55,8:56,"*":56,9:57,"(":57,a:65,A:65,b:66,B:66,c:67,C:67,d:68,D:68,e:69,E:69,f:70,F:70,g:71,G:71,h:72,H:72,i:73,I:73,j:74,J:74,k:75,K:75,l:76,L:76,m:77,M:77,n:78,N:78,o:79,O:79,p:80,P:80,q:81,Q:81,r:82,R:82,s:83,S:83,t:84,T:84,u:85,U:85,v:86,V:86,w:87,W:87,x:88,X:88,y:89,Y:89,z:90,Z:90,OS:91,ContextMenu:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,F20:131,F21:132,F22:133,F23:134,F24:135,NumLock:144,ScrollLock:145,VolumeMute:181,VolumeDown:182,VolumeUp:183,";":186,":":186,"=":187,"+":187,",":188,"<":188,"-":189,_:189,".":190,">":190,"/":191,"?":191,"`":192,"~":192,"[":219,"{":219,"\\":220,"|":220,"]":221,"}":221,"'":222,'"':222,Meta:224,AltGraph:225,Attn:246,CrSel:247,ExSel:248,EraseEof:249,Play:250,ZoomOut:251};o.Spacebar=o[" "],o.Digit0=o[0],o.Digit1=o[1],o.Digit2=o[2],o.Digit3=o[3],o.Digit4=o[4],o.Digit5=o[5],o.Digit6=o[6],o.Digit7=o[7],o.Digit8=o[8],o.Digit9=o[9],o.Tilde=o["~"],o.GraveAccent=o["`"],o.ExclamationPoint=o["!"],o.AtSign=o["@"],o.PoundSign=o["#"],o.PercentSign=o["%"],o.Caret=o["^"],o.Ampersand=o["&"],o.PlusSign=o["+"],o.MinusSign=o["-"],o.EqualsSign=o["="],o.DivisionSign=o["/"],o.MultiplicationSign=o["*"],o.Comma=o[","],o.Decimal=o["."],o.Colon=o[":"],o.Semicolon=o[";"],o.Pipe=o["|"],o.BackSlash=o["\\"],o.QuestionMark=o["?"],o.SingleQuote=o["'"],o.DoubleQuote=o['"'],o.LeftCurlyBrace=o["{"],o.RightCurlyBrace=o["}"],o.LeftParenthesis=o["("],o.RightParenthesis=o[")"],o.LeftAngleBracket=o["<"],o.RightAngleBracket=o[">"],o.LeftSquareBracket=o["["],o.RightSquareBracket=o["]"],e.exports=o},5975:e=>{e.exports=function(e){!function(e){if(!e)throw new Error("Eventify cannot use falsy object as events subject");for(var t=["on","fire","off"],n=0;n1&&(r=Array.prototype.splice.call(arguments,1));for(var a=0;a{e.exports=function(e,t){if(!e)throw new Error("Graph structure cannot be undefined");var a=(t&&t.createSimulator||n(613))(t);if(Array.isArray(t))throw new Error("Physics settings is expected to be an object");var o=e.version>19?function(t){var n=e.getLinks(t);return n?1+n.size/3:1}:function(t){var n=e.getLinks(t);return n?1+n.length/3:1};t&&"function"==typeof t.nodeMass&&(o=t.nodeMass);var s=new Map,c={},l=0,u=a.settings.springTransform||i;l=0,e.forEachNode((function(e){b(e.id),l+=1})),e.forEachLink(m),e.on("changed",g);var f=!1,h={step:function(){if(0===l)return d(!0),!0;var e=a.step();h.lastMove=e,h.fire("step");var t=e/l<=.01;return d(t),t},getNodePosition:function(e){return y(e).pos},setNodePosition:function(e){var t=y(e);t.setPosition.apply(t,Array.prototype.slice.call(arguments,1))},getLinkPosition:function(e){var t=c[e];if(t)return{from:t.from.pos,to:t.to.pos}},getGraphRect:function(){return a.getBBox()},forEachBody:p,pinNode:function(e,t){y(e.id).isPinned=!!t},isNodePinned:function(e){return y(e.id).isPinned},dispose:function(){e.off("changed",g),h.fire("disposed")},getBody:function(e){return s.get(e)},getSpring:function(t,n){var r;if(void 0===n)r="object"!=typeof t?t:t.id;else{var i=e.hasLink(t,n);if(!i)return;r=i.id}return c[r]},getForceVectorLength:function(){var e=0,t=0;return p((function(n){e+=Math.abs(n.force.x),t+=Math.abs(n.force.y)})),Math.sqrt(e*e+t*t)},simulator:a,graph:e,lastMove:0};return r(h),h;function d(e){var t;f!==e&&(f=e,t=e,h.fire("stable",t))}function p(e){s.forEach(e)}function g(t){for(var n=0;n{const r=n(5987);e.exports=function(e){return function(t,n){let i=n&&n.indent||0,a=n&&void 0!==n.join?n.join:"\n",o=Array(i+1).join(" "),s=[];for(let n=0;n{e.exports=function(e){let t=i(e);return new Function("bodies","settings","random",t)},e.exports.generateFunctionBody=i;const r=n(3103);function i(e){let t=r(e);return`\n var boundingBox = {\n ${t("min_{var}: 0, max_{var}: 0,",{indent:4})}\n };\n\n return {\n box: boundingBox,\n\n update: updateBoundingBox,\n\n reset: resetBoundingBox,\n\n getBestNewPosition: function (neighbors) {\n var ${t("base_{var} = 0",{join:", "})};\n\n if (neighbors.length) {\n for (var i = 0; i < neighbors.length; ++i) {\n let neighborPos = neighbors[i].pos;\n ${t("base_{var} += neighborPos.{var};",{indent:10})}\n }\n\n ${t("base_{var} /= neighbors.length;",{indent:8})}\n } else {\n ${t("base_{var} = (boundingBox.min_{var} + boundingBox.max_{var}) / 2;",{indent:8})}\n }\n\n var springLength = settings.springLength;\n return {\n ${t("{var}: base_{var} + (random.nextDouble() - 0.5) * springLength,",{indent:8})}\n };\n }\n };\n\n function updateBoundingBox() {\n var i = bodies.length;\n if (i === 0) return; // No bodies - no borders.\n\n ${t("var max_{var} = -Infinity;",{indent:4})}\n ${t("var min_{var} = Infinity;",{indent:4})}\n\n while(i--) {\n // this is O(n), it could be done faster with quadtree, if we check the root node bounds\n var bodyPos = bodies[i].pos;\n ${t("if (bodyPos.{var} < min_{var}) min_{var} = bodyPos.{var};",{indent:6})}\n ${t("if (bodyPos.{var} > max_{var}) max_{var} = bodyPos.{var};",{indent:6})}\n }\n\n ${t("boundingBox.min_{var} = min_{var};",{indent:4})}\n ${t("boundingBox.max_{var} = max_{var};",{indent:4})}\n }\n\n function resetBoundingBox() {\n ${t("boundingBox.min_{var} = boundingBox.max_{var} = 0;",{indent:4})}\n }\n`}},81:(e,t,n)=>{const r=n(3103);function i(e,t){return`\n${o(e,t)}\n${a(e)}\nreturn {Body: Body, Vector: Vector};\n`}function a(e){let t=r(e),n=t("{var}",{join:", "});return`\nfunction Body(${n}) {\n this.isPinned = false;\n this.pos = new Vector(${n});\n this.force = new Vector();\n this.velocity = new Vector();\n this.mass = 1;\n\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.reset = function() {\n this.force.reset();\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.setPosition = function (${n}) {\n ${t("this.pos.{var} = {var} || 0;",{indent:2})}\n};`}function o(e,t){let n=r(e),i="";return t&&(i=`${n("\n var v{var};\nObject.defineProperty(this, '{var}', {\n set: function(v) { \n if (!Number.isFinite(v)) throw new Error('Cannot set non-numbers to {var}');\n v{var} = v; \n },\n get: function() { return v{var}; }\n});")}`),`function Vector(${n("{var}",{join:", "})}) {\n ${i}\n if (typeof arguments[0] === 'object') {\n // could be another vector\n let v = arguments[0];\n ${n('if (!Number.isFinite(v.{var})) throw new Error("Expected value is not a finite number at Vector constructor ({var})");',{indent:4})}\n ${n("this.{var} = v.{var};",{indent:4})}\n } else {\n ${n('this.{var} = typeof {var} === "number" ? {var} : 0;',{indent:4})}\n }\n }\n \n Vector.prototype.reset = function () {\n ${n("this.{var} = ",{join:""})}0;\n };`}e.exports=function(e,t){let n=i(e,t),{Body:r}=new Function(n)();return r},e.exports.generateCreateBodyFunctionBody=i,e.exports.getVectorCode=o,e.exports.getBodyCode=a},5788:(e,t,n)=>{const r=n(3103);function i(e){return`\n if (!Number.isFinite(options.dragCoefficient)) throw new Error('dragCoefficient is not a finite number');\n\n return {\n update: function(body) {\n ${r(e)("body.force.{var} -= options.dragCoefficient * body.velocity.{var};",{indent:6})}\n }\n };\n`}e.exports=function(e){let t=i(e);return new Function("options",t)},e.exports.generateCreateDragForceFunctionBody=i},1325:(e,t,n)=>{const r=n(3103);function i(e){let t=r(e);return`\n if (!Number.isFinite(options.springCoefficient)) throw new Error('Spring coefficient is not a number');\n if (!Number.isFinite(options.springLength)) throw new Error('Spring length is not a number');\n\n return {\n /**\n * Updates forces acting on a spring\n */\n update: function (spring) {\n var body1 = spring.from;\n var body2 = spring.to;\n var length = spring.length < 0 ? options.springLength : spring.length;\n ${t("var d{var} = body2.pos.{var} - body1.pos.{var};",{indent:6})}\n var r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n\n if (r === 0) {\n ${t("d{var} = (random.nextDouble() - 0.5) / 50;",{indent:8})}\n r = Math.sqrt(${t("d{var} * d{var}",{join:" + "})});\n }\n\n var d = r - length;\n var coefficient = ((spring.coefficient > 0) ? spring.coefficient : options.springCoefficient) * d / r;\n\n ${t("body1.force.{var} += coefficient * d{var}",{indent:6})};\n body1.springCount += 1;\n body1.springLength += r;\n\n ${t("body2.force.{var} -= coefficient * d{var}",{indent:6})};\n body2.springCount += 1;\n body2.springLength += r;\n }\n };\n`}e.exports=function(e){let t=i(e);return new Function("options","random",t)},e.exports.generateCreateSpringForceFunctionBody=i},680:(e,t,n)=>{const r=n(3103);function i(e){let t=r(e);return`\n var length = bodies.length;\n if (length === 0) return 0;\n\n ${t("var d{var} = 0, t{var} = 0;",{indent:2})}\n\n for (var i = 0; i < length; ++i) {\n var body = bodies[i];\n if (body.isPinned) continue;\n\n if (adaptiveTimeStepWeight && body.springCount) {\n timeStep = (adaptiveTimeStepWeight * body.springLength/body.springCount);\n }\n\n var coeff = timeStep / body.mass;\n\n ${t("body.velocity.{var} += coeff * body.force.{var};",{indent:4})}\n ${t("var v{var} = body.velocity.{var};",{indent:4})}\n var v = Math.sqrt(${t("v{var} * v{var}",{join:" + "})});\n\n if (v > 1) {\n // We normalize it so that we move within timeStep range. \n // for the case when v <= 1 - we let velocity to fade out.\n ${t("body.velocity.{var} = v{var} / v;",{indent:6})}\n }\n\n ${t("d{var} = timeStep * body.velocity.{var};",{indent:4})}\n\n ${t("body.pos.{var} += d{var};",{indent:4})}\n\n ${t("t{var} += Math.abs(d{var});",{indent:4})}\n }\n\n return (${t("t{var} * t{var}",{join:" + "})})/length;\n`}e.exports=function(e){let t=i(e);return new Function("bodies","timeStep","adaptiveTimeStepWeight",t)},e.exports.generateIntegratorFunctionBody=i},934:(e,t,n)=>{const r=n(3103),i=n(5987);function a(e){let t=r(e),n=Math.pow(2,e);return`\n\n/**\n * Our implementation of QuadTree is non-recursive to avoid GC hit\n * This data structure represent stack of elements\n * which we are trying to insert into quad tree.\n */\nfunction InsertStack () {\n this.stack = [];\n this.popIdx = 0;\n}\n\nInsertStack.prototype = {\n isEmpty: function() {\n return this.popIdx === 0;\n },\n push: function (node, body) {\n var item = this.stack[this.popIdx];\n if (!item) {\n // we are trying to avoid memory pressure: create new element\n // only when absolutely necessary\n this.stack[this.popIdx] = new InsertStackElement(node, body);\n } else {\n item.node = node;\n item.body = body;\n }\n ++this.popIdx;\n },\n pop: function () {\n if (this.popIdx > 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n\n${l(e)}\n${o(e)}\n${c(e)}\n${s(e)}\n\nfunction createQuadTree(options, random) {\n options = options || {};\n options.gravity = typeof options.gravity === 'number' ? options.gravity : -1;\n options.theta = typeof options.theta === 'number' ? options.theta : 0.8;\n\n var gravity = options.gravity;\n var updateQueue = [];\n var insertStack = new InsertStack();\n var theta = options.theta;\n\n var nodesCache = [];\n var currentInCache = 0;\n var root = newNode();\n\n return {\n insertBodies: insertBodies,\n\n /**\n * Gets root node if it is present\n */\n getRoot: function() {\n return root;\n },\n\n updateBodyForce: update,\n\n options: function(newOptions) {\n if (newOptions) {\n if (typeof newOptions.gravity === 'number') {\n gravity = newOptions.gravity;\n }\n if (typeof newOptions.theta === 'number') {\n theta = newOptions.theta;\n }\n\n return this;\n }\n\n return {\n gravity: gravity,\n theta: theta\n };\n }\n };\n\n function newNode() {\n // To avoid pressure on GC we reuse nodes.\n var node = nodesCache[currentInCache];\n if (node) {\n${function(e){let t=[];for(let e=0;e {var}max) {var}max = pos.{var};",{indent:6})}\n }\n\n // Makes the bounds square.\n var maxSideLength = -Infinity;\n ${t("if ({var}max - {var}min > maxSideLength) maxSideLength = {var}max - {var}min ;",{indent:4})}\n\n currentInCache = 0;\n root = newNode();\n ${t("root.min_{var} = {var}min;",{indent:4})}\n ${t("root.max_{var} = {var}min + maxSideLength;",{indent:4})}\n\n i = bodies.length - 1;\n if (i >= 0) {\n root.body = bodies[i];\n }\n while (i--) {\n insert(bodies[i], root);\n }\n }\n\n function insert(newBody) {\n insertStack.reset();\n insertStack.push(root, newBody);\n\n while (!insertStack.isEmpty()) {\n var stackItem = insertStack.pop();\n var node = stackItem.node;\n var body = stackItem.body;\n\n if (!node.body) {\n // This is internal node. Update the total mass of the node and center-of-mass.\n ${t("var {var} = body.pos.{var};",{indent:8})}\n node.mass += body.mass;\n ${t("node.mass_{var} += body.mass * {var};",{indent:8})}\n\n // Recursively insert the body in the appropriate quadrant.\n // But first find the appropriate quadrant.\n var quadIdx = 0; // Assume we are in the 0's quad.\n ${t("var min_{var} = node.min_{var};",{indent:8})}\n ${t("var max_{var} = (min_{var} + node.max_{var}) / 2;",{indent:8})}\n\n${function(t){let n=[],r=Array(9).join(" ");for(let t=0;t max_${i(t)}) {`),n.push(r+` quadIdx = quadIdx + ${Math.pow(2,t)};`),n.push(r+` min_${i(t)} = max_${i(t)};`),n.push(r+` max_${i(t)} = node.max_${i(t)};`),n.push(r+"}");return n.join("\n")}()}\n\n var child = getChild(node, quadIdx);\n\n if (!child) {\n // The node is internal but this quadrant is not taken. Add\n // subnode to it.\n child = newNode();\n ${t("child.min_{var} = min_{var};",{indent:10})}\n ${t("child.max_{var} = max_{var};",{indent:10})}\n child.body = body;\n\n setChild(node, quadIdx, child);\n } else {\n // continue searching in this quadrant.\n insertStack.push(child, body);\n }\n } else {\n // We are trying to add to the leaf node.\n // We have to convert current leaf into internal node\n // and continue adding two nodes.\n var oldBody = node.body;\n node.body = null; // internal nodes do not cary bodies\n\n if (isSamePosition(oldBody.pos, body.pos)) {\n // Prevent infinite subdivision by bumping one node\n // anywhere in this quadrant\n var retriesCount = 3;\n do {\n var offset = random.nextDouble();\n ${t("var d{var} = (node.max_{var} - node.min_{var}) * offset;",{indent:12})}\n\n ${t("oldBody.pos.{var} = node.min_{var} + d{var};",{indent:12})}\n retriesCount -= 1;\n // Make sure we don't bump it out of the box. If we do, next iteration should fix it\n } while (retriesCount > 0 && isSamePosition(oldBody.pos, body.pos));\n\n if (retriesCount === 0 && isSamePosition(oldBody.pos, body.pos)) {\n // This is very bad, we ran out of precision.\n // if we do not return from the method we'll get into\n // infinite loop here. So we sacrifice correctness of layout, and keep the app running\n // Next layout iteration should get larger bounding box in the first step and fix this\n return;\n }\n }\n // Next iteration should subdivide node further.\n insertStack.push(node, oldBody);\n insertStack.push(node, body);\n }\n }\n }\n}\nreturn createQuadTree;\n\n`}function o(e){let t=r(e);return`\n function isSamePosition(point1, point2) {\n ${t("var d{var} = Math.abs(point1.{var} - point2.{var});",{indent:2})}\n \n return ${t("d{var} < 1e-8",{join:" && "})};\n } \n`}function s(e){var t=Math.pow(2,e);return`\nfunction setChild(node, idx, child) {\n ${function(){let e=[];for(let n=0;n 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n"}e.exports=function(e){let t=a(e);return new Function(t)()},e.exports.generateQuadTreeFunctionBody=a,e.exports.getInsertStackCode=u,e.exports.getQuadNodeCode=l,e.exports.isSamePosition=o,e.exports.getChildBodyCode=c,e.exports.setChildBodyCode=s},5987:e=>{e.exports=function(e){return 0===e?"x":1===e?"y":2===e?"z":"c"+(e+1)}},613:(e,t,n)=>{e.exports=function(e){var t=n(2074),f=n(2475),h=n(5975);if(e){if(void 0!==e.springCoeff)throw new Error("springCoeff was renamed to springCoefficient");if(void 0!==e.dragCoeff)throw new Error("dragCoeff was renamed to dragCoefficient")}e=f(e,{springLength:10,springCoefficient:.8,gravity:-12,theta:.8,dragCoefficient:.9,timeStep:.5,adaptiveTimeStepWeight:0,dimensions:2,debug:!1});var d=l[e.dimensions];if(!d){var p=e.dimensions;d={Body:r(p,e.debug),createQuadTree:i(p),createBounds:a(p),createDragForce:o(p),createSpringForce:s(p),integrate:c(p)},l[p]=d}var g=d.Body,b=d.createQuadTree,m=d.createBounds,w=d.createDragForce,v=d.createSpringForce,y=d.integrate,E=n(4374).random(42),_=[],S=[],x=b(e,E),T=m(_,e,E),A=v(e,E),k=w(e),C=[],M=new Map,I=0;R("nbody",(function(){if(0!==_.length){x.insertBodies(_);for(var e=_.length;e--;){var t=_[e];t.isPinned||(t.reset(),x.updateBodyForce(t),k.update(t))}}})),R("spring",(function(){for(var e=S.length;e--;)A.update(S[e])}));var O={bodies:_,quadTree:x,springs:S,settings:e,addForce:R,removeForce:function(e){var t=C.indexOf(M.get(e));t<0||(C.splice(t,1),M.delete(e))},getForces:function(){return M},step:function(){for(var t=0;tnew g(e))(e);return _.push(t),t},removeBody:function(e){if(e){var t=_.indexOf(e);if(!(t<0))return _.splice(t,1),0===_.length&&T.reset(),!0}},addSpring:function(e,n,r,i){if(!e||!n)throw new Error("Cannot add null spring to force simulator");"number"!=typeof r&&(r=-1);var a=new t(e,n,r,i>=0?i:-1);return S.push(a),a},getTotalMovement:function(){return 0},removeSpring:function(e){if(e){var t=S.indexOf(e);return t>-1?(S.splice(t,1),!0):void 0}},getBestNewBodyPosition:function(e){return T.getBestNewPosition(e)},getBBox:N,getBoundingBox:N,invalidateBBox:function(){console.warn("invalidateBBox() is deprecated, bounds always recomputed on `getBBox()` call")},gravity:function(t){return void 0!==t?(e.gravity=t,x.options({gravity:t}),this):e.gravity},theta:function(t){return void 0!==t?(e.theta=t,x.options({theta:t}),this):e.theta},random:E};return function(e,t){for(var n in e)u(e,t,n)}(e,O),h(O),O;function N(){return T.update(),T.box}function R(e,t){if(M.has(e))throw new Error("Force "+e+" is already added");M.set(e,t),C.push(t)}};var r=n(81),i=n(934),a=n(3599),o=n(5788),s=n(1325),c=n(680),l={};function u(e,t,n){if(e.hasOwnProperty(n)&&"function"!=typeof t[n]){var r=Number.isFinite(e[n]);t[n]=r?function(r){if(void 0!==r){if(!Number.isFinite(r))throw new Error("Value of "+n+" should be a valid number.");return e[n]=r,t}return e[n]}:function(r){return void 0!==r?(e[n]=r,t):e[n]}}}},2074:e=>{e.exports=function(e,t,n,r){this.from=e,this.to=t,this.length=n,this.coefficient=r}},851:(e,t,n)=>{e.exports=function(e){if("uniqueLinkId"in(e=e||{})&&(console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n","\n","Note: there is also change in default behavior: From now on each graph\nis considered to be not a multigraph by default (each edge is unique)."),e.multigraph=e.uniqueLinkId),void 0===e.multigraph&&(e.multigraph=!1),"function"!=typeof Map)throw new Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");var t,n=new Map,c=new Map,l={},u=0,f=e.multigraph?function(e,t,n){var r=s(e,t),i=l.hasOwnProperty(r);if(i||A(e,t)){i||(l[r]=0);var a="@"+ ++l[r];r=s(e+a,t+a)}return new o(e,t,n,r)}:function(e,t,n){var r=s(e,t),i=c.get(r);return i?(i.data=n,i):new o(e,t,n,r)},h=[],d=k,p=k,g=k,b=k,m={version:20,addNode:y,addLink:function(e,t,n){g();var r=E(e)||y(e),i=E(t)||y(t),o=f(e,t,n),s=c.has(o.id);return c.set(o.id,o),a(r,o),e!==t&&a(i,o),d(o,s?"update":"add"),b(),o},removeLink:function(e,t){return void 0!==t&&(e=A(e,t)),T(e)},removeNode:_,getNode:E,getNodeCount:S,getLinkCount:x,getEdgeCount:x,getLinksCount:x,getNodesCount:S,getLinks:function(e){var t=E(e);return t?t.links:null},forEachNode:I,forEachLinkedNode:function(e,t,r){var i=E(e);if(i&&i.links&&"function"==typeof t)return r?function(e,t,r){for(var i=e.values(),a=i.next();!a.done;){var o=a.value;if(o.fromId===t&&r(n.get(o.toId),o))return!0;a=i.next()}}(i.links,e,t):function(e,t,r){for(var i=e.values(),a=i.next();!a.done;){var o=a.value,s=o.fromId===t?o.toId:o.fromId;if(r(n.get(s),o))return!0;a=i.next()}}(i.links,e,t)},forEachLink:function(e){if("function"==typeof e)for(var t=c.values(),n=t.next();!n.done;){if(e(n.value))return!0;n=t.next()}},beginUpdate:g,endUpdate:b,clear:function(){g(),I((function(e){_(e.id)})),b()},hasLink:A,hasNode:E,getLink:A};return r(m),t=m.on,m.on=function(){return m.beginUpdate=g=C,m.endUpdate=b=M,d=w,p=v,m.on=t,t.apply(m,arguments)},m;function w(e,t){h.push({link:e,changeType:t})}function v(e,t){h.push({node:e,changeType:t})}function y(e,t){if(void 0===e)throw new Error("Invalid node identifier");g();var r=E(e);return r?(r.data=t,p(r,"update")):(r=new i(e,t),p(r,"add")),n.set(e,r),b(),r}function E(e){return n.get(e)}function _(e){var t=E(e);if(!t)return!1;g();var r=t.links;return r&&(r.forEach(T),t.links=null),n.delete(e),p(t,"remove"),b(),!0}function S(){return n.size}function x(){return c.size}function T(e){if(!e)return!1;if(!c.get(e.id))return!1;g(),c.delete(e.id);var t=E(e.fromId),n=E(e.toId);return t&&t.links.delete(e),n&&n.links.delete(e),d(e,"remove"),b(),!0}function A(e,t){if(void 0!==e&&void 0!==t)return c.get(s(e,t))}function k(){}function C(){u+=1}function M(){0==(u-=1)&&h.length>0&&(m.fire("changed",h),h.length=0)}function I(e){if("function"!=typeof e)throw new Error("Function is expected to iterate over graph nodes. You passed "+e);for(var t=n.values(),r=t.next();!r.done;){if(e(r.value))return!0;r=t.next()}}};var r=n(5975);function i(e,t){this.id=e,this.links=null,this.data=t}function a(e,t){e.links?e.links.add(t):e.links=new Set([t])}function o(e,t,n,r){this.fromId=e,this.toId=t,this.data=n,this.id=r}function s(e,t){return e.toString()+"👉 "+t.toString()}},2475:e=>{e.exports=function e(t,n){var r;if(t||(t={}),n)for(r in n)if(n.hasOwnProperty(r)){var i=t.hasOwnProperty(r),a=typeof n[r];i&&typeof t[r]===a?"object"===a&&(t[r]=e(t[r],n[r])):t[r]=n[r]}return t}},4374:e=>{function t(e){return new n("number"==typeof e?e:+new Date)}function n(e){this.seed=e}function r(e){return Math.sqrt(2*Math.PI/e)*Math.pow(1/Math.E*(e+1/(12*e-1/(10*e))),e)}function i(){var e=this.seed;return e=4294967295&(3042594569^(e=4251993797+(e=4294967295&(3550635116+(e=374761393+(e=4294967295&(3345072700^(e=e+2127912214+(e<<12)&4294967295)^e>>>19))+(e<<5)&4294967295)^e<<9))+(e<<3)&4294967295)^e>>>16),this.seed=e,(268435455&e)/268435456}e.exports=t,e.exports.random=t,e.exports.randomIterator=function(e,n){var r=n||t();if("function"!=typeof r.next)throw new Error("customRandom does not match expected API: next() function is missing");return{forEach:function(t){var n,i,a;for(n=e.length-1;n>0;--n)i=r.next(n+1),a=e[i],e[i]=e[n],e[n]=a,t(a);e.length&&t(e[0])},shuffle:function(){var t,n,i;for(t=e.length-1;t>0;--t)n=r.next(t+1),i=e[n],e[n]=e[t],e[t]=i;return e}}},n.prototype.next=function(e){return Math.floor(this.nextDouble()*e)},n.prototype.nextDouble=i,n.prototype.uniform=i,n.prototype.gaussian=function(){var e,t,n;do{e=(t=2*this.nextDouble()-1)*t+(n=2*this.nextDouble()-1)*n}while(e>=1||0===e);return t*Math.sqrt(-2*Math.log(e)/e)},n.prototype.levy=function(){var e=1.5,t=Math.pow(r(2.5)*Math.sin(Math.PI*e/2)/(r(1.25)*e*Math.pow(2,.25)),1/e);return this.gaussian()*t/Math.pow(Math.abs(this.gaussian()),1/e)}},334:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,o,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c{"use strict";var t;e.exports=function(e){var n,r="&"+e+";";return(t=t||document.createElement("i")).innerHTML=r,(59!==(n=t.textContent).charCodeAt(n.length-1)||"semi"===e)&&(n!==r&&n)}},2214:(e,t,n)=>{"use strict";var r=n(6929),i=n(4375),a=n(9713),o=n(4933),s=n(1904),c=n(7717);e.exports=function(e,t){var n,a,o={};for(a in t||(t={}),h)n=t[a],o[a]=null==n?h[a]:n;return(o.position.indent||o.position.start)&&(o.indent=o.position.indent||[],o.position=o.position.start),function(e,t){var n,a,o,h,j,B,z,$,H,G,V,W,q,X,Y,K,Z,Q,J,ee,te=t.additional,ne=t.nonTerminated,re=t.text,ie=t.reference,ae=t.warning,oe=t.textContext,se=t.referenceContext,ce=t.warningContext,le=t.position,ue=t.indent||[],fe=e.length,he=0,de=-1,pe=le.column||1,ge=le.line||1,be="",me=[];for("string"==typeof te&&(te=te.charCodeAt(0)),K=we(),$=ae?function(e,t){var n=we();n.column+=t,n.offset+=t,ae.call(ce,F[e],n,e)}:f,he--,fe++;++he=55296&&ee<=57343||ee>1114111?($(D,Q),B=u(x)):B in i?($(L,Q),B=i[B]):(G="",U(B)&&$(L,Q),B>65535&&(G+=u((B-=65536)>>>10|55296),B=56320|1023&B),B=G+u(B))):X!==T&&$(R,Q)),B?(ve(),K=we(),he=J-1,pe+=J-q+1,me.push(B),(Z=we()).offset++,ie&&ie.call(se,B,{start:K,end:Z},e.slice(q-1,J)),K=Z):(h=e.slice(q-1,J),be+=h,pe+=h.length,he=J-1)}else 10===j&&(ge++,de++,pe=0),j==j?(be+=u(j),pe++):ve();return me.join("");function we(){return{line:ge,column:pe,offset:he+(le.offset||0)}}function ve(){be&&(me.push(be),re&&re.call(oe,be,{start:K,end:we()}),be="")}}(e,o)};var l={}.hasOwnProperty,u=String.fromCharCode,f=Function.prototype,h={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},d=9,p=10,g=12,b=32,m=38,w=59,v=60,y=61,E=35,_=88,S=120,x=65533,T="named",A="hexadecimal",k="decimal",C={};C[A]=16,C[k]=10;var M={};M[T]=s,M[k]=a,M[A]=o;var I=1,O=2,N=3,R=4,P=5,L=6,D=7,F={};function U(e){return e>=1&&e<=8||11===e||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||65535==(65535&e)||65534==(65535&e)}F[I]="Named character references must be terminated by a semicolon",F[O]="Numeric character references must be terminated by a semicolon",F[N]="Named character references cannot be empty",F[R]="Numeric character references cannot be empty",F[P]="Named character references must be known",F[L]="Numeric character references cannot be disallowed",F[D]="Numeric character references cannot be outside the permissible Unicode range"},7712:(e,t,n)=>{var r=n(5368);e.exports=function e(t,n,i){return r(n)||(i=n||i,n=[]),i=i||{},t instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r{var r=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=f.reach);S+=_.value.length,_=_.next){var x=_.value;if(t.length>e.length)return;if(!(x instanceof a)){var T,A=1;if(w){if(!(T=o(E,S,e,m))||T.index>=e.length)break;var k=T.index,C=T.index+T[0].length,M=S;for(M+=_.value.length;k>=M;)M+=(_=_.next).value.length;if(S=M-=_.value.length,_.value instanceof a)continue;for(var I=_;I!==t.tail&&(Mf.reach&&(f.reach=P);var L=_.prev;if(N&&(L=l(t,L,N),S+=N.length),u(t,L,A),_=l(t,L,new a(h,b?i.tokenize(O,b):O,v,O)),R&&l(t,_,R),A>1){var D={cause:h+","+p,reach:P};s(e,t,n,_.prev,S,D),f&&D.reach>f.reach&&(f.reach=D.reach)}}}}}}function c(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function u(e,t,n){for(var r=t.next,i=0;i"+a.content+""},!e.document)return e.addEventListener?(i.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,o=n.immediateClose;e.postMessage(i.highlight(a,i.languages[r],r)),o&&e.close()}),!1),i):i;var f=i.util.currentScript();function h(){i.manual||i.highlightAll()}if(f&&(i.filename=f.src,f.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var d=document.readyState;"loading"===d||"interactive"===d&&f&&f.defer?document.addEventListener("DOMContentLoaded",h):window.requestAnimationFrame?window.requestAnimationFrame(h):window.setTimeout(h,16)}return i}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=r),void 0!==n.g&&(n.g.Prism=r)},856:(e,t,n)=>{"use strict";var r=n(7183);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},7598:(e,t,n)=>{e.exports=n(856)()},7183:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9286:(e,t,n)=>{"use strict";var r=n(4202),i=n(5980),a=n(4044),o="data";e.exports=function(e,t){var n=r(t),h=t,d=a;return n in e.normal?e.property[e.normal[n]]:(n.length>4&&n.slice(0,4)===o&&s.test(t)&&("-"===t.charAt(4)?h=function(e){var t=e.slice(5).replace(c,f);return o+t.charAt(0).toUpperCase()+t.slice(1)}(t):t=function(e){var t=e.slice(4);return c.test(t)?e:("-"!==(t=t.replace(l,u)).charAt(0)&&(t="-"+t),o+t)}(t),d=i),new d(h,t))};var s=/^data[-\w.:]+$/i,c=/-[a-z]/g,l=/[A-Z]/g;function u(e){return"-"+e.toLowerCase()}function f(e){return e.charAt(1).toUpperCase()}},4236:(e,t,n)=>{"use strict";var r=n(3874),i=n(6457),a=n(9268),o=n(8719),s=n(816),c=n(6276);e.exports=r([a,i,o,s,c])},816:(e,t,n)=>{"use strict";var r=n(1535),i=n(2208),a=r.booleanish,o=r.number,s=r.spaceSeparated;e.exports=i({transform:function(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:a,ariaAutoComplete:null,ariaBusy:a,ariaChecked:a,ariaColCount:o,ariaColIndex:o,ariaColSpan:o,ariaControls:s,ariaCurrent:null,ariaDescribedBy:s,ariaDetails:null,ariaDisabled:a,ariaDropEffect:s,ariaErrorMessage:null,ariaExpanded:a,ariaFlowTo:s,ariaGrabbed:a,ariaHasPopup:null,ariaHidden:a,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:s,ariaLevel:o,ariaLive:null,ariaModal:a,ariaMultiLine:a,ariaMultiSelectable:a,ariaOrientation:null,ariaOwns:s,ariaPlaceholder:null,ariaPosInSet:o,ariaPressed:a,ariaReadOnly:a,ariaRelevant:null,ariaRequired:a,ariaRoleDescription:s,ariaRowCount:o,ariaRowIndex:o,ariaRowSpan:o,ariaSelected:a,ariaSetSize:o,ariaSort:null,ariaValueMax:o,ariaValueMin:o,ariaValueNow:o,ariaValueText:null,role:null}})},6276:(e,t,n)=>{"use strict";var r=n(1535),i=n(2208),a=n(4293),o=r.boolean,s=r.overloadedBoolean,c=r.booleanish,l=r.number,u=r.spaceSeparated,f=r.commaSeparated;e.exports=i({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:a,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:f,acceptCharset:u,accessKey:u,action:null,allow:null,allowFullScreen:o,allowPaymentRequest:o,allowUserMedia:o,alt:null,as:null,async:o,autoCapitalize:null,autoComplete:u,autoFocus:o,autoPlay:o,capture:o,charSet:null,checked:o,cite:null,className:u,cols:l,colSpan:null,content:null,contentEditable:c,controls:o,controlsList:u,coords:l|f,crossOrigin:null,data:null,dateTime:null,decoding:null,default:o,defer:o,dir:null,dirName:null,disabled:o,download:s,draggable:c,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:o,formTarget:null,headers:u,height:l,hidden:o,high:l,href:null,hrefLang:null,htmlFor:u,httpEquiv:u,id:null,imageSizes:null,imageSrcSet:f,inputMode:null,integrity:null,is:null,isMap:o,itemId:null,itemProp:u,itemRef:u,itemScope:o,itemType:u,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:o,low:l,manifest:null,max:null,maxLength:l,media:null,method:null,min:null,minLength:l,multiple:o,muted:o,name:null,nonce:null,noModule:o,noValidate:o,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:o,optimum:l,pattern:null,ping:u,placeholder:null,playsInline:o,poster:null,preload:null,readOnly:o,referrerPolicy:null,rel:u,required:o,reversed:o,rows:l,rowSpan:l,sandbox:u,scope:null,scoped:o,seamless:o,selected:o,shape:null,size:l,sizes:null,slot:null,span:l,spellCheck:c,src:null,srcDoc:null,srcLang:null,srcSet:f,start:l,step:null,style:null,tabIndex:l,target:null,title:null,translate:null,type:null,typeMustMatch:o,useMap:null,value:c,width:l,wrap:null,align:null,aLink:null,archive:u,axis:null,background:null,bgColor:null,border:l,borderColor:null,bottomMargin:l,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:o,declare:o,event:null,face:null,frame:null,frameBorder:null,hSpace:l,leftMargin:l,link:null,longDesc:null,lowSrc:null,marginHeight:l,marginWidth:l,noResize:o,noHref:o,noShade:o,noWrap:o,object:null,profile:null,prompt:null,rev:null,rightMargin:l,rules:null,scheme:null,scrolling:c,standby:null,summary:null,text:null,topMargin:l,valueType:null,version:null,vAlign:null,vLink:null,vSpace:l,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:o,disableRemotePlayback:o,prefix:null,property:null,results:l,security:null,unselectable:null}})},4293:(e,t,n)=>{"use strict";var r=n(5720);e.exports=function(e,t){return r(e,t.toLowerCase())}},5720:e=>{"use strict";e.exports=function(e,t){return t in e?e[t]:t}},2208:(e,t,n)=>{"use strict";var r=n(4202),i=n(571),a=n(5980);e.exports=function(e){var t,n,o=e.space,s=e.mustUseProperty||[],c=e.attributes||{},l=e.properties,u=e.transform,f={},h={};for(t in l)n=new a(t,u(c,t),l[t],o),-1!==s.indexOf(t)&&(n.mustUseProperty=!0),f[t]=n,h[r(t)]=t,h[r(n.attribute)]=t;return new i(f,h,o)}},5980:(e,t,n)=>{"use strict";var r=n(4044),i=n(1535);e.exports=s,s.prototype=new r,s.prototype.defined=!0;var a=["boolean","booleanish","overloadedBoolean","number","commaSeparated","spaceSeparated","commaOrSpaceSeparated"],o=a.length;function s(e,t,n,s){var l,u=-1;for(c(this,"space",s),r.call(this,e,t);++u{"use strict";e.exports=n;var t=n.prototype;function n(e,t){this.property=e,this.attribute=t}t.space=null,t.attribute=null,t.property=null,t.boolean=!1,t.booleanish=!1,t.overloadedBoolean=!1,t.number=!1,t.commaSeparated=!1,t.spaceSeparated=!1,t.commaOrSpaceSeparated=!1,t.mustUseProperty=!1,t.defined=!1},3874:(e,t,n)=>{"use strict";var r=n(2628),i=n(571);e.exports=function(e){for(var t,n,a=e.length,o=[],s=[],c=-1;++c{"use strict";e.exports=n;var t=n.prototype;function n(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}t.space=null,t.normal={},t.property={}},1535:(e,t)=>{"use strict";var n=0;function r(){return Math.pow(2,++n)}t.boolean=r(),t.booleanish=r(),t.overloadedBoolean=r(),t.number=r(),t.spaceSeparated=r(),t.commaSeparated=r(),t.commaOrSpaceSeparated=r()},6457:(e,t,n)=>{"use strict";var r=n(2208);e.exports=r({space:"xlink",transform:function(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}})},9268:(e,t,n)=>{"use strict";var r=n(2208);e.exports=r({space:"xml",transform:function(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}})},8719:(e,t,n)=>{"use strict";var r=n(2208),i=n(4293);e.exports=r({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:i,properties:{xmlns:null,xmlnsXLink:null}})},4202:e=>{"use strict";e.exports=function(e){return e.toLowerCase()}},993:(e,t,n)=>{"use strict";var r=n(6326),i=n(334),a=n(9828);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n
",i}image(e,t,n){const r=Lv(e);if(null===r)return n;let i=`${n}"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")));continue}case"code":{const e=i;n+=this.renderer.code(e.text,e.lang,!!e.escaped);continue}case"table":{const e=i;let t="",r="";for(let t=0;t0&&"paragraph"===n.tokens[0].type?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&"text"===n.tokens[0].tokens[0].type&&(n.tokens[0].tokens[0].text=e+" "+n.tokens[0].tokens[0].text)):n.tokens.unshift({type:"text",text:e+" "}):s+=e+" "}s+=this.parse(n.tokens,a),o+=this.renderer.listitem(s,i,!!r)}n+=this.renderer.list(o,t,r);continue}case"html":{const e=i;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=i;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let a=i,o=a.tokens?this.parseInline(a.tokens):a.text;for(;r+1{n=n.concat(this.walkTokens(e[r],t))})):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach((e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)})),n.extensions=t),e.renderer){const t=this.defaults.renderer||new Gv(this.defaults);for(const n in e.renderer){const r=e.renderer[n],i=n,a=t[i];t[i]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=a.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new Bv(this.defaults);for(const n in e.tokenizer){const r=e.tokenizer[n],i=n,a=t[i];t[i]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new qv;for(const n in e.hooks){const r=e.hooks[n],i=n,a=t[i];qv.passThroughHooks.has(n)?t[i]=e=>{if(this.defaults.async)return Promise.resolve(r.call(t,e)).then((e=>a.call(t,e)));const n=r.call(t,e);return a.call(t,n)}:t[i]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}})),this}setOptions(e){return this.defaults={...this.defaults,...e},this}#e(e,t){return(n,r)=>{const i={...r},a={...this.defaults,...i};!0===this.defaults.async&&!1===i.async&&(a.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),a.async=!0);const o=this.#t(!!a.silent,!!a.async);if(null==n)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a),a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(n):n).then((t=>e(t,a))).then((e=>a.walkTokens?Promise.all(this.walkTokens(e,a.walkTokens)).then((()=>e)):e)).then((e=>t(e,a))).then((e=>a.hooks?a.hooks.postprocess(e):e)).catch(o);try{a.hooks&&(n=a.hooks.preprocess(n));const r=e(n,a);a.walkTokens&&this.walkTokens(r,a.walkTokens);let i=t(r,a);return a.hooks&&(i=a.hooks.postprocess(i)),i}catch(e){return o(e)}}}#t(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

An error occurred:

"+Ov(n.message+"",!0)+"
";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Yv(e,t){return Xv.parse(e,t)}function Kv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return function(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return ey[r]||(ey[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),ey[r]}(e.filter((function(e){return"token"!==e}))).reduce((function(e,t){return Jv(Jv({},e),n[t])}),t)}function ny(e){return e.join(" ")}function ry(t){var n=t.node,r=t.stylesheet,i=t.style,a=void 0===i?{}:i,o=t.useInlineStyles,s=t.key,c=n.properties,l=n.type,u=n.tagName,f=n.value;if("text"===l)return f;if(u){var h,d=function(e,t){var n=0;return function(r){return n+=1,r.map((function(r,i){return ry({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})}))}}(r,o);if(o){var p=Object.keys(r).reduce((function(e,t){return t.split(".").forEach((function(t){e.includes(t)||e.push(t)})),e}),[]),g=c.className&&c.className.includes("token")?["token"]:[],b=c.className&&g.concat(c.className.filter((function(e){return!p.includes(e)})));h=Jv(Jv({},c),{},{className:ny(b)||void 0,style:ty(c.className,Object.assign({},c.style,a),r)})}else h=Jv(Jv({},c),{},{className:ny(c.className)});var m=d(n.children);return e.createElement(u,(0,ve.A)({key:s},h),m)}}var iy=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function ay(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oy(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r2&&void 0!==arguments[2]?arguments[2]:[];return t||l.length>0?function(e,t){return fy({children:e,lineNumber:t,lineNumberStyle:s,largestLineNumber:o,showInlineLineNumbers:i,lineProps:n,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:r,wrapLongLines:c})}(e,a,l):function(e,t){if(r&&t&&i){var n=uy(s,t,o);e.unshift(ly(t,n))}return e}(e,a)}for(var g=function(){var e=u[d],t=e.children[0].value;if(t.match(sy)){var n=t.split("\n");n.forEach((function(t,i){var o=r&&f.length+a,s={type:"text",value:"".concat(t,"\n")};if(0===i){var c=p(u.slice(h+1,d).concat(fy({children:[s],className:e.properties.className})),o);f.push(c)}else if(i===n.length-1){var l=u[d+1]&&u[d+1].children&&u[d+1].children[0],g={type:"text",value:"".concat(t)};if(l){var b=fy({children:[g],className:e.properties.className});u.splice(d+1,0,b)}else{var m=p([g],o,e.properties.className);f.push(m)}}else{var w=p([s],o,e.properties.className);f.push(w)}})),h=d}d++};d code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}},function(t){var n=t.language,r=t.children,i=t.style,a=void 0===i?my:i,o=t.customStyle,s=void 0===o?{}:o,c=t.codeTagProps,l=void 0===c?{className:n?"language-".concat(n):void 0,style:oy(oy({},a['code[class*="language-"]']),a['code[class*="language-'.concat(n,'"]')])}:c,u=t.useInlineStyles,f=void 0===u||u,h=t.showLineNumbers,d=void 0!==h&&h,p=t.showInlineLineNumbers,g=void 0===p||p,b=t.startingLineNumber,m=void 0===b?1:b,w=t.lineNumberContainerStyle,v=t.lineNumberStyle,y=void 0===v?{}:v,E=t.wrapLines,_=t.wrapLongLines,S=void 0!==_&&_,x=t.lineProps,T=void 0===x?{}:x,A=t.renderer,k=t.PreTag,C=void 0===k?"pre":k,M=t.CodeTag,I=void 0===M?"code":M,O=t.code,N=void 0===O?(Array.isArray(r)?r[0]:r)||"":O,R=t.astGenerator,P=function(e,t){if(null==e)return{};var n,r,i=We(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,iy);R=R||by;var L=d?e.createElement(cy,{containerStyle:w,codeStyle:l.style||{},numberStyle:y,startingLineNumber:m,codeString:N}):null,D=a.hljs||a['pre[class*="language-"]']||{backgroundColor:"#fff"},F=gy(R)?"hljs":"prismjs",U=f?Object.assign({},P,{style:Object.assign({},D,s)}):Object.assign({},P,{className:P.className?"".concat(F," ").concat(P.className):F,style:Object.assign({},s)});if(l.style=oy(oy({},l.style),{},S?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"}),!R)return e.createElement(C,U,L,e.createElement(I,l,N));(void 0===E&&A||S)&&(E=!0),A=A||py;var j=[{type:"text",value:N}],B=function(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(gy(t)){var a=function(e,t){return-1!==e.listLanguages().indexOf(t)}(t,n);return"text"===n?{value:i,language:"text"}:a?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:i}}catch(e){return{value:i}}}({astGenerator:R,language:n,code:N,defaultCodeValue:j});null===B.language&&(B.value=j);var z=dy(B,E,T,d,g,m,B.value.length+m,y,S);return e.createElement(C,U,e.createElement(I,l,!g&&L,A({rows:z,stylesheet:a,useInlineStyles:f})))});vy.supportedLanguages=["abap","abnf","actionscript","ada","agda","al","antlr4","apacheconf","apex","apl","applescript","aql","arduino","arff","asciidoc","asm6502","asmatmel","aspnet","autohotkey","autoit","avisynth","avro-idl","bash","basic","batch","bbcode","bicep","birb","bison","bnf","brainfuck","brightscript","bro","bsl","c","cfscript","chaiscript","cil","clike","clojure","cmake","cobol","coffeescript","concurnas","coq","cpp","crystal","csharp","cshtml","csp","css-extras","css","csv","cypher","d","dart","dataweave","dax","dhall","diff","django","dns-zone-file","docker","dot","ebnf","editorconfig","eiffel","ejs","elixir","elm","erb","erlang","etlua","excel-formula","factor","false","firestore-security-rules","flow","fortran","fsharp","ftl","gap","gcode","gdscript","gedcom","gherkin","git","glsl","gml","gn","go-module","go","graphql","groovy","haml","handlebars","haskell","haxe","hcl","hlsl","hoon","hpkp","hsts","http","ichigojam","icon","icu-message-format","idris","iecst","ignore","inform7","ini","io","j","java","javadoc","javadoclike","javascript","javastacktrace","jexl","jolie","jq","js-extras","js-templates","jsdoc","json","json5","jsonp","jsstacktrace","jsx","julia","keepalived","keyman","kotlin","kumir","kusto","latex","latte","less","lilypond","liquid","lisp","livescript","llvm","log","lolcode","lua","magma","makefile","markdown","markup-templating","markup","matlab","maxscript","mel","mermaid","mizar","mongodb","monkey","moonscript","n1ql","n4js","nand2tetris-hdl","naniscript","nasm","neon","nevod","nginx","nim","nix","nsis","objectivec","ocaml","opencl","openqasm","oz","parigp","parser","pascal","pascaligo","pcaxis","peoplecode","perl","php-extras","php","phpdoc","plsql","powerquery","powershell","processing","prolog","promql","properties","protobuf","psl","pug","puppet","pure","purebasic","purescript","python","q","qml","qore","qsharp","r","racket","reason","regex","rego","renpy","rest","rip","roboconf","robotframework","ruby","rust","sas","sass","scala","scheme","scss","shell-session","smali","smalltalk","smarty","sml","solidity","solution-file","soy","sparql","splunk-spl","sqf","sql","squirrel","stan","stylus","swift","systemd","t4-cs","t4-templating","t4-vb","tap","tcl","textile","toml","tremor","tsx","tt2","turtle","twig","typescript","typoscript","unrealscript","uorazor","uri","v","vala","vbnet","velocity","verilog","vhdl","vim","visual-basic","warpscript","wasm","web-idl","wiki","wolfram","wren","xeora","xml-doc","xojo","xquery","yaml","yang","zig"];const yy=vy,Ey={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}};function _y(t){var n=t.children,r=t.className,i=t.content,a=qf("sub header",r),o=rh(_y,t),s=ih(_y,t);return e.createElement(s,(0,ve.A)({},o,{className:a}),Kp(n)?i:n)}_y.handledProps=["as","children","className","content"],_y.propTypes={},_y.create=yg(_y,(function(e){return{content:e}}));const Sy=_y;function xy(t){var n=t.children,r=t.className,i=t.content,a=qf("content",r),o=rh(xy,t),s=ih(xy,t);return e.createElement(s,(0,ve.A)({},o,{className:a}),Kp(n)?i:n)}xy.handledProps=["as","children","className","content"],xy.propTypes={};const Ty=xy;function Ay(t){var n=t.attached,r=t.block,i=t.children,a=t.className,o=t.color,s=t.content,c=t.disabled,l=t.dividing,u=t.floated,f=t.icon,h=t.image,d=t.inverted,p=t.size,g=t.sub,b=t.subheader,m=t.textAlign,w=qf("ui",o,p,Kf(r,"block"),Kf(c,"disabled"),Kf(l,"dividing"),Zf(u,"floated"),Kf(!0===f,"icon"),Kf(!0===h,"image"),Kf(d,"inverted"),Kf(g,"sub"),Qf(n,"attached"),eh(m),"header",a),v=rh(Ay,t),y=ih(Ay,t);if(!Kp(i))return e.createElement(y,(0,ve.A)({},v,{className:w}),i);var E=Bg.create(f,{autoGenerateKey:!1}),_=Xw.create(h,{autoGenerateKey:!1}),S=Sy.create(b,{autoGenerateKey:!1});return E||_?e.createElement(y,(0,ve.A)({},v,{className:w}),E||_,(s||S)&&e.createElement(Ty,null,s,S)):e.createElement(y,(0,ve.A)({},v,{className:w}),s,S)}Ay.handledProps=["as","attached","block","children","className","color","content","disabled","dividing","floated","icon","image","inverted","size","sub","subheader","textAlign"],Ay.propTypes={},Ay.Content=Ty,Ay.Subheader=Sy;const ky=Ay;function Cy(t){var n=t.children,r=t.className,i=t.content,a=t.fluid,o=t.text,s=t.textAlign,c=qf("ui",Kf(o,"text"),Kf(a,"fluid"),eh(s),"container",r),l=rh(Cy,t),u=ih(Cy,t);return e.createElement(u,(0,ve.A)({},l,{className:c}),Kp(n)?i:n)}Cy.handledProps=["as","children","className","content","fluid","text","textAlign"],Cy.propTypes={};const My=Cy;var Iy=Object.prototype.hasOwnProperty;const Oy=function(e,t,n){var r=e[t];Iy.call(e,t)&&oh(r,n)&&(void 0!==n||t in e)||function(e,t,n){"__proto__"==t&&Ig?Ig(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}(e,t,n)},Ny=function(e,t,n,r){if(!_h(e))return e;for(var i=-1,a=(t=Rp(t,e)).length,o=a-1,s=e;null!=s&&++i=200&&(a=Kh,o=!1,t=new Yh(t));e:for(;++i-1?r[i?e[a]:a]:void 0});var Ky;var Zy=Object.prototype.hasOwnProperty;const Qy=function(e){if(null==e)return!0;if(Bd(e)&&(id(e)||"string"==typeof e||"function"==typeof e.splice||yd(e)||Od(e)||bd(e)))return!e.length;var t=ap(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Ld(e))return!jd(e).length;for(var n in e)if(Zy.call(e,n))return!1;return!0},Jy=Bp("length");var eE="\\ud800-\\udfff",tE="["+eE+"]",nE="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",rE="\\ud83c[\\udffb-\\udfff]",iE="[^"+eE+"]",aE="(?:\\ud83c[\\udde6-\\uddff]){2}",oE="[\\ud800-\\udbff][\\udc00-\\udfff]",sE="(?:"+nE+"|"+rE+")?",cE="[\\ufe0e\\ufe0f]?",lE=cE+sE+"(?:\\u200d(?:"+[iE,aE,oE].join("|")+")"+cE+sE+")*",uE="(?:"+[iE+nE+"?",nE,aE,oE,tE].join("|")+")",fE=RegExp(rE+"(?="+rE+")|"+uE+lE,"g");const hE=function(e){return lm(e)?function(e){for(var t=fE.lastIndex=0;fE.test(e);)++t;return t}(e):Jy(e)};var dE=ph?ph.isConcatSpreadable:void 0;const pE=function(e){return id(e)||bd(e)||!!(dE&&e&&e[dE])},gE=function e(t,n,r,i,a){var o=-1,s=t.length;for(r||(r=pE),a||(a=[]);++o0&&r(c)?n>1?e(c,n-1,r,i,a):rd(a,c):i||(a[a.length]=c)}return a};const bE=Lg((function(e,t){return Vy(e)?Gy(e,gE(t,1,Vy,!0)):[]})),mE=Lg((function(e){return sg(gE(e,1,Vy,!0))})),wE=function(e,t){return function(e,t,n){for(var r=-1,i=t.length,a={};++r=u})),u>=h.length-1&&(t=d[d.length-1]);else{var g=Xy(h,["value",f]);t=Ew(d,g)?g:void 0}return(!t||t<0)&&(t=d[0]),t}var qE=function(e,t){return Jp(e)?t:e},XE=function(e){return e?e.map((function(e){return EE(e,["key","value"])})):e};function YE(t){var n=t.flag,r=t.image,i=t.text;return Sh(i)?i:{content:e.createElement(e.Fragment,null,TE.create(n),Xw.create(r),i)}}var KE=function(t){function n(){for(var n,r=arguments.length,i=new Array(r),a=0;a=r||1===r?n.open(e):Dg(n.searchRef.current,"focus")},n.handleIconClick=function(e){var t=n.props.clearable,r=n.hasValue();Dg(n.props,"onClick",e,n.props),e.stopPropagation(),t&&r?n.clearValue(e):n.toggle(e)},n.handleItemClick=function(e,t){var r=n.props,i=r.multiple,a=r.search,o=n.state.value,s=t.value;if(e.stopPropagation(),(i||t.disabled)&&e.nativeEvent.stopImmediatePropagation(),!t.disabled){var c=t["data-additional"],l=i?mE(n.state.value,[s]):s;(i?!!bE(l,o).length:l!==o)&&(n.setState({value:l}),n.handleChange(e,l)),n.clearSearchQuery(),Dg(a?n.searchRef.current:n.ref.current,"focus"),n.closeOnChange(e),c&&Dg(n.props,"onAddItem",e,(0,ve.A)({},n.props,{value:s}))}},n.handleFocus=function(e){n.state.focus||(Dg(n.props,"onFocus",e,n.props),n.setState({focus:!0}))},n.handleBlur=function(e){var t=Dp(e,"currentTarget");if(!t||!t.contains(document.activeElement)){var r=n.props,i=r.closeOnBlur,a=r.multiple,o=r.selectOnBlur;n.isMouseDown||(Dg(n.props,"onBlur",e,n.props),o&&!a&&(n.makeSelectedItemActive(e,n.state.selectedIndex),i&&n.close()),n.setState({focus:!1}),n.clearSearchQuery())}},n.handleSearchChange=function(e,t){var r=t.value;e.stopPropagation();var i=n.props.minCharacters,a=n.state.open,o=r;Dg(n.props,"onSearchChange",e,(0,ve.A)({},n.props,{searchQuery:o})),n.setState({searchQuery:o,selectedIndex:0}),!a&&o.length>=i?n.open():a&&1!==i&&o.lengthi||a<0)?a=t:a>i?a=0:a<0&&(a=i),r[a].disabled?n.getSelectedIndexAfterMove(e,a):a}},n.handleIconOverrides=function(e){var t=n.props.clearable;return{className:qf(t&&n.hasValue()&&"clear",e.className),onClick:function(t){Dg(e,"onClick",t,e),n.handleIconClick(t)}}},n.clearValue=function(e){var t=n.props.multiple?[]:"";n.setState({value:t}),n.handleChange(e,t)},n.computeSearchInputTabIndex=function(){var e=n.props,t=e.disabled,r=e.tabIndex;return Jp(r)?t?-1:0:r},n.computeSearchInputWidth=function(){var e=n.state.searchQuery;if(n.sizerRef.current&&e){n.sizerRef.current.style.display="inline",n.sizerRef.current.textContent=e;var t=Math.ceil(n.sizerRef.current.getBoundingClientRect().width);return n.sizerRef.current.style.removeProperty("display"),t}},n.computeTabIndex=function(){var e=n.props,t=e.disabled,r=e.search,i=e.tabIndex;if(!r)return t?-1:Jp(i)?0:i},n.handleSearchInputOverrides=function(e){return{onChange:function(t,r){Dg(e,"onChange",t,r),n.handleSearchChange(t,r)}}},n.hasValue=function(){var e=n.props.multiple,t=n.state.value;return e?!Qy(t):!Jp(t)&&""!==t},n.scrollSelectedItemIntoView=function(){if(n.ref.current){var e=n.ref.current.querySelector(".menu.visible");if(e){var t=e.querySelector(".item.selected");if(t){var r=t.offsetTope.scrollTop+e.clientHeight;r?e.scrollTop=t.offsetTop:i&&(e.scrollTop=t.offsetTop+t.clientHeight-e.clientHeight)}}}},n.setOpenDirection=function(){if(n.ref.current){var e=n.ref.current.querySelector(".menu.visible");if(e){var t=n.ref.current.getBoundingClientRect(),r=e.clientHeight,i=document.documentElement.clientHeight-t.top-t.height-r,a=t.top-r,o=i<0&&a>i;!o!=!n.state.upward&&n.setState({upward:o})}}},n.open=function(e,t){void 0===e&&(e=null),void 0===t&&(t=!0);var r=n.props,i=r.disabled,a=r.search;i||(a&&Dg(n.searchRef.current,"focus"),Dg(n.props,"onOpen",e,n.props),t&&n.setState({open:!0}),n.scrollSelectedItemIntoView())},n.close=function(e,t){void 0===t&&(t=n.handleClose),n.state.open&&(Dg(n.props,"onClose",e,n.props),n.setState({open:!1},t))},n.handleClose=function(){var e=document.activeElement===n.searchRef.current;!e&&n.ref.current&&n.ref.current.blur();var t=document.activeElement===n.ref.current,r=e||t;n.setState({focus:r})},n.toggle=function(e){return n.state.open?n.close(e):n.open(e)},n.renderText=function(){var e,t=n.props,r=t.multiple,i=t.placeholder,a=t.search,o=t.text,s=n.state,c=s.searchQuery,l=s.selectedIndex,u=s.value,f=s.open,h=n.hasValue(),d=qf(i&&!h&&"default","text",a&&c&&"filtered"),p=i;return o?p=o:f&&!r?e=n.getSelectedItem(l):h&&(e=n.getItemByValue(u)),FE.create(e?YE(e):p,{defaultProps:{className:d}})},n.renderSearchInput=function(){var t=n.props,r=t.search,i=t.searchInput,a=n.state.searchQuery;return r&&e.createElement(mw,{innerRef:n.searchRef},LE.create(i,{defaultProps:{style:{width:n.computeSearchInputWidth()},tabIndex:n.computeSearchInputTabIndex(),value:a},overrideProps:n.handleSearchInputOverrides}))},n.renderSearchSizer=function(){var t=n.props,r=t.search,i=t.multiple;return r&&i&&e.createElement("span",{className:"sizer",ref:n.sizerRef})},n.renderLabels=function(){var e=n.props,t=e.multiple,r=e.renderLabel,i=n.state,a=i.selectedLabel,o=i.value;if(t&&!Qy(o)){var s=Wg(o,n.getItemByValue);return Wg(function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t1?n-1:0),i=1;i{const{apiUrl:t}=tb(),[n,r]=(0,e.useState)(!1),[i,a]=(0,e.useState)([]),[o,s]=(0,e.useState)(""),[c,l]=(0,e.useState)({term:"",error:""}),[u,f]=(0,e.useState)(""),[h,d]=(0,e.useState)(""),p=i.length>0,g=(0,e.useRef)(null),b=(0,e.useRef)(null),[m,w]=(0,e.useState)(!1),v=(0,e.useRef)(!1);return(0,e.useEffect)((()=>{const e=b.current;if(!e)return;const t=()=>{const t=e.scrollHeight-e.scrollTop-e.clientHeight<64;w(!t)};return e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}),[]),(0,e.useEffect)((()=>{const e=b.current;if(!e)return;const t=e.scrollHeight-e.scrollTop-e.clientHeight<120;(v.current||t)&&(e.scrollTop=e.scrollHeight,v.current=!1)}),[i]),(0,e.useEffect)((()=>{""===u&&fetch(`${t}/user`,{method:"GET"}).then((e=>{200===e.status?e.text().then((e=>f(e))):window.location.href=`${t}/login`})).catch((e=>{console.error("Error checking if user is logged in:",e),s(e instanceof Error?e.message:"Network error checking login status"),r(!1)}))}),[]),e.createElement(e.Fragment,null,e.createElement(__,{textAlign:"center",verticalAlign:"middle",className:"chatbot-layout"},e.createElement(__.Column,null,e.createElement(ky,{as:"h1",className:"chatbot-title"},"OWASP OpenCRE Chat"),e.createElement(My,null,e.createElement("div",{className:"chat-container "+(p?"chat-active":"chat-landing")},e.createElement("div",{className:"chat-surface"}," ",o&&e.createElement("div",{className:"ui negative message"},e.createElement("div",{className:"header"},"Error"),e.createElement("p",null,o)),e.createElement("div",{className:"chat-messages",ref:b},i.map(((t,n)=>e.createElement("div",{key:n,className:`chat-message ${t.role}`},e.createElement("div",{className:"message-card"},e.createElement("div",{className:"message-header"},e.createElement("span",{className:"message-role"},t.role),e.createElement("span",{className:"message-timestamp"},t.timestamp)),e.createElement("div",{className:"message-body"},function(t){const n=t.split("```"),r=[];return n.forEach(((t,n)=>{n%2==0?r.push(e.createElement("p",{key:n,dangerouslySetInnerHTML:{__html:(0,_v.sanitize)(Yv(t),{USE_PROFILES:{html:!0}})}})):r.push(e.createElement(yy,{key:n,style:Ey},t))})),r}(t.message)),t.data&&t.data.length>0&&e.createElement("div",{className:"references"},e.createElement("div",{className:"references-title"},"References"),t.data.map(((t,n)=>e.createElement(e.Fragment,{key:n},function(t){var n;if(!t||!t.doctype)return null;let r=`/node/${t.doctype.toLowerCase()}/${t.name}`;return r+=t.section?`/section/${t.section}`:`/sectionid/${t.sectionID}`,e.createElement("div",{className:"reference-card"},e.createElement("a",{href:t.hyperlink,target:"_blank",rel:"noopener noreferrer"},e.createElement("strong",null,t.name)," — section ",null!==(n=t.section)&&void 0!==n?n:t.sectionID),t.embeddingsUrl?e.createElement("div",{className:"reference-link"},e.createElement("a",{href:t.embeddingsUrl,target:"_blank",rel:"noopener noreferrer"},"Scoped source (embedding URL)")):null,e.createElement("div",{className:"reference-link"},e.createElement("a",{href:r},"View in OpenCRE")))}(t))))),!t.accurate&&e.createElement("div",{className:"accuracy-warning"},"This answer could not be fully verified against OpenCRE sources. Please validate independently."))))),n&&e.createElement("div",{className:"chat-message assistant"},e.createElement("div",{className:"message-card typing-indicator"},e.createElement("span",{className:"dot"}),e.createElement("span",{className:"dot"}),e.createElement("span",{className:"dot"}))),e.createElement("div",{ref:g})),m&&e.createElement("button",{className:"scroll-to-bottom",onClick:()=>{const e=b.current;e&&(v.current=!0,e.scrollTop=e.scrollHeight,w(!1))},"aria-label":"Scroll to latest message"},e.createElement(Bg,{name:"arrow down",className:"scroll-icon"})),e.createElement(b_,{className:"chat-input",size:"large",onSubmit:function(){return S_(this,void 0,void 0,(function*(){if(!c.term.trim())return;v.current=!0;const e=c.term;l(Object.assign(Object.assign({},c),{term:""})),r(!0),a((t=>[...t,{timestamp:(new Date).toLocaleTimeString(),role:"user",message:e,data:[],accurate:!0}])),fetch(`${t}/completion`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:e})}).then((e=>S_(this,void 0,void 0,(function*(){if(!e.ok){const t=yield e.text();let n=e.statusText;try{const e=JSON.parse(t);e.error?n=e.error:e.message&&(n=e.message)}catch(e){t&&(n=t)}throw new Error(n||`Error ${e.status}`)}return e.json()})))).then((e=>{r(!1),s(""),e.model_name&&d(e.model_name),a((t=>[...t,{timestamp:(new Date).toLocaleTimeString(),role:"assistant",message:e.response,data:e.table,accurate:e.accurate}]))})).catch((e=>{console.error("Error fetching answer:",e),s(e instanceof Error?e.message:"An unexpected network error occurred"),r(!1)}))}))}},e.createElement(b_.Input,{fluid:!0,value:c.term,onChange:e=>l(Object.assign(Object.assign({},c),{term:e.target.value})),placeholder:"Type your infosec question here…"}),e.createElement(sv,{primary:!0,fluid:!0,size:"small"},e.createElement(Bg,{name:"send"})," Ask")))),e.createElement("div",{className:"chatbot-disclaimer"},e.createElement("i",null,"Answers are generated by ",function(e){return e?e.startsWith("gemini")?`Google ${e.replace("gemini-","Gemini ").replace(/-/g," ")}`:e.startsWith("gpt")?`OpenAI ${e.toUpperCase()}`:e:"a Large Language Model"}(h)," Large Language Model, which uses the internet as training data, plus collected key cybersecurity standards from"," ",e.createElement("a",{href:"https://opencre.org"},"OpenCRE")," as the preferred source. This leads to more reliable answers and adds references, but note: it is still generative AI which is never guaranteed correct.",e.createElement("br",null),e.createElement("br",null),"Model operation is generously sponsored by"," ",e.createElement("a",{href:"https://www.softwareimprovementgroup.com"},"Software Improvement Group"),".",e.createElement("br",null),e.createElement("br",null),"Privacy & Security: Your question is sent to Heroku, the hosting provider for OpenCRE, and then to GCP, all via protected connections. Your data isn't stored on OpenCRE servers. The OpenCRE team employed extensive measures to ensure privacy and security. To review the code: https://github.com/owasp/OpenCRE"))))))};var T_=n(309);function A_(t){var n=t.children,r=t.className,i=t.content,a=qf(r,"description"),o=rh(A_,t),s=ih(A_,t);return e.createElement(s,(0,ve.A)({},o,{className:a}),Kp(n)?i:n)}i()(T_.A,{insert:"head",singleton:!1}),T_.A.locals,A_.handledProps=["as","children","className","content"],A_.propTypes={},A_.create=yg(A_,(function(e){return{content:e}}));const k_=A_;function C_(t){var n=t.children,r=t.className,i=t.content,a=qf("header",r),o=rh(C_,t),s=ih(C_,t);return e.createElement(s,(0,ve.A)({},o,{className:a}),Kp(n)?i:n)}C_.handledProps=["as","children","className","content"],C_.propTypes={},C_.create=yg(C_,(function(e){return{content:e}}));const M_=C_;function I_(t){var n=t.children,r=t.className,i=t.content,a=t.description,o=t.floated,s=t.header,c=t.verticalAlign,l=qf(Zf(o,"floated"),th(c),"content",r),u=rh(I_,t),f=ih(I_,t);return Kp(n)?e.createElement(f,(0,ve.A)({},u,{className:l}),M_.create(s),k_.create(a),i):e.createElement(f,(0,ve.A)({},u,{className:l}),n)}I_.handledProps=["as","children","className","content","description","floated","header","verticalAlign"],I_.propTypes={},I_.create=yg(I_,(function(e){return{content:e}}));const O_=I_;function N_(t){var n=t.className,r=t.verticalAlign,i=qf(th(r),n),a=rh(N_,t);return e.createElement(Bg,(0,ve.A)({},a,{className:i}))}N_.handledProps=["className","verticalAlign"],N_.propTypes={},N_.create=yg(N_,(function(e){return{name:e}}));const R_=N_;var P_=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),i=0;i0&&Y_(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Y_(r.height)/e.offsetHeight||1);var o=(G_(e)?H_(e):window).visualViewport,s=!Z_()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,f=r.height/a;return{width:u,height:f,top:l,right:c+u,bottom:l+f,left:c,x:c,y:l}}function J_(e){var t=H_(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function eS(e){return e?(e.nodeName||"").toLowerCase():null}function tS(e){return((G_(e)?e.ownerDocument:e.document)||window.document).documentElement}function nS(e){return Q_(tS(e)).left+J_(e).scrollLeft}function rS(e){return H_(e).getComputedStyle(e)}function iS(e){var t=rS(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function aS(e,t,n){void 0===n&&(n=!1);var r,i,a=V_(t),o=V_(t)&&function(e){var t=e.getBoundingClientRect(),n=Y_(t.width)/e.offsetWidth||1,r=Y_(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=tS(t),c=Q_(e,o,n),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(a||!a&&!n)&&(("body"!==eS(t)||iS(s))&&(l=(r=t)!==H_(r)&&V_(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:J_(r)),V_(t)?((u=Q_(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=nS(s))),{x:c.left+l.scrollLeft-u.x,y:c.top+l.scrollTop-u.y,width:c.width,height:c.height}}function oS(e){var t=Q_(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function sS(e){return"html"===eS(e)?e:e.assignedSlot||e.parentNode||(W_(e)?e.host:null)||tS(e)}function cS(e){return["html","body","#document"].indexOf(eS(e))>=0?e.ownerDocument.body:V_(e)&&iS(e)?e:cS(sS(e))}function lS(e,t){var n;void 0===t&&(t=[]);var r=cS(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=H_(r),o=i?[a].concat(a.visualViewport||[],iS(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(lS(sS(o)))}function uS(e){return["table","td","th"].indexOf(eS(e))>=0}function fS(e){return V_(e)&&"fixed"!==rS(e).position?e.offsetParent:null}function hS(e){for(var t=H_(e),n=fS(e);n&&uS(n)&&"static"===rS(n).position;)n=fS(n);return n&&("html"===eS(n)||"body"===eS(n)&&"static"===rS(n).position)?t:n||function(e){var t=/firefox/i.test(K_());if(/Trident/i.test(K_())&&V_(e)&&"fixed"===rS(e).position)return null;var n=sS(e);for(W_(n)&&(n=n.host);V_(n)&&["html","body"].indexOf(eS(n))<0;){var r=rS(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var dS="top",pS="bottom",gS="right",bS="left",mS="auto",wS=[dS,pS,gS,bS],vS="start",yS="end",ES="viewport",_S="popper",SS=wS.reduce((function(e,t){return e.concat([t+"-"+vS,t+"-"+yS])}),[]),xS=[].concat(wS,[mS]).reduce((function(e,t){return e.concat([t,t+"-"+vS,t+"-"+yS])}),[]),TS=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function AS(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||i(e)})),r}var kS={placement:"bottom",modifiers:[],strategy:"absolute"};function CS(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function LS(e){var t,n=e.reference,r=e.element,i=e.placement,a=i?NS(i):null,o=i?RS(i):null,s=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(a){case dS:t={x:s,y:n.y-r.height};break;case pS:t={x:s,y:n.y+n.height};break;case gS:t={x:n.x+n.width,y:c};break;case bS:t={x:n.x-r.width,y:c};break;default:t={x:n.x,y:n.y}}var l=a?PS(a):null;if(null!=l){var u="y"===l?"height":"width";switch(o){case vS:t[l]=t[l]-(n[u]/2-r[u]/2);break;case yS:t[l]=t[l]+(n[u]/2-r[u]/2)}}return t}var DS={top:"auto",right:"auto",bottom:"auto",left:"auto"};function FS(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,f=e.isFixed,h=o.x,d=void 0===h?0:h,p=o.y,g=void 0===p?0:p,b="function"==typeof u?u({x:d,y:g}):{x:d,y:g};d=b.x,g=b.y;var m=o.hasOwnProperty("x"),w=o.hasOwnProperty("y"),v=bS,y=dS,E=window;if(l){var _=hS(n),S="clientHeight",x="clientWidth";_===H_(n)&&"static"!==rS(_=tS(n)).position&&"absolute"===s&&(S="scrollHeight",x="scrollWidth"),(i===dS||(i===bS||i===gS)&&a===yS)&&(y=pS,g-=(f&&_===E&&E.visualViewport?E.visualViewport.height:_[S])-r.height,g*=c?1:-1),i!==bS&&(i!==dS&&i!==pS||a!==yS)||(v=gS,d-=(f&&_===E&&E.visualViewport?E.visualViewport.width:_[x])-r.width,d*=c?1:-1)}var T,A=Object.assign({position:s},l&&DS),k=!0===u?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:Y_(t*r)/r||0,y:Y_(n*r)/r||0}}({x:d,y:g}):{x:d,y:g};return d=k.x,g=k.y,c?Object.assign({},A,((T={})[y]=w?"0":"",T[v]=m?"0":"",T.transform=(E.devicePixelRatio||1)<=1?"translate("+d+"px, "+g+"px)":"translate3d("+d+"px, "+g+"px, 0)",T)):Object.assign({},A,((t={})[y]=w?g+"px":"",t[v]=m?d+"px":"",t.transform="",t))}const US={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,a=n.adaptive,o=void 0===a||a,s=n.roundOffsets,c=void 0===s||s,l={placement:NS(t.placement),variation:RS(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,FS(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,FS(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},jS={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];V_(i)&&eS(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});V_(r)&&eS(r)&&(Object.assign(r.style,a),Object.keys(i).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},BS={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=void 0===i?[0,0]:i,o=xS.reduce((function(e,n){return e[n]=function(e,t,n){var r=NS(e),i=[bS,dS].indexOf(r)>=0?-1:1,a="function"==typeof n?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[bS,gS].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}(n,t.rects,a),e}),{}),s=o[t.placement],c=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}};var zS={left:"right",right:"left",bottom:"top",top:"bottom"};function $S(e){return e.replace(/left|right|bottom|top/g,(function(e){return zS[e]}))}var HS={start:"end",end:"start"};function GS(e){return e.replace(/start|end/g,(function(e){return HS[e]}))}function VS(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&W_(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function WS(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function qS(e,t,n){return t===ES?WS(function(e,t){var n=H_(e),r=tS(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=Z_();(l||!l&&"fixed"===t)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+nS(e),y:c}}(e,n)):G_(t)?function(e,t){var n=Q_(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):WS(function(e){var t,n=tS(e),r=J_(e),i=null==(t=e.ownerDocument)?void 0:t.body,a=q_(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=q_(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+nS(e),c=-r.scrollTop;return"rtl"===rS(i||n).direction&&(s+=q_(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:c}}(tS(e)))}function XS(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function YS(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function KS(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,a=n.strategy,o=void 0===a?e.strategy:a,s=n.boundary,c=void 0===s?"clippingParents":s,l=n.rootBoundary,u=void 0===l?ES:l,f=n.elementContext,h=void 0===f?_S:f,d=n.altBoundary,p=void 0!==d&&d,g=n.padding,b=void 0===g?0:g,m=XS("number"!=typeof b?b:YS(b,wS)),w=h===_S?"reference":_S,v=e.rects.popper,y=e.elements[p?w:h],E=function(e,t,n,r){var i="clippingParents"===t?function(e){var t=lS(sS(e)),n=["absolute","fixed"].indexOf(rS(e).position)>=0&&V_(e)?hS(e):e;return G_(n)?t.filter((function(e){return G_(e)&&VS(e,n)&&"body"!==eS(e)})):[]}(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce((function(t,n){var i=qS(e,n,r);return t.top=q_(i.top,t.top),t.right=X_(i.right,t.right),t.bottom=X_(i.bottom,t.bottom),t.left=q_(i.left,t.left),t}),qS(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(G_(y)?y:y.contextElement||tS(e.elements.popper),c,u,o),_=Q_(e.elements.reference),S=LS({reference:_,element:v,strategy:"absolute",placement:i}),x=WS(Object.assign({},v,S)),T=h===_S?x:_,A={top:E.top-T.top+m.top,bottom:T.bottom-E.bottom+m.bottom,left:E.left-T.left+m.left,right:T.right-E.right+m.right},k=e.modifiersData.offset;if(h===_S&&k){var C=k[i];Object.keys(A).forEach((function(e){var t=[gS,pS].indexOf(e)>=0?1:-1,n=[dS,pS].indexOf(e)>=0?"y":"x";A[e]+=C[n]*t}))}return A}const ZS={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=void 0===i||i,o=n.altAxis,s=void 0===o||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,f=n.rootBoundary,h=n.altBoundary,d=n.flipVariations,p=void 0===d||d,g=n.allowedAutoPlacements,b=t.options.placement,m=NS(b),w=c||(m!==b&&p?function(e){if(NS(e)===mS)return[];var t=$S(e);return[GS(e),t,GS(t)]}(b):[$S(b)]),v=[b].concat(w).reduce((function(e,n){return e.concat(NS(n)===mS?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=void 0===c?xS:c,u=RS(r),f=u?s?SS:SS.filter((function(e){return RS(e)===u})):wS,h=f.filter((function(e){return l.indexOf(e)>=0}));0===h.length&&(h=f);var d=h.reduce((function(t,n){return t[n]=KS(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[NS(n)],t}),{});return Object.keys(d).sort((function(e,t){return d[e]-d[t]}))}(t,{placement:n,boundary:u,rootBoundary:f,padding:l,flipVariations:p,allowedAutoPlacements:g}):n)}),[]),y=t.rects.reference,E=t.rects.popper,_=new Map,S=!0,x=v[0],T=0;T=0,I=M?"width":"height",O=KS(t,{placement:A,boundary:u,rootBoundary:f,altBoundary:h,padding:l}),N=M?C?gS:bS:C?pS:dS;y[I]>E[I]&&(N=$S(N));var R=$S(N),P=[];if(a&&P.push(O[k]<=0),s&&P.push(O[N]<=0,O[R]<=0),P.every((function(e){return e}))){x=A,S=!1;break}_.set(A,P)}if(S)for(var L=function(e){var t=v.find((function(t){var n=_.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return x=t,"break"},D=p?3:1;D>0&&"break"!==L(D);D--);t.placement!==x&&(t.modifiersData[r]._skip=!0,t.placement=x,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function QS(e,t,n){return q_(e,X_(t,n))}const JS={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=void 0===i||i,o=n.altAxis,s=void 0!==o&&o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,f=n.padding,h=n.tether,d=void 0===h||h,p=n.tetherOffset,g=void 0===p?0:p,b=KS(t,{boundary:c,rootBoundary:l,padding:f,altBoundary:u}),m=NS(t.placement),w=RS(t.placement),v=!w,y=PS(m),E="x"===y?"y":"x",_=t.modifiersData.popperOffsets,S=t.rects.reference,x=t.rects.popper,T="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,A="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,C={x:0,y:0};if(_){if(a){var M,I="y"===y?dS:bS,O="y"===y?pS:gS,N="y"===y?"height":"width",R=_[y],P=R+b[I],L=R-b[O],D=d?-x[N]/2:0,F=w===vS?S[N]:x[N],U=w===vS?-x[N]:-S[N],j=t.elements.arrow,B=d&&j?oS(j):{width:0,height:0},z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},$=z[I],H=z[O],G=QS(0,S[N],B[N]),V=v?S[N]/2-D-G-$-A.mainAxis:F-G-$-A.mainAxis,W=v?-S[N]/2+D+G+H+A.mainAxis:U+G+H+A.mainAxis,q=t.elements.arrow&&hS(t.elements.arrow),X=q?"y"===y?q.clientTop||0:q.clientLeft||0:0,Y=null!=(M=null==k?void 0:k[y])?M:0,K=R+W-Y,Z=QS(d?X_(P,R+V-Y-X):P,R,d?q_(L,K):L);_[y]=Z,C[y]=Z-R}if(s){var Q,J="x"===y?dS:bS,ee="x"===y?pS:gS,te=_[E],ne="y"===E?"height":"width",re=te+b[J],ie=te-b[ee],ae=-1!==[dS,bS].indexOf(m),oe=null!=(Q=null==k?void 0:k[E])?Q:0,se=ae?re:te-S[ne]-x[ne]-oe+A.altAxis,ce=ae?te+S[ne]+x[ne]-oe-A.altAxis:ie,le=d&&ae?function(e,t,n){var r=QS(e,t,n);return r>n?n:r}(se,te,ce):QS(d?se:re,te,d?ce:ie);_[E]=le,C[E]=le-te}t.modifiersData[r]=C}},requiresIfExists:["offset"]},ex={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=NS(n.placement),c=PS(s),l=[bS,gS].indexOf(s)>=0?"height":"width";if(a&&o){var u=function(e,t){return XS("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:YS(e,wS))}(i.padding,n),f=oS(a),h="y"===c?dS:bS,d="y"===c?pS:gS,p=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],g=o[c]-n.rects.reference[c],b=hS(a),m=b?"y"===c?b.clientHeight||0:b.clientWidth||0:0,w=p/2-g/2,v=u[h],y=m-f[l]-u[d],E=m/2-f[l]/2+w,_=QS(v,E,y),S=c;n.modifiersData[r]=((t={})[S]=_,t.centerOffset=_-E,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&VS(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function tx(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function nx(e){return[dS,gS,pS,bS].some((function(t){return e[t]>=0}))}var rx=MS({defaultModifiers:[OS,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=LS({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},US,jS,BS,ZS,JS,ex,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=KS(t,{elementContext:"reference"}),s=KS(t,{altBoundary:!0}),c=tx(o,r),l=tx(s,i,a),u=nx(c),f=nx(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}}]}),ix=n(9325),ax=n.n(ix),ox=[],sx=function(){},cx=function(){return Promise.resolve(null)},lx=[];function ux(n){var r=n.placement,i=void 0===r?"bottom":r,a=n.strategy,o=void 0===a?"absolute":a,s=n.modifiers,c=void 0===s?lx:s,l=n.referenceElement,u=n.onFirstUpdate,f=n.innerRef,h=n.children,d=e.useContext(B_),p=e.useState(null),g=p[0],b=p[1],m=e.useState(null),w=m[0],v=m[1];e.useEffect((function(){!function(e,t){if("function"==typeof e)return function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r!(!e||"object"!=typeof e)&&("store"in e&&"loadedPages"in e&&"totalPages"in e),Ix=(0,e.createContext)(null),Ox=({children:t})=>{const{apiUrl:n}=tb(),[r,i]=(0,e.useState)(!0),[a,o]=(0,e.useState)({}),[s,c]=(0,e.useState)([]),[l,u]=(0,e.useState)(!1),[f,h]=(0,e.useState)(0),[d,p]=(0,e.useState)(0),[g,b]=(0,e.useState)(!1),[m,w]=(0,e.useState)(!1),[v,y]=(0,e.useState)(null),E=(0,e.useRef)(a),_=(0,e.useRef)(f),S=(0,e.useRef)(d),x=(0,e.useRef)(m),T=(0,e.useRef)(!1),A=(0,e.useRef)(null),k=(0,e.useRef)(!1);(0,e.useEffect)((()=>{E.current=a}),[a]),(0,e.useEffect)((()=>{_.current=f}),[f]),(0,e.useEffect)((()=>{S.current=d}),[d]),(0,e.useEffect)((()=>{x.current=m}),[m]);const C=(0,e.useCallback)((e=>"CRE"===e.doctype?e.id:"Standard"===e.doctype?e.name:`${e.name}-${e.sectionID}-${e.section}`),[]),M=(0,e.useCallback)(((e,t,n=[])=>{var r;const i=C(e);n.push(i);const a=structuredClone(null!==(r=t[i])&&void 0!==r?r:e),o=a.links||[];let s=o.filter((e=>!!e.document&&!n.includes(C(e.document))&&C(e.document)in t));s=s.filter((e=>"Contains"===e.ltype)),s=s.map((e=>({ltype:e.ltype,document:M(e.document,t,n)}))),a.links=[...s];const c=o.filter((e=>e.document&&"Standard"===e.document.doctype&&!n.includes(C(e.document))));return a.links=[...s,...c],a}),[C]),I=(0,e.useCallback)(((e,t,n,r,i)=>Ax(void 0,void 0,void 0,(function*(){const a={store:e,loadedPages:t,totalPages:n,isFullStoreLoaded:r};yield hw(kx,a,mt),i&&(yield hw(Cx,i,mt))}))),[]),O=(0,e.useCallback)((e=>Ax(void 0,void 0,void 0,(function*(){if(!Object.keys(e).length)return c([]),[];const t=(yield cn().get(`${n}/root_cres`)).data.data.map((t=>M(t,e)));return c(t),t}))),[n,M]),N=(0,e.useCallback)((e=>Ax(void 0,void 0,void 0,(function*(){if(T.current)return E.current;T.current=!0,b(!0);try{const t=yield cn().get(`${n}/all_cres`,{params:{page:e,per_page:20}}),r=t.data.data||[],i=Number(t.data.total_pages)||1,a=((e,t,n)=>{const r=Object.assign({},t);return e.forEach((e=>{r[n(e)]=(e=>{var t;return Object.assign({links:null!==(t=e.links)&&void 0!==t?t:[],displayName:ow(e),url:aw(e)},e)})(e)})),r})(r,E.current,C),s=e;E.current=a,o(a),h(s),p(i),_.current=s,S.current=i;const c=s>=i;c&&(x.current=!0,w(!0));const l=yield O(a);return yield I(a,s,i,c,l),a}finally{T.current=!1,b(!1)}}))),[n,C,I,O]),R=(0,e.useCallback)((()=>Ax(void 0,void 0,void 0,(function*(){if(x.current)return;const e=_.current+1;e>S.current&&S.current>0||(yield N(e))}))),[N]),P=(0,e.useCallback)((()=>Ax(void 0,void 0,void 0,(function*(){if(A.current)return A.current;A.current=Ax(void 0,void 0,void 0,(function*(){for(y(null),_.current||(yield N(1));_.current{Ax(void 0,void 0,void 0,(function*(){const e=yield fw(kx),t=yield fw(Cx);if(Mx(e)&&Object.keys(e.store).length>0)E.current=e.store,o(e.store),h(e.loadedPages),p(e.totalPages),_.current=e.loadedPages,S.current=e.totalPages,x.current=e.isFullStoreLoaded,w(e.isFullStoreLoaded),(null==t?void 0:t.length)&&c(t);else if(e&&"object"==typeof e&&!Mx(e)){const n=e;E.current=n,o(n),x.current=!0,w(!0),(null==t?void 0:t.length)&&c(t)}u(!0)}))}),[]),(0,e.useEffect)((()=>{l&&!k.current&&(k.current=!0,Ax(void 0,void 0,void 0,(function*(){i(!0);try{0!==_.current||x.current?Object.keys(E.current).length&&(yield O(E.current)):yield N(1)}finally{i(!1)}})))}),[l,N,O]),(0,e.useEffect)((()=>{if(!l||m||0===f)return;const e=window.requestIdleCallback,t=window.cancelIdleCallback,n=()=>{!x.current&&_.currentnull==t?void 0:t(r)}const r=window.setTimeout(n,2e3);return()=>window.clearTimeout(r)}),[l,m,f,d,R]);const L=!m&&f>0&&f{const t=(0,e.useContext)(Ix);if(!t)throw new Error("useDataStore must be used within a DataProvider");return t};var Rx=n(7025);function Px(t){var n=t.children,r=t.className,i=qf(r),a=rh(Px,t),o=ih(Px,t);return e.createElement(o,(0,ve.A)({},a,{className:i}),n)}i()(Rx.A,{insert:"head",singleton:!1}),Rx.A.locals,Px.handledProps=["as","children","className"],Px.defaultProps={as:"tbody"},Px.propTypes={};const Lx=Px;function Dx(t){var n=t.active,r=t.children,i=t.className,a=t.collapsing,o=t.content,s=t.disabled,c=t.error,l=t.icon,u=t.negative,f=t.positive,h=t.selectable,d=t.singleLine,p=t.textAlign,g=t.verticalAlign,b=t.warning,m=t.width,w=qf(Kf(n,"active"),Kf(a,"collapsing"),Kf(s,"disabled"),Kf(c,"error"),Kf(u,"negative"),Kf(f,"positive"),Kf(h,"selectable"),Kf(d,"single line"),Kf(b,"warning"),eh(p),th(g),nh(m,"wide"),i),v=rh(Dx,t),y=ih(Dx,t);return Kp(r)?e.createElement(y,(0,ve.A)({},v,{className:w}),Bg.create(l),o):e.createElement(y,(0,ve.A)({},v,{className:w}),r)}Dx.handledProps=["active","as","children","className","collapsing","content","disabled","error","icon","negative","positive","selectable","singleLine","textAlign","verticalAlign","warning","width"],Dx.defaultProps={as:"td"},Dx.propTypes={},Dx.create=yg(Dx,(function(e){return{content:e}}));const Fx=Dx;function Ux(t){var n=t.children,r=t.className,i=t.content,a=t.fullWidth,o=qf(Kf(a,"full-width"),r),s=rh(Ux,t),c=ih(Ux,t);return e.createElement(c,(0,ve.A)({},s,{className:o}),Kp(n)?i:n)}Ux.handledProps=["as","children","className","content","fullWidth"],Ux.defaultProps={as:"thead"},Ux.propTypes={};const jx=Ux;function Bx(t){var n=t.as,r=rh(Bx,t);return e.createElement(jx,(0,ve.A)({},r,{as:n}))}Bx.handledProps=["as"],Bx.propTypes={},Bx.defaultProps={as:"tfoot"};const zx=Bx;function $x(t){var n=t.as,r=t.className,i=t.sorted,a=qf(Zf(i,"sorted"),r),o=rh($x,t);return e.createElement(Fx,(0,ve.A)({},o,{as:n,className:a}))}$x.handledProps=["as","className","sorted"],$x.propTypes={},$x.defaultProps={as:"th"};const Hx=$x;function Gx(t){var n=t.active,r=t.cellAs,i=t.cells,a=t.children,o=t.className,s=t.disabled,c=t.error,l=t.negative,u=t.positive,f=t.textAlign,h=t.verticalAlign,d=t.warning,p=qf(Kf(n,"active"),Kf(s,"disabled"),Kf(c,"error"),Kf(l,"negative"),Kf(u,"positive"),Kf(d,"warning"),eh(f),th(h),o),g=rh(Gx,t),b=ih(Gx,t);return Kp(a)?e.createElement(b,(0,ve.A)({},g,{className:p}),Wg(i,(function(e){return Fx.create(e,{defaultProps:{as:r}})}))):e.createElement(b,(0,ve.A)({},g,{className:p}),a)}Gx.handledProps=["active","as","cellAs","cells","children","className","disabled","error","negative","positive","textAlign","verticalAlign","warning"],Gx.defaultProps={as:"tr",cellAs:"td"},Gx.propTypes={},Gx.create=yg(Gx,(function(e){return{cells:e}}));const Vx=Gx;function Wx(t){var n=t.attached,r=t.basic,i=t.celled,a=t.children,o=t.className,s=t.collapsing,c=t.color,l=t.columns,u=t.compact,f=t.definition,h=t.fixed,d=t.footerRow,p=t.headerRow,g=t.headerRows,b=t.inverted,m=t.padded,w=t.renderBodyRow,v=t.selectable,y=t.singleLine,E=t.size,_=t.sortable,S=t.stackable,x=t.striped,T=t.structured,A=t.tableData,k=t.textAlign,C=t.unstackable,M=t.verticalAlign,I=qf("ui",c,E,Kf(i,"celled"),Kf(s,"collapsing"),Kf(f,"definition"),Kf(h,"fixed"),Kf(b,"inverted"),Kf(v,"selectable"),Kf(y,"single line"),Kf(_,"sortable"),Kf(S,"stackable"),Kf(x,"striped"),Kf(T,"structured"),Kf(C,"unstackable"),Qf(n,"attached"),Qf(r,"basic"),Qf(u,"compact"),Qf(m,"padded"),eh(k),th(M),nh(l,"column"),"table",o),O=rh(Wx,t),N=ih(Wx,t);if(!Kp(a))return e.createElement(N,(0,ve.A)({},O,{className:I}),a);var R={defaultProps:{cellAs:"th"}},P=(p||g)&&e.createElement(jx,null,Vx.create(p,R),Wg(g,(function(e){return Vx.create(e,R)})));return e.createElement(N,(0,ve.A)({},O,{className:I}),P,e.createElement(Lx,null,w&&Wg(A,(function(e,t){return Vx.create(w(e,t))}))),d&&e.createElement(zx,null,Vx.create(d)))}Wx.handledProps=["as","attached","basic","celled","children","className","collapsing","color","columns","compact","definition","fixed","footerRow","headerRow","headerRows","inverted","padded","renderBodyRow","selectable","singleLine","size","sortable","stackable","striped","structured","tableData","textAlign","unstackable","verticalAlign"],Wx.defaultProps={as:"table"},Wx.propTypes={},Wx.Body=Lx,Wx.Cell=Fx,Wx.Footer=zx,Wx.Header=jx,Wx.HeaderCell=Hx,Wx.Row=Vx;const qx=Wx,Xx=({dataStore:t})=>{const n=(e=>{const t={},n={};return Object.values(e).forEach((e=>{t[e.id]||(t[e.id]=0),n[e.id]||(n[e.id]={}),e.links&&e.links.forEach((r=>{if(!r.document)return;const i=r.document.id;t[i]||(t[i]=0),"Contains"===r.ltype&&(t[i]=(t[i]||0)+1),n[e.id][r.ltype]=(n[e.id][r.ltype]||0)+1}))})),Object.values(e).filter((e=>"CRE"===e.doctype)).map((e=>({id:e.id,displayName:e.displayName,doctype:e.doctype,inDegree:t[e.id]||0,outDegree:e.links?e.links.length:0,isRoot:0===(t[e.id]||0),linkTypes:n[e.id]||{}}))).sort(((e,t)=>(t.isRoot?1:0)-(e.isRoot?1:0)))})(t),r=n.filter((e=>e.isRoot)).length,i=n.length;return e.createElement("div",{className:"graph-debug-panel"},e.createElement("div",{className:"graph-debug-panel__header"},e.createElement(Bg,{name:"bug"}),e.createElement("strong",null,"Graph Debug Info"),e.createElement("span",{className:"graph-debug-panel__summary"},i," CRE nodes — ",r," roots")),e.createElement("div",{className:"graph-debug-panel__legend"},e.createElement(Jw,{size:"tiny",color:"green"},"Root"),e.createElement("span",null," = no incoming Contains links")),e.createElement("div",{className:"graph-debug-panel__table-wrap"},e.createElement(qx,{compact:!0,size:"small",celled:!0,unstackable:!0,className:"graph-debug-panel__table"},e.createElement(qx.Header,null,e.createElement(qx.Row,null,e.createElement(qx.HeaderCell,null,"Node"),e.createElement(qx.HeaderCell,null,"Root?"),e.createElement(qx.HeaderCell,null,"In"),e.createElement(qx.HeaderCell,null,"Out"),e.createElement(qx.HeaderCell,null,"Link Types"))),e.createElement(qx.Body,null,n.map((t=>e.createElement(qx.Row,{key:t.id,positive:t.isRoot},e.createElement(qx.Cell,null,e.createElement("span",{className:"graph-debug-panel__node-name",title:t.displayName},t.id)),e.createElement(qx.Cell,{textAlign:"center"},t.isRoot&&e.createElement(Jw,{size:"tiny",color:"green"},"Root")),e.createElement(qx.Cell,{textAlign:"center"},t.inDegree),e.createElement(qx.Cell,{textAlign:"center"},t.outDegree),e.createElement(qx.Cell,null,e.createElement(j_,{horizontal:!0,size:"mini"},Object.entries(t.linkTypes).map((([t,n])=>e.createElement(j_.Item,{key:t},e.createElement(Jw,{size:"mini"},t,e.createElement(Jw.Detail,null,n))))))))))))))};var Yx=n(4743);i()(Yx.A,{insert:"head",singleton:!1}),Yx.A.locals;const Kx=({creCode:t,linkedTo:n,applyHighlight:r,filter:i})=>{function a(e,t){return`/cre/${t}?applyFilters=true&filters=${e.document.name}&filters=sources`}function o(e,t){if(!e.document.hyperlink)return!1;const n=t.reduce(((t,n)=>t+(n.document.name!==e.document.name?0:1)),0);return n<=1}const s=function(e){const t=new Set;return e.filter((e=>{const n=t.has(e.document.name);return t.add(e.document.name),!n}))}(n);return e.createElement(j_.Description,null,e.createElement(Jw.Group,{size:"small",className:"tags"},s.map((s=>e.createElement(e.Fragment,{key:s.document.name},o(s,n)&&e.createElement("a",{href:s.document.hyperlink,target:"_blank",rel:"noopener noreferrer"},e.createElement(Jw,null,e.createElement(Bg,{name:"external"}),r(s.document.name,i))),!o(s,n)&&e.createElement(dt,{to:a(s,t)},e.createElement(Jw,null,r(s.document.name,i))))))))},Zx=()=>{const{dataLoading:t,dataTree:n,dataStore:r,hasMore:i,isLoadingMore:a,loadNextPage:o}=Nx(),[s,c]=(0,e.useState)(!1),[l,u]=(0,e.useState)(""),[f,h]=(0,e.useState)(),[d,p]=(0,e.useState)(!1),g=e.useRef(null),b=(t,n)=>{if(!n)return t;let r=t.toLowerCase().indexOf(n);return r>=0?e.createElement(e.Fragment,null,t.substring(0,r),e.createElement("span",{className:"highlight"},t.substring(r,r+n.length)),t.substring(r+n.length)):t},m=(e,t)=>{var n,r;return(null===(n=null==e?void 0:e.displayName)||void 0===n?void 0:n.toLowerCase().includes(t))||(null===(r=null==e?void 0:e.name)||void 0===r?void 0:r.toLowerCase().includes(t))},w=(e,t)=>{var n;if(e.links){const n=[];e.links.forEach((e=>{const r=w(e.document,t);(m(e.document,t)||r)&&n.push({ltype:e.ltype,document:r||e.document})})),e.links=n}return m(e,t)||(null===(n=e.links)||void 0===n?void 0:n.length)?e:null},[v,y]=(0,e.useState)([]),E=e=>v.includes(e);function _(t){var n,r,i;if(!t)return e.createElement(e.Fragment,null);t.displayName=null!==(n=t.displayName)&&void 0!==n?n:ow(t),t.url=null!==(r=t.url)&&void 0!==r?r:aw(t),t.links=null!==(i=t.links)&&void 0!==i?i:[];const a=t.links.filter((e=>e.ltype===Et)),o=t.links.filter((e=>e.ltype===vt)),s=t.id,c=ow(t);return e.createElement(j_.Item,{key:Math.random()},e.createElement(j_.Content,null,e.createElement(j_.Header,null,a.length>0&&e.createElement("div",{className:"arrow "+(E(t.id)?"":"active"),onClick:()=>(e=>{v.includes(e)?y(v.filter((t=>t!==e))):y([...v,e])})(t.id)},e.createElement("i",{"aria-hidden":"true",className:"dropdown icon"})),e.createElement(dt,{to:t.url},e.createElement("span",{className:"cre-name"},b(c,l)))),e.createElement(Kx,{linkedTo:o,applyHighlight:b,creCode:s,filter:l}),a.length>0&&!E(t.id)&&e.createElement(j_.List,null,a.map((e=>_(e.document))))))}return(0,e.useEffect)((()=>{if(n.length){const e=structuredClone(n),t=[];e.map((e=>w(e,l))).forEach((e=>{e&&t.push(e)})),h(t)}}),[l,n,h]),(0,e.useEffect)((()=>{c(t)}),[t]),(0,e.useEffect)((()=>{const e=g.current;if(!e||!i)return;const t=new IntersectionObserver((e=>{e.some((e=>e.isIntersecting))&&o()}),{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()}),[i,o,f]),e.createElement(e.Fragment,null,e.createElement("main",{id:"explorer-content"},e.createElement("h1",null,"Open CRE Explorer"),e.createElement("p",null,"A visual explorer of Open Common Requirement Enumerations (CREs). Originally created by:"," ",e.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://zeljkoobrenovic.github.io/opencre-explorer/"},"Zeljko Obrenovic"),"."),e.createElement("div",{id:"explorer-wrapper"},e.createElement("div",{className:"search-field"},e.createElement("input",{id:"filter",type:"text",placeholder:"Search Explorer...",onKeyUp:function(e){u(e.target.value.toLowerCase())}}),e.createElement("div",{id:"search-summary"})),e.createElement("div",{id:"graphs-menu"},e.createElement("h4",{className:"menu-title"},"Explore visually:"),e.createElement("ul",null,e.createElement("li",null,e.createElement("a",{href:"/explorer/force_graph"},"Dependency Graph")),e.createElement("li",null,e.createElement("a",{href:"/explorer/circles"},"Zoomable circles")))),e.createElement("div",{id:"debug-toggle",style:{display:"flex",alignItems:"center",gap:"8px"}},e.createElement(Ry,{toggle:!0,label:"Debug mode",checked:d,onChange:()=>p(!d)}),e.createElement(Tx,{content:"Debug mode shows graph connectivity stats and link type details for each CRE node.",trigger:e.createElement("span",{style:{cursor:"help",color:"#666",fontSize:"14px",border:"1px solid #666",borderRadius:"50%",padding:"0 4px",fontWeight:"bold"}},"?")}))),d&&e.createElement(Xx,{dataStore:r}),e.createElement(Qg,{loading:s,error:null}),e.createElement(j_,null,null==f?void 0:f.map((e=>_(e)))),e.createElement("div",{ref:g,style:{height:1}}),a&&i&&e.createElement("p",{className:"explorer-load-more"},"Loading more requirements…")))},Qx=({children:t})=>e.createElement(Ox,null,t);function Jx(t){const n=n=>e.createElement(Qx,null,e.createElement(t,Object.assign({},n)));return n.displayName=`ExplorerLayout(${t.displayName||t.name||"Component"})`,n}var eT=n(527);function tT(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}function nT(){}function rT(e){return null==e?nT:function(){return this.querySelector(e)}}function iT(){return[]}function aT(e){return null==e?iT:function(){return this.querySelectorAll(e)}}function oT(e){return function(){return this.matches(e)}}function sT(e){return function(t){return t.matches(e)}}i()(eT.A,{insert:"head",singleton:!1}),eT.A.locals;var cT=Array.prototype.find;function lT(){return this.firstElementChild}var uT=Array.prototype.filter;function fT(){return Array.from(this.children)}function hT(e){return new Array(e.length)}function dT(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function pT(e,t,n,r,i,a){for(var o,s=0,c=t.length,l=a.length;st?1:e>=t?0:NaN}dT.prototype={constructor:dT,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var vT="http://www.w3.org/1999/xhtml";const yT={svg:"http://www.w3.org/2000/svg",xhtml:vT,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ET(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),yT.hasOwnProperty(t)?{space:yT[t],local:e}:e}function _T(e){return function(){this.removeAttribute(e)}}function ST(e){return function(){this.removeAttributeNS(e.space,e.local)}}function xT(e,t){return function(){this.setAttribute(e,t)}}function TT(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function AT(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function kT(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function CT(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function MT(e){return function(){this.style.removeProperty(e)}}function IT(e,t,n){return function(){this.style.setProperty(e,t,n)}}function OT(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function NT(e,t){return e.style.getPropertyValue(t)||CT(e).getComputedStyle(e,null).getPropertyValue(t)}function RT(e){return function(){delete this[e]}}function PT(e,t){return function(){this[e]=t}}function LT(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function DT(e){return e.trim().split(/^|\s+/)}function FT(e){return e.classList||new UT(e)}function UT(e){this._node=e,this._names=DT(e.getAttribute("class")||"")}function jT(e,t){for(var n=FT(e),r=-1,i=t.length;++r=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var uA=[null];function fA(e,t){this._groups=e,this._parents=t}function hA(){return new fA([[document.documentElement]],uA)}fA.prototype=hA.prototype={constructor:fA,select:function(e){"function"!=typeof e&&(e=rT(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=y&&(y=v+1);!(w=b[y])&&++y=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=wT);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==t?MT:"function"==typeof t?OT:IT)(e,t,null==n?"":n)):NT(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?RT:"function"==typeof t?LT:PT)(e,t)):this.node()[e]},classed:function(e,t){var n=DT(e+"");if(arguments.length<2){for(var r=FT(this.node()),i=-1,a=n.length;++i=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),o=a.length;if(!(arguments.length<2)){for(s=t?oA:aA,r=0;r{}};function gA(){for(var e,t=0,n=arguments.length,r={};t=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o0)for(var n,r,i=new Array(n),a=0;a=0&&t._call.call(void 0,e),t=t._next;--_A}()}finally{_A=0,function(){for(var e,t,n=yA,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:yA=t);EA=e,FA(r)}(),kA=0}}function DA(){var e=MA.now(),t=e-AA;t>TA&&(CA-=t,AA=e)}function FA(e){_A||(SA&&(SA=clearTimeout(SA)),e-kA>24?(e<1/0&&(SA=setTimeout(LA,e-MA.now()-CA)),xA&&(xA=clearInterval(xA))):(xA||(AA=MA.now(),xA=setInterval(DA,TA)),_A=1,IA(LA)))}function UA(e,t,n){var r=new RA;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}RA.prototype=PA.prototype={constructor:RA,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?OA():+n)+(null==t?0:+t),this._next||EA===this||(EA?EA._next=this:yA=this,EA=this),this._call=e,this._time=n,FA()},stop:function(){this._call&&(this._call=null,this._time=1/0,FA())}};var jA=vA("start","end","cancel","interrupt"),BA=[],zA=0,$A=3;function HA(e,t,n,r,i,a){var o=e.__transition;if(o){if(n in o)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function a(c){var l,u,f,h;if(1!==n.state)return s();for(l in i)if((h=i[l]).name===n.name){if(h.state===$A)return UA(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete i[l]):+lzA)throw new Error("too late; already scheduled");return n}function VA(e,t){var n=WA(e,t);if(n.state>$A)throw new Error("too late; already running");return n}function WA(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function qA(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var XA,YA=180/Math.PI,KA={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ZA(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:qA(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(a.rotate,o.rotate,s,c),function(e,t,n,a){e!==t?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:qA(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(a.skewX,o.skewX,s,c),function(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:qA(e,n)},{i:s-2,x:qA(t,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(e){for(var t,n=-1,r=c.length;++n>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?xk(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?xk(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=dk.exec(e))?new kk(t[1],t[2],t[3],1):(t=pk.exec(e))?new kk(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=gk.exec(e))?xk(t[1],t[2],t[3],t[4]):(t=bk.exec(e))?xk(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=mk.exec(e))?Rk(t[1],t[2]/100,t[3]/100,1):(t=wk.exec(e))?Rk(t[1],t[2]/100,t[3]/100,t[4]):vk.hasOwnProperty(e)?Sk(vk[e]):"transparent"===e?new kk(NaN,NaN,NaN,0):null}function Sk(e){return new kk(e>>16&255,e>>8&255,255&e,1)}function xk(e,t,n,r){return r<=0&&(e=t=n=NaN),new kk(e,t,n,r)}function Tk(e){return e instanceof ok||(e=_k(e)),e?new kk((e=e.rgb()).r,e.g,e.b,e.opacity):new kk}function Ak(e,t,n,r){return 1===arguments.length?Tk(e):new kk(e,t,n,null==r?1:r)}function kk(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Ck(){return`#${Nk(this.r)}${Nk(this.g)}${Nk(this.b)}`}function Mk(){const e=Ik(this.opacity);return`${1===e?"rgb(":"rgba("}${Ok(this.r)}, ${Ok(this.g)}, ${Ok(this.b)}${1===e?")":`, ${e})`}`}function Ik(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ok(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Nk(e){return((e=Ok(e))<16?"0":"")+e.toString(16)}function Rk(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Lk(e,t,n,r)}function Pk(e){if(e instanceof Lk)return new Lk(e.h,e.s,e.l,e.opacity);if(e instanceof ok||(e=_k(e)),!e)return new Lk;if(e instanceof Lk)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+6*(n0&&c<1?0:o,new Lk(o,s,c,e.opacity)}function Lk(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Dk(e){return(e=(e||0)%360)<0?e+360:e}function Fk(e){return Math.max(0,Math.min(1,e||0))}function Uk(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function jk(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}ik(ok,_k,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:yk,formatHex:yk,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Pk(this).formatHsl()},formatRgb:Ek,toString:Ek}),ik(kk,Ak,ak(ok,{brighter(e){return e=null==e?ck:Math.pow(ck,e),new kk(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?sk:Math.pow(sk,e),new kk(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new kk(Ok(this.r),Ok(this.g),Ok(this.b),Ik(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ck,formatHex:Ck,formatHex8:function(){return`#${Nk(this.r)}${Nk(this.g)}${Nk(this.b)}${Nk(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Mk,toString:Mk})),ik(Lk,(function(e,t,n,r){return 1===arguments.length?Pk(e):new Lk(e,t,n,null==r?1:r)}),ak(ok,{brighter(e){return e=null==e?ck:Math.pow(ck,e),new Lk(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?sk:Math.pow(sk,e),new Lk(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new kk(Uk(e>=240?e-240:e+120,i,r),Uk(e,i,r),Uk(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Lk(Dk(this.h),Fk(this.s),Fk(this.l),Ik(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Ik(this.opacity);return`${1===e?"hsl(":"hsla("}${Dk(this.h)}, ${100*Fk(this.s)}%, ${100*Fk(this.l)}%${1===e?")":`, ${e})`}`}}));const Bk=e=>()=>e;function zk(e,t){return function(n){return e+n*t}}function $k(e,t){var n=t-e;return n?zk(e,n):Bk(isNaN(e)?t:e)}const Hk=function e(t){var n=function(e){return 1==(e=+e)?$k:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Bk(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=Ak(e)).r,(t=Ak(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=$k(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+""}}return r.gamma=e,r}(1);function Gk(e){return function(t){var n,r,i=t.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=ra&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:qA(n,r)})),a=Wk.lastIndex;return a=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?GA:VA;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}(n,e,t))},attr:function(e,t){var n=ET(e),r="transform"===n?ek:Xk;return this.attrTween(e,"function"==typeof t?(n.local?eC:Jk)(n,r,rk(this,"attr."+e,t)):null==t?(n.local?Kk:Yk)(n):(n.local?Qk:Zk)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=ET(e);return this.tween(n,(r.local?tC:nC)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?JA:Xk;return null==t?this.styleTween(e,function(e,t){var n,r,i;return function(){var a=NT(this,e),o=(this.style.removeProperty(e),NT(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}(e,r)).on("end.style."+e,cC(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,i,a;return function(){var o=NT(this,e),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(e),c=s=NT(this,e)),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}(e,r,rk(this,"style."+e,t))).each(function(e,t){var n,r,i,a,o="style."+t,s="end."+o;return function(){var c=VA(this,e),l=c.on,u=null==c.value[o]?a||(a=cC(t)):void 0;l===n&&i===u||(r=(n=l).copy()).on(s,i=u),c.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,i,a=n+"";return function(){var o=NT(this,e);return o===a?null:o===r?i:i=t(r=o,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,a,n)),r}return a._value=t,a}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(rk(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,i=WA(this.node(),n).tween,a=0,o=i.length;a2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete e.__transition}}(this,e)}))},dA.prototype.transition=function(e){var t,n;e instanceof uC?(t=e._id,e=e._name):(t=hC(),(n=pC).time=OA(),e=null==e?null:e+"");for(var r=this._groups,i=r.length,a=0;a=0;)t+=n[r].value;else t=1;e.value=t}function EC(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=SC)):void 0===t&&(t=_C);for(var n,r,i,a,o,s=new AC(e),c=[s];n=c.pop();)if((i=t(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;a>=0;--a)c.push(r=i[a]=new AC(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(TC)}function _C(e){return e.children}function SC(e){return Array.isArray(e)?e[1]:null}function xC(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function TC(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function AC(e){this.data=e,this.depth=this.height=0,this.parent=null}function kC(){return 0}["w","e"].map(vC),["n","s"].map(vC),["n","w","e","s","nw","ne","sw","se"].map(vC),AC.prototype=EC.prototype={constructor:AC,count:function(){return this.eachAfter(yC)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,a=this,o=[a],s=[],c=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r=0;--r)a.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter((function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(n){n!==e&&t.push({source:n.parent,target:n})})),t},copy:function(){return EC(this).eachBefore(xC)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,a=[i];do{for(e=a.reverse(),a=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n0&&n*n>r*r+i*i}function NC(e,t){for(var n=0;n1e-6?(k+Math.sqrt(k*k-4*A*C))/(2*A):C/k);return{x:r+_+S*M,y:i+x+T*M,r:M}}function DC(e,t,n){var r,i,a,o,s=e.x-t.x,c=e.y-t.y,l=s*s+c*c;l?(i=t.r+n.r,i*=i,o=e.r+n.r,i>(o*=o)?(r=(l+o-i)/(2*l),a=Math.sqrt(Math.max(0,o/l-r*r)),n.x=e.x-r*s-a*c,n.y=e.y-r*c+a*s):(r=(l+i-o)/(2*l),a=Math.sqrt(Math.max(0,i/l-r*r)),n.x=t.x+r*s-a*c,n.y=t.y+r*c+a*s)):(n.x=t.x+n.r,n.y=t.y)}function FC(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function UC(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,a=(t.y*n.r+n.y*t.r)/r;return i*i+a*a}function jC(e){this._=e,this.next=null,this.previous=null}function BC(e,t){if(!(a=(e=function(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}(e)).length))return 0;var n,r,i,a,o,s,c,l,u,f,h;if((n=e[0]).x=0,n.y=0,!(a>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(a>2))return n.r+r.r;DC(r,n,i=e[2]),n=new jC(n),r=new jC(r),i=new jC(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;e:for(c=3;c(e=(1664525*e+1013904223)%CC)/CC}();return i.x=t/2,i.y=n/2,e?i.eachBefore(HC(e)).eachAfter(GC(r,.5,a)).eachBefore(VC(1)):i.eachBefore(HC(zC)).eachAfter(GC(kC,1,a)).eachAfter(GC(r,i.r/Math.min(t,n),a)).eachBefore(VC(Math.min(t,n)/(2*i.r))),i}return i.radius=function(t){return arguments.length?(e=function(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}(t),i):e},i.size=function(e){return arguments.length?(t=+e[0],n=+e[1],i):[t,n]},i.padding=function(e){return arguments.length?(r="function"==typeof e?e:function(e){return function(){return e}}(+e),i):r},i}function HC(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function GC(e,t,n){return function(r){if(i=r.children){var i,a,o,s=i.length,c=e(r)*t||0;if(c)for(a=0;anM?Math.pow(e,1/3):e/tM+JC}function oM(e){return e>eM?e*e*e:tM*(e-JC)}function sM(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function cM(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function lM(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof uM)return new uM(e.h,e.c,e.l,e.opacity);if(e instanceof iM||(e=rM(e)),0===e.a&&0===e.b)return new uM(NaN,0180||n<-180?n-360*Math.round(n/360):n):Bk(isNaN(e)?t:e)}));hM($k);var pM=Math.sqrt(50),gM=Math.sqrt(10),bM=Math.sqrt(2);function mM(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=pM?10:a>=gM?5:a>=bM?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=pM?10:a>=gM?5:a>=bM?2:1)}function wM(e,t){return null==e||null==t?NaN:et?1:e>=t?0:NaN}function vM(e,t){return null==e||null==t?NaN:te?1:t>=e?0:NaN}function yM(e){let t,n,r;function i(e,r,i=0,a=e.length){if(i>>1;n(e[t],r)<0?i=t+1:a=t}while(iwM(e(t),n),r=(t,n)=>e(t)-n):(t=e===wM||e===vM?e:EM,n=e,r=e),{left:i,center:function(e,t,n=0,a=e.length){const o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o},right:function(e,r,i=0,a=e.length){if(i>>1;n(e[t],r)<=0?i=t+1:a=t}while(i=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function BM(e){if(!(t=jM.exec(e)))throw new Error("invalid format: "+e);var t;return new zM({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function zM(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function $M(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function HM(e){return(e=$M(Math.abs(e)))?e[1]:NaN}function GM(e,t){var n=$M(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}BM.prototype=zM.prototype,zM.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const VM={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>GM(100*e,t),r:GM,s:function(e,t){var n=$M(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(UM=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+$M(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function WM(e){return e}var qM,XM,YM,KM=Array.prototype.map,ZM=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function QM(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,a,o,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t0){let n=Math.round(e/o),r=Math.round(t/o);for(n*ot&&--r,a=new Array(i=r-n+1);++st&&--r,a=new Array(i=r-n+1);++s=pM?i*=10:a>=gM?i*=5:a>=bM&&(i*=2),t0;){if((i=mM(c,l,n))===r)return a[o]=c,a[s]=l,t(a);if(i>0)c=Math.floor(c/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,l=Math.floor(l*i)/i}r=i}return e},e}function JM(){var e=function(){var e,t,n,r,i,a,o=NM,s=NM,c=MM,l=RM;function u(){var e=Math.min(o.length,s.length);return l!==RM&&(l=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(o[0],o[e-1])),r=e>2?DM:LM,i=a=null,f}function f(t){return null==t||isNaN(t=+t)?n:(i||(i=r(o.map(e),s,c)))(e(l(t)))}return f.invert=function(n){return l(t((a||(a=r(s,o.map(e),qA)))(n)))},f.domain=function(e){return arguments.length?(o=Array.from(e,OM),u()):o.slice()},f.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},f.rangeRound=function(e){return s=Array.from(e),c=IM,u()},f.clamp=function(e){return arguments.length?(l=!!e||RM,u()):l!==RM},f.interpolate=function(e){return arguments.length?(c=e,u()):c},f.unknown=function(e){return arguments.length?(n=e,f):n},function(n,r){return e=n,t=r,u()}}()(RM,RM);return e.copy=function(){return t=e,JM().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},FM.apply(e,arguments),QM(e)}function eI(e){return"string"==typeof e?new fA([[document.querySelector(e)]],[document.documentElement]):new fA([[e]],uA)}function tI(e,t,n){this.k=e,this.x=t,this.y=n}qM=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?WM:(t=KM.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,a=[],o=0,s=t[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(e.substring(i-=s,i+s)),!((c+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",a=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?WM:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(KM.call(e.numerals,String)),c=void 0===e.percent?"%":e.percent+"",l=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function f(e){var t=(e=BM(e)).fill,n=e.align,f=e.sign,h=e.symbol,d=e.zero,p=e.width,g=e.comma,b=e.precision,m=e.trim,w=e.type;"n"===w?(g=!0,w="g"):VM[w]||(void 0===b&&(b=12),m=!0,w="g"),(d||"0"===t&&"="===n)&&(d=!0,t="0",n="=");var v="$"===h?i:"#"===h&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",y="$"===h?a:/[%p]/.test(w)?c:"",E=VM[w],_=/[defgprs%]/.test(w);function S(e){var i,a,c,h=v,S=y;if("c"===w)S=E(e)+S,e="";else{var x=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:E(Math.abs(e),b),m&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),x&&0==+e&&"+"!==f&&(x=!1),h=(x?"("===f?f:l:"-"===f||"("===f?"":f)+h,S=("s"===w?ZM[8+UM/3]:"")+S+(x&&"("===f?")":""),_)for(i=-1,a=e.length;++i(c=e.charCodeAt(i))||c>57){S=(46===c?o+e.slice(i+1):e.slice(i))+S,e=e.slice(0,i);break}}g&&!d&&(e=r(e,1/0));var T=h.length+e.length+S.length,A=T>1)+h+e+S+A.slice(T);break;default:e=A+h+e+S}return s(e)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return e+""},S}return{format:f,formatPrefix:function(e,t){var n=f(((e=BM(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(HM(t)/3))),i=Math.pow(10,-r),a=ZM[8+r/3];return function(e){return n(i*e)+a}}}}({thousands:",",grouping:[3],currency:["$",""]}),XM=qM.format,YM=qM.formatPrefix,tI.prototype={constructor:tI,scale:function(e){return 1===e?this:new tI(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new tI(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new tI(1,0,0),tI.prototype;const nI=()=>{const{height:t,width:n}=function(){const[t,n]=(0,e.useState)(tT());return(0,e.useEffect)((()=>{function e(){n(tT())}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),t}(),[r,i]=(0,e.useState)(!1),{dataLoading:a,dataTree:o,ensureFullExplorerData:s,fullLoadProgress:c}=Nx(),[l,u]=(0,e.useState)([]),f=e.useRef(null),h=e.useRef(null),d=e.useRef(null),p=e.useRef(null),g=e.useRef(null),b=e.useRef(null),m=20;(0,e.useEffect)((()=>{s()}),[s]);const w=r?n:n>t?t-100:n;return(0,e.useEffect)((()=>{if(!f.current)return;var e=eI(f.current);e.selectAll("*").remove();var t=w,n=e.append("g").attr("transform","translate("+t/2+","+t/2+")"),r=JM([-1,5],["hsl(152,80%,80%)","hsl(228,30%,40%)"]).interpolate(dM),i=$C().size([t-m,t-m]).padding(2);const a=e=>{e.children=[],e.links&&(e.children=e.links.filter((e=>e.document&&"Related"!==e.ltype)).map((e=>e.document))),e.children.forEach((e=>a(e))),e.children.forEach((e=>{0===e.children.length&&(e.size=1)}))},s=structuredClone(o);s.forEach((e=>a(e)));let c={displayName:"OpenCRE",children:s};c=EC(c).sum((function(e){return e.size})).sort((function(e,t){return t.value-e.value}));var l,v=c,y=i(c).descendants();const E=eI("body").append("div").attr("class","circle-tooltip").style("position","absolute").style("visibility","hidden").style("background-color","white").style("padding","5px").style("border-radius","3px").style("border","1px solid #ccc").style("pointer-events","none").style("z-index","10"),_=e=>{if(e===c)return void u(["OpenCRE"]);let t=[],n=e;for(;n&&n!==c;){if(n.data.displayName&&"OpenCRE"!==n.data.displayName){const e=n.data.displayName.replace(/^CRE: /,"");t.unshift(e)}n=n.parent}t.unshift("OpenCRE"),u(t)};var S=n.selectAll("circle").data(y).enter().append("circle").attr("class",(function(e){return e.parent?e.children?"node":"node node--leaf":"node node--root"})).style("fill",(function(e){return e.children?r(e.depth):e.data.color?e.data.color:null})).style("cursor",(function(e){return!e.children&&e.data.hyperlink?"pointer":"default"})).on("mouseover",(function(e,t){const n=t.data.displayName?t.data.displayName.replace(/^CRE: /,""):t.data.id?t.data.id:"";n&&E.html(n).style("visibility","visible").style("top",e.pageY-10+"px").style("left",e.pageX+10+"px")})).on("mousemove",(function(e){E.style("top",e.pageY-10+"px").style("left",e.pageX+10+"px")})).on("mouseout",(function(){E.style("visibility","hidden")})).on("click",(function(e,t){if(t.children)v!==t&&(_(t),k(e,t),e.stopPropagation());else{e.stopPropagation();const n=t.data.hyperlink;n?(console.log("URL found:",n),window.open(n,"_blank")):console.log("This leaf node does not have a hyperlink.")}}));let x=!0;const T=y.filter((function(e){return e.children}));var A=n.selectAll(".label-group").data(T).enter().append("g").attr("class","label-group").style("opacity",(function(e){return e.parent===v?1:0})).style("display",(function(e){return e.parent===v?"inline":"none"}));function k(e,t){v=t;var n=fC().duration(e.altKey?7500:750).tween("zoom",(function(){var e=qC(l,[v.x,v.y,2*v.r+m]);return function(t){C(e(t))}}));x&&n.selectAll(".label-group").filter((function(e){return e&&e.parent===v||"inline"===this.style.display})).style("opacity",(function(e){return e&&e.parent===v?1:0})).on("start",(function(e){e&&e.parent===v&&(this.style.display="inline")})).on("end",(function(e){e&&e.parent!==v&&(this.style.display="none")}))}function C(e){var n=t/e[2];l=e,g.current=e,S.attr("transform",(function(t){return"translate("+(t.x-e[0])*n+","+(t.y-e[1])*n+")"})),A.attr("transform",(function(t){return"translate("+(t.x-e[0])*n+","+((t.y-e[1])*n-(t.r*n+5))+")"})),S.attr("r",(function(e){return e.r*n}))}return A.append("text").attr("class","label").style("text-anchor","middle").style("text-decoration","underline").text((function(e){if(!e.data.displayName)return"";let t=e.data.displayName;return t=t.replace(/^CRE\s*:\s*\d+-\d+\s*:\s*/,""),t})),A.append("line").attr("class","label-tick").style("stroke","black").style("stroke-width",1).attr("x1",0).attr("y1",2).attr("x2",0).attr("y2",8),e.style("background",r(-1)).on("click",(function(e){_(c),k(e,c)})),C([c.x,c.y,2*c.r+m]),u(["OpenCRE"]),h.current=c,d.current=k,p.current=_,b.current=C,()=>{eI(".circle-tooltip").remove()}}),[w,o]),e.createElement("div",{style:{position:"relative",width:"100vw",minHeight:w+80}},l.length>0&&e.createElement("div",{className:"breadcrumb-container",style:{margin:0,marginBottom:0,textAlign:"center",borderRadius:"8px 8px 0 0",width:"100vw",maxWidth:"100vw",background:"#f8f8f8",boxSizing:"border-box",position:"relative",zIndex:10}},l.map(((t,n)=>e.createElement(e.Fragment,{key:n},n>0&&e.createElement("span",{className:"separator"}," "),e.createElement("span",{className:"breadcrumb-item",style:{cursor:n===l.length-1?"default":"pointer",color:n===l.length-1?"#333":"#2185d0",fontWeight:n===l.length-1?"bold":500,textDecoration:n===l.length-1?"none":"underline"},onClick:()=>{if(ne.data.displayName&&e.data.displayName.replace(/^CRE: /,"")===l[t])),e);t++);e&&(p.current(e),d.current({altKey:!1},e))}}},t))))),e.createElement("div",{style:{position:"absolute",left:"50%",top:60,transform:"translateX(-50%)",width:w,height:w,background:"rgb(163, 245, 207)",borderRadius:8,zIndex:1}},e.createElement("div",{style:{position:"absolute",right:0,top:0,display:"flex",flexDirection:"column",gap:"5px",zIndex:21}},e.createElement(sv,{icon:!0,onClick:()=>i(!r),className:"screen-size-button"},e.createElement(Bg,{name:r?"compress":"expand"}))),e.createElement("div",{style:{position:"absolute",right:20,bottom:20,display:"flex",flexDirection:"row",gap:"10px",zIndex:20}},e.createElement(sv,{icon:!0,className:"screen-size-button",onClick:()=>{if(!b.current||!h.current)return;const e=g.current?g.current:[h.current.x,h.current.y,2*h.current.r+m],t=[e[0],e[1],e[2]/2.4],n=qC(e,t);eI("svg").transition().duration(350).tween("zoom",(()=>e=>b.current(n(e))))}},e.createElement(Bg,{name:"plus"})),e.createElement(sv,{icon:!0,className:"screen-size-button",onClick:()=>{if(!b.current||!h.current)return;const e=g.current?g.current:[h.current.x,h.current.y,2*h.current.r+m],t=[e[0],e[1],2.4*e[2]],n=qC(e,t);eI("svg").transition().duration(350).tween("zoom",(()=>e=>b.current(n(e))))}},e.createElement(Bg,{name:"minus"}))),e.createElement("svg",{ref:f,width:w,height:w,style:{background:"transparent",display:"block",margin:"auto"}},e.createElement("g",{transform:`translate(${w/2},${w/2})`}))),e.createElement(Qg,{loading:a||!!c,error:null}),c&&e.createElement("p",{className:"explorer-full-load-progress"},"Loading graph data (",c,")…"))};var rI=n(8006);function iI(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||aI(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function aI(e,t){if(e){if("string"==typeof e)return oI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oI(e,t):void 0}}function oI(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:e.useEffect,r=(0,e.useRef)(),i=(0,e.useRef)(!1),a=(0,e.useRef)(!1),o=lI((0,e.useState)(0),2);o[0];var s=o[1];i.current&&(a.current=!0),n((function(){return i.current||(r.current=t(),i.current=!0),s((function(e){return e+1})),function(){a.current&&r.current&&r.current()}}),[])}const pI="158",gI={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},bI=1,mI=2,wI=3,vI=100,yI=0,EI=1,_I=2,SI=0,xI=1,TI=2,AI=3,kI=4,CI=5,MI=301,II=302,OI=306,NI=1e3,RI=1001,PI=1002,LI=1003,DI=1005,FI=1006,UI=1008,jI=1009,BI=1012,zI=1014,$I=1015,HI=1016,GI=1020,VI=1023,WI=1026,qI=1027,XI=33776,YI=33777,KI=33778,ZI=33779,QI=36492,JI=2300,eO=2301,tO=2302,nO=3001,rO="",iO="srgb",aO="srgb-linear",oO="display-p3",sO="display-p3-linear",cO="linear",lO="srgb",uO="rec709",fO="p3",hO=7680,dO="300 es",pO=1035,gO=2e3,bO=2001;class mO{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,r=n.length;t>8&255]+wO[e>>16&255]+wO[e>>24&255]+"-"+wO[255&t]+wO[t>>8&255]+"-"+wO[t>>16&15|64]+wO[t>>24&255]+"-"+wO[63&n|128]+wO[n>>8&255]+"-"+wO[n>>16&255]+wO[n>>24&255]+wO[255&r]+wO[r>>8&255]+wO[r>>16&255]+wO[r>>24&255]).toLowerCase()}function SO(e,t,n){return Math.max(t,Math.min(n,e))}function xO(e,t){return(e%t+t)%t}function TO(e,t,n){return(1-n)*e+n*t}function AO(e){return 0==(e&e-1)&&0!==e}function kO(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function CO(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function MO(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(4294967295*e);case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int32Array:return Math.round(2147483647*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}const IO={DEG2RAD:yO,RAD2DEG:EO,generateUUID:_O,clamp:SO,euclideanModulo:xO,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:TO,damp:function(e,t,n,r){return TO(e,t,1-Math.exp(-n*r))},pingpong:function(e,t=1){return t-Math.abs(xO(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(vO=e);let t=vO+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function(e){return e*yO},radToDeg:function(e){return e*EO},isPowerOfTwo:AO,ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:kO,setQuaternionFromProperEuler:function(e,t,n,r,i){const a=Math.cos,o=Math.sin,s=a(n/2),c=o(n/2),l=a((t+r)/2),u=o((t+r)/2),f=a((t-r)/2),h=o((t-r)/2),d=a((r-t)/2),p=o((r-t)/2);switch(i){case"XYX":e.set(s*u,c*f,c*h,s*l);break;case"YZY":e.set(c*h,s*u,c*f,s*l);break;case"ZXZ":e.set(c*f,c*h,s*u,s*l);break;case"XZX":e.set(s*u,c*p,c*d,s*l);break;case"YXY":e.set(c*d,s*u,c*p,s*l);break;case"ZYZ":e.set(c*p,c*d,s*u,s*l);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:MO,denormalize:CO};class OO{constructor(e=0,t=0){OO.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,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,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;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,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,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,t){return this.x=e.x-t.x,this.y=e.y-t.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 t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[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,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}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 t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(SO(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class NO{constructor(e,t,n,r,i,a,o,s,c){NO.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,o,s,c)}set(e,t,n,r,i,a,o,s,c){const l=this.elements;return l[0]=e,l[1]=r,l[2]=o,l[3]=t,l[4]=i,l[5]=s,l[6]=n,l[7]=a,l[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[3],s=n[6],c=n[1],l=n[4],u=n[7],f=n[2],h=n[5],d=n[8],p=r[0],g=r[3],b=r[6],m=r[1],w=r[4],v=r[7],y=r[2],E=r[5],_=r[8];return i[0]=a*p+o*m+s*y,i[3]=a*g+o*w+s*E,i[6]=a*b+o*v+s*_,i[1]=c*p+l*m+u*y,i[4]=c*g+l*w+u*E,i[7]=c*b+l*v+u*_,i[2]=f*p+h*m+d*y,i[5]=f*g+h*w+d*E,i[8]=f*b+h*v+d*_,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8];return t*a*l-t*o*c-n*i*l+n*o*s+r*i*c-r*a*s}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=l*a-o*c,f=o*s-l*i,h=c*i-a*s,d=t*u+n*f+r*h;if(0===d)return this.set(0,0,0,0,0,0,0,0,0);const p=1/d;return e[0]=u*p,e[1]=(r*c-l*n)*p,e[2]=(o*n-r*a)*p,e[3]=f*p,e[4]=(l*t-r*s)*p,e[5]=(r*i-o*t)*p,e[6]=h*p,e[7]=(n*s-c*t)*p,e[8]=(a*t-n*i)*p,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,a,o){const s=Math.cos(i),c=Math.sin(i);return this.set(n*s,n*c,-n*(s*a+c*o)+a+e,-r*c,r*s,-r*(-c*a+s*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(RO.makeScale(e,t)),this}rotate(e){return this.premultiply(RO.makeRotation(-e)),this}translate(e,t){return this.premultiply(RO.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}const RO=new NO;function PO(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}function LO(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function DO(){const e=LO("canvas");return e.style.display="block",e}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const FO={};function UO(e){e in FO||(FO[e]=!0,console.warn(e))}const jO=(new NO).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),BO=(new NO).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),zO={[aO]:{transfer:cO,primaries:uO,toReference:e=>e,fromReference:e=>e},[iO]:{transfer:lO,primaries:uO,toReference:e=>e.convertSRGBToLinear(),fromReference:e=>e.convertLinearToSRGB()},[sO]:{transfer:cO,primaries:fO,toReference:e=>e.applyMatrix3(BO),fromReference:e=>e.applyMatrix3(jO)},[oO]:{transfer:lO,primaries:fO,toReference:e=>e.convertSRGBToLinear().applyMatrix3(BO),fromReference:e=>e.applyMatrix3(jO).convertLinearToSRGB()}},$O=new Set([aO,sO]),HO={enabled:!0,_workingColorSpace:aO,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(e){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!e},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(e){if(!$O.has(e))throw new Error(`Unsupported working color space, "${e}".`);this._workingColorSpace=e},convert:function(e,t,n){if(!1===this.enabled||t===n||!t||!n)return e;const r=zO[t].toReference;return(0,zO[n].fromReference)(r(e))},fromWorkingColorSpace:function(e,t){return this.convert(e,this._workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this._workingColorSpace)},getPrimaries:function(e){return zO[e].primaries},getTransfer:function(e){return e===rO?cO:zO[e].transfer}};function GO(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function VO(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}let WO;class qO{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===WO&&(WO=LO("canvas")),WO.width=e.width,WO.height=e.height;const n=WO.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=WO}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=LO("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(300!==this.mapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case NI:e.x=e.x-Math.floor(e.x);break;case RI:e.x=e.x<0?0:1;break;case PI:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case NI:e.y=e.y-Math.floor(e.y);break;case RI:e.y=e.y<0?0:1;break;case PI:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return UO("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===iO?nO:3e3}set encoding(e){UO("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===nO?iO:rO}}QO.DEFAULT_IMAGE=null,QO.DEFAULT_MAPPING=300,QO.DEFAULT_ANISOTROPY=1;class JO{constructor(e=0,t=0,n=0,r=1){JO.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,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,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;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=void 0!==e.w?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,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,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,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.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 t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i;const a=.01,o=.1,s=e.elements,c=s[0],l=s[4],u=s[8],f=s[1],h=s[5],d=s[9],p=s[2],g=s[6],b=s[10];if(Math.abs(l-f)s&&e>m?em?s=0?1:-1,r=1-t*t;if(r>Number.EPSILON){const i=Math.sqrt(r),a=Math.atan2(i,t*n);e=Math.sin(e*a)/i,o=Math.sin(o*a)/i}const i=o*n;if(s=s*e+f*i,c=c*e+h*i,l=l*e+d*i,u=u*e+p*i,e===1-o){const e=1/Math.sqrt(s*s+c*c+l*l+u*u);s*=e,c*=e,l*=e,u*=e}}e[t]=s,e[t+1]=c,e[t+2]=l,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,a){const o=n[r],s=n[r+1],c=n[r+2],l=n[r+3],u=i[a],f=i[a+1],h=i[a+2],d=i[a+3];return e[t]=o*d+l*u+s*h-c*f,e[t+1]=s*d+l*f+c*u-o*h,e[t+2]=c*d+l*h+o*f-s*u,e[t+3]=l*d-o*u-s*f-c*h,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,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,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,t){const n=e._x,r=e._y,i=e._z,a=e._order,o=Math.cos,s=Math.sin,c=o(n/2),l=o(r/2),u=o(i/2),f=s(n/2),h=s(r/2),d=s(i/2);switch(a){case"XYZ":this._x=f*l*u+c*h*d,this._y=c*h*u-f*l*d,this._z=c*l*d+f*h*u,this._w=c*l*u-f*h*d;break;case"YXZ":this._x=f*l*u+c*h*d,this._y=c*h*u-f*l*d,this._z=c*l*d-f*h*u,this._w=c*l*u+f*h*d;break;case"ZXY":this._x=f*l*u-c*h*d,this._y=c*h*u+f*l*d,this._z=c*l*d+f*h*u,this._w=c*l*u-f*h*d;break;case"ZYX":this._x=f*l*u-c*h*d,this._y=c*h*u+f*l*d,this._z=c*l*d-f*h*u,this._w=c*l*u+f*h*d;break;case"YZX":this._x=f*l*u+c*h*d,this._y=c*h*u+f*l*d,this._z=c*l*d-f*h*u,this._w=c*l*u-f*h*d;break;case"XZY":this._x=f*l*u-c*h*d,this._y=c*h*u-f*l*d,this._z=c*l*d+f*h*u,this._w=c*l*u+f*h*d;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],o=t[5],s=t[9],c=t[2],l=t[6],u=t[10],f=n+o+u;if(f>0){const e=.5/Math.sqrt(f+1);this._w=.25/e,this._x=(l-s)*e,this._y=(i-c)*e,this._z=(a-r)*e}else if(n>o&&n>u){const e=2*Math.sqrt(1+n-o-u);this._w=(l-s)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+c)/e}else if(o>u){const e=2*Math.sqrt(1+o-n-u);this._w=(i-c)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(s+l)/e}else{const e=2*Math.sqrt(1+u-n-o);this._w=(a-r)/e,this._x=(i+c)/e,this._y=(s+l)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return nMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(SO(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),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 0===e?(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,t){const n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,c=t._z,l=t._w;return this._x=n*l+a*o+r*c-i*s,this._y=r*l+a*s+i*o-n*c,this._z=i*l+a*c+n*s-r*o,this._w=a*l-n*o-r*s-i*c,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,r=this._y,i=this._z,a=this._w;let o=a*e._w+n*e._x+r*e._y+i*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=n,this._y=r,this._z=i,this;const s=1-o*o;if(s<=Number.EPSILON){const e=1-t;return this._w=e*a+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this._onChangeCallback(),this}const c=Math.sqrt(s),l=Math.atan2(c,o),u=Math.sin((1-t)*l)/c,f=Math.sin(t*l)/c;return this._w=a*u+this._w*f,this._x=n*u+this._x*f,this._y=r*u+this._y*f,this._z=i*u+this._z*f,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),r=2*Math.PI*Math.random(),i=2*Math.PI*Math.random();return this.set(t*Math.cos(r),n*Math.sin(i),n*Math.cos(i),t*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),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 aN{constructor(e=0,t=0,n=0){aN.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,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,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;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,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,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,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.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,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(sN.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(sN.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,c=2*(a*r-o*n),l=2*(o*t-i*r),u=2*(i*n-a*t);return this.x=t+s*c+a*u-o*l,this.y=n+s*l+o*c-i*u,this.z=r+s*u+i*l-a*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 t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,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,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}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,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return oN.copy(this).projectOnVector(e),this.sub(oN)}reflect(e){return this.sub(oN.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(SO(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}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,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}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,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const oN=new aN,sN=new iN;class cN{constructor(e=new aN(1/0,1/0,1/0),t=new aN(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;tthis.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,t){return t.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,uN),uN.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(wN),vN.subVectors(this.max,wN),hN.subVectors(e.a,wN),dN.subVectors(e.b,wN),pN.subVectors(e.c,wN),gN.subVectors(dN,hN),bN.subVectors(pN,dN),mN.subVectors(hN,pN);let t=[0,-gN.z,gN.y,0,-bN.z,bN.y,0,-mN.z,mN.y,gN.z,0,-gN.x,bN.z,0,-bN.x,mN.z,0,-mN.x,-gN.y,gN.x,0,-bN.y,bN.x,0,-mN.y,mN.x,0];return!!_N(t,hN,dN,pN,vN)&&(t=[1,0,0,0,1,0,0,0,1],!!_N(t,hN,dN,pN,vN)&&(yN.crossVectors(gN,bN),t=[yN.x,yN.y,yN.z],_N(t,hN,dN,pN,vN)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,uN).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(uN).length()),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()||(lN[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),lN[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),lN[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),lN[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),lN[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),lN[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),lN[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),lN[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(lN)),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 lN=[new aN,new aN,new aN,new aN,new aN,new aN,new aN,new aN],uN=new aN,fN=new cN,hN=new aN,dN=new aN,pN=new aN,gN=new aN,bN=new aN,mN=new aN,wN=new aN,vN=new aN,yN=new aN,EN=new aN;function _N(e,t,n,r,i){for(let a=0,o=e.length-3;a<=o;a+=3){EN.fromArray(e,a);const o=i.x*Math.abs(EN.x)+i.y*Math.abs(EN.y)+i.z*Math.abs(EN.z),s=t.dot(EN),c=n.dot(EN),l=r.dot(EN);if(Math.max(-Math.max(s,c,l),Math.min(s,c,l))>o)return!1}return!0}const SN=new cN,xN=new aN,TN=new aN;class AN{constructor(e=new aN,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):SN.setFromPoints(e).getCenter(n);let r=0;for(let t=0,i=e.length;tthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}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;xN.subVectors(e,this.center);const t=xN.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.addScaledVector(xN,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(TN.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(xN.copy(e.center).add(TN)),this.expandByPoint(xN.copy(e.center).sub(TN))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const kN=new aN,CN=new aN,MN=new aN,IN=new aN,ON=new aN,NN=new aN,RN=new aN;class PN{constructor(e=new aN,t=new aN(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.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,kN)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=kN.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(kN.copy(this.origin).addScaledVector(this.direction,t),kN.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){CN.copy(e).add(t).multiplyScalar(.5),MN.copy(t).sub(e).normalize(),IN.copy(this.origin).sub(CN);const i=.5*e.distanceTo(t),a=-this.direction.dot(MN),o=IN.dot(this.direction),s=-IN.dot(MN),c=IN.lengthSq(),l=Math.abs(1-a*a);let u,f,h,d;if(l>0)if(u=a*s-o,f=a*o-s,d=i*l,u>=0)if(f>=-d)if(f<=d){const e=1/l;u*=e,f*=e,h=u*(u+a*f+2*o)+f*(a*u+f+2*s)+c}else f=i,u=Math.max(0,-(a*f+o)),h=-u*u+f*(f+2*s)+c;else f=-i,u=Math.max(0,-(a*f+o)),h=-u*u+f*(f+2*s)+c;else f<=-d?(u=Math.max(0,-(-a*i+o)),f=u>0?-i:Math.min(Math.max(-i,-s),i),h=-u*u+f*(f+2*s)+c):f<=d?(u=0,f=Math.min(Math.max(-i,-s),i),h=f*(f+2*s)+c):(u=Math.max(0,-(a*i+o)),f=u>0?i:Math.min(Math.max(-i,-s),i),h=-u*u+f*(f+2*s)+c);else f=a>0?-i:i,u=Math.max(0,-(a*f+o)),h=-u*u+f*(f+2*s)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(CN).addScaledVector(MN,f),h}intersectSphere(e,t){kN.subVectors(e.center,this.origin);const n=kN.dot(this.direction),r=kN.dot(kN)-n*n,i=e.radius*e.radius;if(r>i)return null;const a=Math.sqrt(i-r),o=n-a,s=n+a;return s<0?null:o<0?this.at(s,t):this.at(o,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,a,o,s;const c=1/this.direction.x,l=1/this.direction.y,u=1/this.direction.z,f=this.origin;return c>=0?(n=(e.min.x-f.x)*c,r=(e.max.x-f.x)*c):(n=(e.max.x-f.x)*c,r=(e.min.x-f.x)*c),l>=0?(i=(e.min.y-f.y)*l,a=(e.max.y-f.y)*l):(i=(e.max.y-f.y)*l,a=(e.min.y-f.y)*l),n>a||i>r?null:((i>n||isNaN(n))&&(n=i),(a=0?(o=(e.min.z-f.z)*u,s=(e.max.z-f.z)*u):(o=(e.max.z-f.z)*u,s=(e.min.z-f.z)*u),n>s||o>r?null:((o>n||n!=n)&&(n=o),(s=0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,kN)}intersectTriangle(e,t,n,r,i){ON.subVectors(t,e),NN.subVectors(n,e),RN.crossVectors(ON,NN);let a,o=this.direction.dot(RN);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}IN.subVectors(this.origin,e);const s=a*this.direction.dot(NN.crossVectors(IN,NN));if(s<0)return null;const c=a*this.direction.dot(ON.cross(IN));if(c<0)return null;if(s+c>o)return null;const l=-a*IN.dot(RN);return l<0?null:this.at(l/o,i)}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 LN{constructor(e,t,n,r,i,a,o,s,c,l,u,f,h,d,p,g){LN.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,o,s,c,l,u,f,h,d,p,g)}set(e,t,n,r,i,a,o,s,c,l,u,f,h,d,p,g){const b=this.elements;return b[0]=e,b[4]=t,b[8]=n,b[12]=r,b[1]=i,b[5]=a,b[9]=o,b[13]=s,b[2]=c,b[6]=l,b[10]=u,b[14]=f,b[3]=h,b[7]=d,b[11]=p,b[15]=g,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 LN).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,r=1/DN.setFromMatrixColumn(e,0).length(),i=1/DN.setFromMatrixColumn(e,1).length(),a=1/DN.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),o=Math.sin(n),s=Math.cos(r),c=Math.sin(r),l=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){const e=a*l,n=a*u,r=o*l,i=o*u;t[0]=s*l,t[4]=-s*u,t[8]=c,t[1]=n+r*c,t[5]=e-i*c,t[9]=-o*s,t[2]=i-e*c,t[6]=r+n*c,t[10]=a*s}else if("YXZ"===e.order){const e=s*l,n=s*u,r=c*l,i=c*u;t[0]=e+i*o,t[4]=r*o-n,t[8]=a*c,t[1]=a*u,t[5]=a*l,t[9]=-o,t[2]=n*o-r,t[6]=i+e*o,t[10]=a*s}else if("ZXY"===e.order){const e=s*l,n=s*u,r=c*l,i=c*u;t[0]=e-i*o,t[4]=-a*u,t[8]=r+n*o,t[1]=n+r*o,t[5]=a*l,t[9]=i-e*o,t[2]=-a*c,t[6]=o,t[10]=a*s}else if("ZYX"===e.order){const e=a*l,n=a*u,r=o*l,i=o*u;t[0]=s*l,t[4]=r*c-n,t[8]=e*c+i,t[1]=s*u,t[5]=i*c+e,t[9]=n*c-r,t[2]=-c,t[6]=o*s,t[10]=a*s}else if("YZX"===e.order){const e=a*s,n=a*c,r=o*s,i=o*c;t[0]=s*l,t[4]=i-e*u,t[8]=r*u+n,t[1]=u,t[5]=a*l,t[9]=-o*l,t[2]=-c*l,t[6]=n*u+r,t[10]=e-i*u}else if("XZY"===e.order){const e=a*s,n=a*c,r=o*s,i=o*c;t[0]=s*l,t[4]=-u,t[8]=c*l,t[1]=e*u+i,t[5]=a*l,t[9]=n*u-r,t[2]=r*u-n,t[6]=o*l,t[10]=i*u+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(UN,e,jN)}lookAt(e,t,n){const r=this.elements;return $N.subVectors(e,t),0===$N.lengthSq()&&($N.z=1),$N.normalize(),BN.crossVectors(n,$N),0===BN.lengthSq()&&(1===Math.abs(n.z)?$N.x+=1e-4:$N.z+=1e-4,$N.normalize(),BN.crossVectors(n,$N)),BN.normalize(),zN.crossVectors($N,BN),r[0]=BN.x,r[4]=zN.x,r[8]=$N.x,r[1]=BN.y,r[5]=zN.y,r[9]=$N.y,r[2]=BN.z,r[6]=zN.z,r[10]=$N.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[4],s=n[8],c=n[12],l=n[1],u=n[5],f=n[9],h=n[13],d=n[2],p=n[6],g=n[10],b=n[14],m=n[3],w=n[7],v=n[11],y=n[15],E=r[0],_=r[4],S=r[8],x=r[12],T=r[1],A=r[5],k=r[9],C=r[13],M=r[2],I=r[6],O=r[10],N=r[14],R=r[3],P=r[7],L=r[11],D=r[15];return i[0]=a*E+o*T+s*M+c*R,i[4]=a*_+o*A+s*I+c*P,i[8]=a*S+o*k+s*O+c*L,i[12]=a*x+o*C+s*N+c*D,i[1]=l*E+u*T+f*M+h*R,i[5]=l*_+u*A+f*I+h*P,i[9]=l*S+u*k+f*O+h*L,i[13]=l*x+u*C+f*N+h*D,i[2]=d*E+p*T+g*M+b*R,i[6]=d*_+p*A+g*I+b*P,i[10]=d*S+p*k+g*O+b*L,i[14]=d*x+p*C+g*N+b*D,i[3]=m*E+w*T+v*M+y*R,i[7]=m*_+w*A+v*I+y*P,i[11]=m*S+w*k+v*O+y*L,i[15]=m*x+w*C+v*N+y*D,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],o=e[5],s=e[9],c=e[13],l=e[2],u=e[6],f=e[10],h=e[14];return e[3]*(+i*s*u-r*c*u-i*o*f+n*c*f+r*o*h-n*s*h)+e[7]*(+t*s*h-t*c*f+i*a*f-r*a*h+r*c*l-i*s*l)+e[11]*(+t*c*u-t*o*h-i*a*u+n*a*h+i*o*l-n*c*l)+e[15]*(-r*o*l-t*s*u+t*o*f+r*a*u-n*a*f+n*s*l)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=e[9],f=e[10],h=e[11],d=e[12],p=e[13],g=e[14],b=e[15],m=u*g*c-p*f*c+p*s*h-o*g*h-u*s*b+o*f*b,w=d*f*c-l*g*c-d*s*h+a*g*h+l*s*b-a*f*b,v=l*p*c-d*u*c+d*o*h-a*p*h-l*o*b+a*u*b,y=d*u*s-l*p*s-d*o*f+a*p*f+l*o*g-a*u*g,E=t*m+n*w+r*v+i*y;if(0===E)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const _=1/E;return e[0]=m*_,e[1]=(p*f*i-u*g*i-p*r*h+n*g*h+u*r*b-n*f*b)*_,e[2]=(o*g*i-p*s*i+p*r*c-n*g*c-o*r*b+n*s*b)*_,e[3]=(u*s*i-o*f*i-u*r*c+n*f*c+o*r*h-n*s*h)*_,e[4]=w*_,e[5]=(l*g*i-d*f*i+d*r*h-t*g*h-l*r*b+t*f*b)*_,e[6]=(d*s*i-a*g*i-d*r*c+t*g*c+a*r*b-t*s*b)*_,e[7]=(a*f*i-l*s*i+l*r*c-t*f*c-a*r*h+t*s*h)*_,e[8]=v*_,e[9]=(d*u*i-l*p*i-d*n*h+t*p*h+l*n*b-t*u*b)*_,e[10]=(a*p*i-d*o*i+d*n*c-t*p*c-a*n*b+t*o*b)*_,e[11]=(l*o*i-a*u*i-l*n*c+t*u*c+a*n*h-t*o*h)*_,e[12]=y*_,e[13]=(l*p*r-d*u*r+d*n*f-t*p*f-l*n*g+t*u*g)*_,e[14]=(d*o*r-a*p*r-d*n*s+t*p*s+a*n*g-t*o*g)*_,e[15]=(a*u*r-l*o*r+l*n*s-t*u*s-a*n*f+t*o*f)*_,this}scale(e){const t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){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,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,o=e.y,s=e.z,c=i*a,l=i*o;return this.set(c*a+n,c*o-r*s,c*s+r*o,0,c*o+r*s,l*o+n,l*s-r*a,0,c*s-r*o,l*s+r*a,i*s*s+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,a){return this.set(1,n,i,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,a=t._y,o=t._z,s=t._w,c=i+i,l=a+a,u=o+o,f=i*c,h=i*l,d=i*u,p=a*l,g=a*u,b=o*u,m=s*c,w=s*l,v=s*u,y=n.x,E=n.y,_=n.z;return r[0]=(1-(p+b))*y,r[1]=(h+v)*y,r[2]=(d-w)*y,r[3]=0,r[4]=(h-v)*E,r[5]=(1-(f+b))*E,r[6]=(g+m)*E,r[7]=0,r[8]=(d+w)*_,r[9]=(g-m)*_,r[10]=(1-(f+p))*_,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;let i=DN.set(r[0],r[1],r[2]).length();const a=DN.set(r[4],r[5],r[6]).length(),o=DN.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],FN.copy(this);const s=1/i,c=1/a,l=1/o;return FN.elements[0]*=s,FN.elements[1]*=s,FN.elements[2]*=s,FN.elements[4]*=c,FN.elements[5]*=c,FN.elements[6]*=c,FN.elements[8]*=l,FN.elements[9]*=l,FN.elements[10]*=l,t.setFromRotationMatrix(FN),n.x=i,n.y=a,n.z=o,this}makePerspective(e,t,n,r,i,a,o=2e3){const s=this.elements,c=2*i/(t-e),l=2*i/(n-r),u=(t+e)/(t-e),f=(n+r)/(n-r);let h,d;if(o===gO)h=-(a+i)/(a-i),d=-2*a*i/(a-i);else{if(o!==bO)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);h=-a/(a-i),d=-a*i/(a-i)}return s[0]=c,s[4]=0,s[8]=u,s[12]=0,s[1]=0,s[5]=l,s[9]=f,s[13]=0,s[2]=0,s[6]=0,s[10]=h,s[14]=d,s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this}makeOrthographic(e,t,n,r,i,a,o=2e3){const s=this.elements,c=1/(t-e),l=1/(n-r),u=1/(a-i),f=(t+e)*c,h=(n+r)*l;let d,p;if(o===gO)d=(a+i)*u,p=-2*u;else{if(o!==bO)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);d=i*u,p=-1*u}return s[0]=2*c,s[4]=0,s[8]=0,s[12]=-f,s[1]=0,s[5]=2*l,s[9]=0,s[13]=-h,s[2]=0,s[6]=0,s[10]=p,s[14]=-d,s[3]=0,s[7]=0,s[11]=0,s[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const DN=new aN,FN=new LN,UN=new aN(0,0,0),jN=new aN(1,1,1),BN=new aN,zN=new aN,$N=new aN,HN=new LN,GN=new iN;class VN{constructor(e=0,t=0,n=0,r=VN.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=r}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,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,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,t=this._order,n=!0){const r=e.elements,i=r[0],a=r[4],o=r[8],s=r[1],c=r[5],l=r[9],u=r[2],f=r[6],h=r[10];switch(t){case"XYZ":this._y=Math.asin(SO(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-l,h),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(f,c),this._z=0);break;case"YXZ":this._x=Math.asin(-SO(l,-1,1)),Math.abs(l)<.9999999?(this._y=Math.atan2(o,h),this._z=Math.atan2(s,c)):(this._y=Math.atan2(-u,i),this._z=0);break;case"ZXY":this._x=Math.asin(SO(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-u,h),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(s,i));break;case"ZYX":this._y=Math.asin(-SO(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(f,h),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(SO(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-l,c),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(o,h));break;case"XZY":this._z=Math.asin(-SO(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(f,c),this._y=Math.atan2(o,i)):(this._x=Math.atan2(-l,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return HN.makeRotationFromQuaternion(e),this.setFromRotationMatrix(HN,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return GN.setFromEuler(this),this.setFromQuaternion(GN,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],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+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}}VN.DEFAULT_ORDER="XYZ";class WN{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let e=0;e1){for(let e=0;e0&&(n=n.concat(i))}return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(QN,e,JN),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(QN,eR,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t0){r.children=[];for(let t=0;t0){r.animations=[];for(let t=0;t0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),o.length>0&&(n.images=o),s.length>0&&(n.shapes=s),c.length>0&&(n.skeletons=c),l.length>0&&(n.animations=l),u.length>0&&(n.nodes=u)}return n.object=r,n;function a(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!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.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,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)),!0===t)for(let t=0;t0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){sR.subVectors(r,t),cR.subVectors(n,t),lR.subVectors(e,t);const a=sR.dot(sR),o=sR.dot(cR),s=sR.dot(lR),c=cR.dot(cR),l=cR.dot(lR),u=a*c-o*o;if(0===u)return i.set(-2,-1,-1);const f=1/u,h=(c*s-o*l)*f,d=(a*l-o*s)*f;return i.set(1-h-d,d,h)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,uR),uR.x>=0&&uR.y>=0&&uR.x+uR.y<=1}static getUV(e,t,n,r,i,a,o,s){return!1===mR&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),mR=!0),this.getInterpolation(e,t,n,r,i,a,o,s)}static getInterpolation(e,t,n,r,i,a,o,s){return this.getBarycoord(e,t,n,r,uR),s.setScalar(0),s.addScaledVector(i,uR.x),s.addScaledVector(a,uR.y),s.addScaledVector(o,uR.z),s}static isFrontFacing(e,t,n,r){return sR.subVectors(n,t),cR.subVectors(e,t),sR.cross(cR).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),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 sR.subVectors(this.c,this.b),cR.subVectors(this.a,this.b),.5*sR.cross(cR).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return wR.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return wR.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return!1===mR&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),mR=!0),wR.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}getInterpolation(e,t,n,r,i){return wR.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return wR.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return wR.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,i=this.c;let a,o;fR.subVectors(r,n),hR.subVectors(i,n),pR.subVectors(e,n);const s=fR.dot(pR),c=hR.dot(pR);if(s<=0&&c<=0)return t.copy(n);gR.subVectors(e,r);const l=fR.dot(gR),u=hR.dot(gR);if(l>=0&&u<=l)return t.copy(r);const f=s*u-l*c;if(f<=0&&s>=0&&l<=0)return a=s/(s-l),t.copy(n).addScaledVector(fR,a);bR.subVectors(e,i);const h=fR.dot(bR),d=hR.dot(bR);if(d>=0&&h<=d)return t.copy(i);const p=h*c-s*d;if(p<=0&&c>=0&&d<=0)return o=c/(c-d),t.copy(n).addScaledVector(hR,o);const g=l*d-h*u;if(g<=0&&u-l>=0&&h-d>=0)return dR.subVectors(i,r),o=(u-l)/(u-l+(h-d)),t.copy(r).addScaledVector(dR,o);const b=1/(g+p+f);return a=p*b,o=f*b,t.copy(n).addScaledVector(fR,a).addScaledVector(hR,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const vR={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},yR={h:0,s:0,l:0},ER={h:0,s:0,l:0};function _R(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}class SR{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(void 0===t&&void 0===n){const t=e;t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=iO){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,HO.toWorkingColorSpace(this,t),this}setRGB(e,t,n,r=HO.workingColorSpace){return this.r=e,this.g=t,this.b=n,HO.toWorkingColorSpace(this,r),this}setHSL(e,t,n,r=HO.workingColorSpace){if(e=xO(e,1),t=SO(t,0,1),n=SO(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=_R(i,r,e+1/3),this.g=_R(i,r,e),this.b=_R(i,r,e-1/3)}return HO.toWorkingColorSpace(this,r),this}setStyle(e,t=iO){function n(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let i;const a=r[1],o=r[2];switch(a){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,t);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,t);break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const n=r[1],i=n.length;if(3===i)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(6===i)return this.setHex(parseInt(n,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=iO){const n=vR[e.toLowerCase()];return void 0!==n?this.setHex(n,t):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=GO(e.r),this.g=GO(e.g),this.b=GO(e.b),this}copyLinearToSRGB(e){return this.r=VO(e.r),this.g=VO(e.g),this.b=VO(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=iO){return HO.fromWorkingColorSpace(xR.copy(this),e),65536*Math.round(SO(255*xR.r,0,255))+256*Math.round(SO(255*xR.g,0,255))+Math.round(SO(255*xR.b,0,255))}getHexString(e=iO){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=HO.workingColorSpace){HO.fromWorkingColorSpace(xR.copy(this),t);const n=xR.r,r=xR.g,i=xR.b,a=Math.max(n,r,i),o=Math.min(n,r,i);let s,c;const l=(o+a)/2;if(o===a)s=0,c=0;else{const e=a-o;switch(c=l<=.5?e/(a+o):e/(2-a-o),a){case n:s=(r-i)/e+(r0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),0!==this.side&&(n.side=this.side),!0===this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=!0),204!==this.blendSrc&&(n.blendSrc=this.blendSrc),205!==this.blendDst&&(n.blendDst=this.blendDst),this.blendEquation!==vI&&(n.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(n.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(n.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(n.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(n.depthFunc=this.depthFunc),!1===this.depthTest&&(n.depthTest=this.depthTest),!1===this.depthWrite&&(n.depthWrite=this.depthWrite),!1===this.colorWrite&&(n.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(n.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(n.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(n.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==hO&&(n.stencilFail=this.stencilFail),this.stencilZFail!==hO&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==hO&&(n.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(n.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaHash&&(n.alphaHash=!0),!0===this.alphaToCoverage&&(n.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=!0),!0===this.forceSinglePass&&(n.forceSinglePass=!0),!0===this.wireframe&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}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 t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,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){!0===e&&this.version++}}class kR extends AR{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new SR(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.combine=yI,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.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 CR=new aN,MR=new OO;class IR{constructor(e,t,n=!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=t,this.count=void 0!==e?e.length/t:0,this.normalized=n,this.usage=35044,this.updateRange={offset:0,count:-1},this.gpuType=$I,this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}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,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const t in n){const r=n[t];e.data.attributes[t]=r.toJSON(e.data)}const r={};let i=!1;for(const t in this.morphAttributes){const n=this.morphAttributes[t],a=[];for(let t=0,r=n.length;t0&&(r[t]=a,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return null!==o&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.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 t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const r=e.attributes;for(const e in r){const n=r[e];this.setAttribute(e,n.clone(t))}const i=e.morphAttributes;for(const e in i){const n=[],r=i[e];for(let e=0,i=r.length;e0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e(e.far-e.near)**2)return}$R.copy(i).invert(),HR.copy(e.ray).applyMatrix4($R),null!==n.boundingBox&&!1===HR.intersectsBox(n.boundingBox)||this._computeIntersections(e,t,HR)}}_computeIntersections(e,t,n){let r;const i=this.geometry,a=this.material,o=i.index,s=i.attributes.position,c=i.attributes.uv,l=i.attributes.uv1,u=i.attributes.normal,f=i.groups,h=i.drawRange;if(null!==o)if(Array.isArray(a))for(let i=0,s=f.length;in.far?null:{distance:l,point:iP.clone(),object:e}}(e,t,n,r,WR,qR,XR,rP);if(u){i&&(ZR.fromBufferAttribute(i,s),QR.fromBufferAttribute(i,c),JR.fromBufferAttribute(i,l),u.uv=wR.getInterpolation(rP,WR,qR,XR,ZR,QR,JR,new OO)),a&&(ZR.fromBufferAttribute(a,s),QR.fromBufferAttribute(a,c),JR.fromBufferAttribute(a,l),u.uv1=wR.getInterpolation(rP,WR,qR,XR,ZR,QR,JR,new OO),u.uv2=u.uv1),o&&(eP.fromBufferAttribute(o,s),tP.fromBufferAttribute(o,c),nP.fromBufferAttribute(o,l),u.normal=wR.getInterpolation(rP,WR,qR,XR,eP,tP,nP,new aN),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const e={a:s,b:c,c:l,normal:new aN,materialIndex:0};wR.getNormal(WR,qR,XR,e.normal),u.face=e}return u}class sP extends zR{constructor(e=1,t=1,n=1,r=1,i=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};const o=this;r=Math.floor(r),i=Math.floor(i),a=Math.floor(a);const s=[],c=[],l=[],u=[];let f=0,h=0;function d(e,t,n,r,i,a,d,p,g,b,m){const w=a/g,v=d/b,y=a/2,E=d/2,_=p/2,S=g+1,x=b+1;let T=0,A=0;const k=new aN;for(let a=0;a0?1:-1,l.push(k.x,k.y,k.z),u.push(s/g),u.push(1-a/b),T+=1}}for(let e=0;e0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class dP extends oR{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new LN,this.projectionMatrix=new LN,this.projectionMatrixInverse=new LN,this.coordinateSystem=gO}copy(e,t){return super.copy(e,t),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,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class pP extends dP{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),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=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*EO*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*yO*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*EO*Math.atan(Math.tan(.5*yO*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,i,a){this.aspect=e/t,null===this.view&&(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=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*yO*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const a=this.view;if(null!==this.view&&this.view.enabled){const e=a.fullWidth,o=a.fullHeight;i+=a.offsetX*r/e,t-=a.offsetY*n/o,r*=a.width/e,n*=a.height/o}const o=this.filmOffset;0!==o&&(i+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const gP=-90;class bP extends oR{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new pP(gP,1,e,t);r.layers=this.layers,this.add(r);const i=new pP(gP,1,e,t);i.layers=this.layers,this.add(i);const a=new pP(gP,1,e,t);a.layers=this.layers,this.add(a);const o=new pP(gP,1,e,t);o.layers=this.layers,this.add(o);const s=new pP(gP,1,e,t);s.layers=this.layers,this.add(s);const c=new pP(gP,1,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,r,i,a,o,s]=t;for(const e of t)this.remove(e);if(e===gO)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),s.up.set(0,1,0),s.lookAt(0,0,-1);else{if(e!==bO)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),s.up.set(0,-1,0),s.lookAt(0,0,-1)}for(const e of t)this.add(e),e.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[i,a,o,s,c,l]=this.children,u=e.getRenderTarget(),f=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),d=e.xr.enabled;e.xr.enabled=!1;const p=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,r),e.render(t,i),e.setRenderTarget(n,1,r),e.render(t,a),e.setRenderTarget(n,2,r),e.render(t,o),e.setRenderTarget(n,3,r),e.render(t,s),e.setRenderTarget(n,4,r),e.render(t,c),n.texture.generateMipmaps=p,e.setRenderTarget(n,5,r),e.render(t,l),e.setRenderTarget(u,f,h),e.xr.enabled=d,n.texture.needsPMREMUpdate=!0}}class mP extends QO{constructor(e,t,n,r,i,a,o,s,c,l){super(e=void 0!==e?e:[],t=void 0!==t?t:MI,n,r,i,a,o,s,c,l),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class wP extends tN{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];void 0!==t.encoding&&(UO("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===nO?iO:rO),this.texture=new mP(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:FI}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={tEquirect:{value:null}},r="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",i="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",a=new sP(5,5,5),o=new hP({name:"CubemapFromEquirect",uniforms:cP(n),vertexShader:r,fragmentShader:i,side:1,blending:0});o.uniforms.tEquirect.value=t;const s=new aP(a,o),c=t.minFilter;return t.minFilter===UI&&(t.minFilter=FI),new bP(1,10,this).update(e,s),t.minFilter=c,s.geometry.dispose(),s.material.dispose(),this}clear(e,t,n,r){const i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}}const vP=new aN,yP=new aN,EP=new NO;class _P{constructor(e=new aN(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=vP.subVectors(n,t).cross(yP.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,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,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta(vP),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(e.start).addScaledVector(n,i)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>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,t){const n=t||EP.getNormalMatrix(e),r=this.coplanarPoint(vP).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),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 SP=new AN,xP=new aN;class TP{constructor(e=new _P,t=new _P,n=new _P,r=new _P,i=new _P,a=new _P){this.planes=[e,t,n,r,i,a]}set(e,t,n,r,i,a){const o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(i),o[5].copy(a),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=2e3){const n=this.planes,r=e.elements,i=r[0],a=r[1],o=r[2],s=r[3],c=r[4],l=r[5],u=r[6],f=r[7],h=r[8],d=r[9],p=r[10],g=r[11],b=r[12],m=r[13],w=r[14],v=r[15];if(n[0].setComponents(s-i,f-c,g-h,v-b).normalize(),n[1].setComponents(s+i,f+c,g+h,v+b).normalize(),n[2].setComponents(s+a,f+l,g+d,v+m).normalize(),n[3].setComponents(s-a,f-l,g-d,v-m).normalize(),n[4].setComponents(s-o,f-u,g-p,v-w).normalize(),t===gO)n[5].setComponents(s+o,f+u,g+p,v+w).normalize();else{if(t!==bO)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);n[5].setComponents(o,u,p,w).normalize()}return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),SP.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),SP.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(SP)}intersectsSprite(e){return SP.center.set(0,0,0),SP.radius=.7071067811865476,SP.applyMatrix4(e.matrixWorld),this.intersectsSphere(SP)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(n)0?e.max.x:e.min.x,xP.y=r.normal.y>0?e.max.y:e.min.y,xP.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(xP)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function AP(){let e=null,t=!1,n=null,r=null;function i(t,a){n(t,a),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function kP(e,t){const n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){const e=r.get(t);return void((!e||e.version 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn 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 );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid 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 ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid 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 ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid 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 ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid 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 ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid 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 ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid 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 ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tanisotropyV /= material.anisotropy;\n\tmaterial.anisotropy = saturate( material.anisotropy );\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x - tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x + tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat 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 ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid 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 ) {\n#else\nvoid 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 ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid 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 ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid 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 ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid 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 ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid 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) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = 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 );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tuniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = 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 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},IP={common:{diffuse:{value:new SR(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new NO},alphaMap:{value:null},alphaMapTransform:{value:new NO},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new NO}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new NO}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new NO}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new NO},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new NO},normalScale:{value:new OO(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new NO},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new NO}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new NO}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new NO}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new SR(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 SR(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new NO},alphaTest:{value:0},uvTransform:{value:new NO}},sprite:{diffuse:{value:new SR(16777215)},opacity:{value:1},center:{value:new OO(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new NO},alphaMap:{value:null},alphaMapTransform:{value:new NO},alphaTest:{value:0}}},OP={basic:{uniforms:lP([IP.common,IP.specularmap,IP.envmap,IP.aomap,IP.lightmap,IP.fog]),vertexShader:MP.meshbasic_vert,fragmentShader:MP.meshbasic_frag},lambert:{uniforms:lP([IP.common,IP.specularmap,IP.envmap,IP.aomap,IP.lightmap,IP.emissivemap,IP.bumpmap,IP.normalmap,IP.displacementmap,IP.fog,IP.lights,{emissive:{value:new SR(0)}}]),vertexShader:MP.meshlambert_vert,fragmentShader:MP.meshlambert_frag},phong:{uniforms:lP([IP.common,IP.specularmap,IP.envmap,IP.aomap,IP.lightmap,IP.emissivemap,IP.bumpmap,IP.normalmap,IP.displacementmap,IP.fog,IP.lights,{emissive:{value:new SR(0)},specular:{value:new SR(1118481)},shininess:{value:30}}]),vertexShader:MP.meshphong_vert,fragmentShader:MP.meshphong_frag},standard:{uniforms:lP([IP.common,IP.envmap,IP.aomap,IP.lightmap,IP.emissivemap,IP.bumpmap,IP.normalmap,IP.displacementmap,IP.roughnessmap,IP.metalnessmap,IP.fog,IP.lights,{emissive:{value:new SR(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:MP.meshphysical_vert,fragmentShader:MP.meshphysical_frag},toon:{uniforms:lP([IP.common,IP.aomap,IP.lightmap,IP.emissivemap,IP.bumpmap,IP.normalmap,IP.displacementmap,IP.gradientmap,IP.fog,IP.lights,{emissive:{value:new SR(0)}}]),vertexShader:MP.meshtoon_vert,fragmentShader:MP.meshtoon_frag},matcap:{uniforms:lP([IP.common,IP.bumpmap,IP.normalmap,IP.displacementmap,IP.fog,{matcap:{value:null}}]),vertexShader:MP.meshmatcap_vert,fragmentShader:MP.meshmatcap_frag},points:{uniforms:lP([IP.points,IP.fog]),vertexShader:MP.points_vert,fragmentShader:MP.points_frag},dashed:{uniforms:lP([IP.common,IP.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:MP.linedashed_vert,fragmentShader:MP.linedashed_frag},depth:{uniforms:lP([IP.common,IP.displacementmap]),vertexShader:MP.depth_vert,fragmentShader:MP.depth_frag},normal:{uniforms:lP([IP.common,IP.bumpmap,IP.normalmap,IP.displacementmap,{opacity:{value:1}}]),vertexShader:MP.meshnormal_vert,fragmentShader:MP.meshnormal_frag},sprite:{uniforms:lP([IP.sprite,IP.fog]),vertexShader:MP.sprite_vert,fragmentShader:MP.sprite_frag},background:{uniforms:{uvTransform:{value:new NO},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:MP.background_vert,fragmentShader:MP.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:MP.backgroundCube_vert,fragmentShader:MP.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:MP.cube_vert,fragmentShader:MP.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:MP.equirect_vert,fragmentShader:MP.equirect_frag},distanceRGBA:{uniforms:lP([IP.common,IP.displacementmap,{referencePosition:{value:new aN},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:MP.distanceRGBA_vert,fragmentShader:MP.distanceRGBA_frag},shadow:{uniforms:lP([IP.lights,IP.fog,{color:{value:new SR(0)},opacity:{value:1}}]),vertexShader:MP.shadow_vert,fragmentShader:MP.shadow_frag}};OP.physical={uniforms:lP([OP.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new NO},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new NO},clearcoatNormalScale:{value:new OO(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new NO},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new NO},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new NO},sheen:{value:0},sheenColor:{value:new SR(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new NO},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new NO},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new NO},transmissionSamplerSize:{value:new OO},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new NO},attenuationDistance:{value:0},attenuationColor:{value:new SR(0)},specularColor:{value:new SR(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new NO},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new NO},anisotropyVector:{value:new OO},anisotropyMap:{value:null},anisotropyMapTransform:{value:new NO}}]),vertexShader:MP.meshphysical_vert,fragmentShader:MP.meshphysical_frag};const NP={r:0,b:0,g:0};function RP(e,t,n,r,i,a,o){const s=new SR(0);let c,l,u=!0===a?0:1,f=null,h=0,d=null;function p(t,n){t.getRGB(NP,uP(e)),r.buffers.color.setClear(NP.r,NP.g,NP.b,n,o)}return{getClearColor:function(){return s},setClearColor:function(e,t=1){s.set(e),u=t,p(s,u)},getClearAlpha:function(){return u},setClearAlpha:function(e){u=e,p(s,u)},render:function(a,g){let b=!1,m=!0===g.isScene?g.background:null;m&&m.isTexture&&(m=(g.backgroundBlurriness>0?n:t).get(m)),null===m?p(s,u):m&&m.isColor&&(p(m,1),b=!0);const w=e.xr.getEnvironmentBlendMode();"additive"===w?r.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===w&&r.buffers.color.setClear(0,0,0,0,o),(e.autoClear||b)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),m&&(m.isCubeTexture||m.mapping===OI)?(void 0===l&&(l=new aP(new sP(1,1,1),new hP({name:"BackgroundCubeMaterial",uniforms:cP(OP.backgroundCube.uniforms),vertexShader:OP.backgroundCube.vertexShader,fragmentShader:OP.backgroundCube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(l)),l.material.uniforms.envMap.value=m,l.material.uniforms.flipEnvMap.value=m.isCubeTexture&&!1===m.isRenderTargetTexture?-1:1,l.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,l.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,l.material.toneMapped=HO.getTransfer(m.colorSpace)!==lO,f===m&&h===m.version&&d===e.toneMapping||(l.material.needsUpdate=!0,f=m,h=m.version,d=e.toneMapping),l.layers.enableAll(),a.unshift(l,l.geometry,l.material,0,0,null)):m&&m.isTexture&&(void 0===c&&(c=new aP(new CP(2,2),new hP({name:"BackgroundMaterial",uniforms:cP(OP.background.uniforms),vertexShader:OP.background.vertexShader,fragmentShader:OP.background.fragmentShader,side:0,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=m,c.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,c.material.toneMapped=HO.getTransfer(m.colorSpace)!==lO,!0===m.matrixAutoUpdate&&m.updateMatrix(),c.material.uniforms.uvTransform.value.copy(m.matrix),f===m&&h===m.version&&d===e.toneMapping||(c.material.needsUpdate=!0,f=m,h=m.version,d=e.toneMapping),c.layers.enableAll(),a.unshift(c,c.geometry,c.material,0,0,null))}}}function PP(e,t,n,r){const i=e.getParameter(e.MAX_VERTEX_ATTRIBS),a=r.isWebGL2?null:t.get("OES_vertex_array_object"),o=r.isWebGL2||null!==a,s={},c=d(null);let l=c,u=!1;function f(t){return r.isWebGL2?e.bindVertexArray(t):a.bindVertexArrayOES(t)}function h(t){return r.isWebGL2?e.deleteVertexArray(t):a.deleteVertexArrayOES(t)}function d(e){const t=[],n=[],r=[];for(let e=0;e=0){const n=i[t];let r=a[t];if(void 0===r&&("instanceMatrix"===t&&e.instanceMatrix&&(r=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(r=e.instanceColor)),void 0===n)return!0;if(n.attribute!==r)return!0;if(r&&n.data!==r.data)return!0;o++}return l.attributesNum!==o||l.index!==r}(i,v,h,y),E&&function(e,t,n,r){const i={},a=t.attributes;let o=0;const s=n.getAttributes();for(const t in s)if(s[t].location>=0){let n=a[t];void 0===n&&("instanceMatrix"===t&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(n=e.instanceColor));const r={};r.attribute=n,n&&n.data&&(r.data=n.data),i[t]=r,o++}l.attributes=i,l.attributesNum=o,l.index=r}(i,v,h,y)}else{const e=!0===c.wireframe;l.geometry===v.id&&l.program===h.id&&l.wireframe===e||(l.geometry=v.id,l.program=h.id,l.wireframe=e,E=!0)}null!==y&&n.update(y,e.ELEMENT_ARRAY_BUFFER),(E||u)&&(u=!1,function(i,a,o,s){if(!1===r.isWebGL2&&(i.isInstancedMesh||s.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;p();const c=s.attributes,l=o.getAttributes(),u=a.defaultAttributeValues;for(const t in l){const a=l[t];if(a.location>=0){let o=c[t];if(void 0===o&&("instanceMatrix"===t&&i.instanceMatrix&&(o=i.instanceMatrix),"instanceColor"===t&&i.instanceColor&&(o=i.instanceColor)),void 0!==o){const t=o.normalized,c=o.itemSize,l=n.get(o);if(void 0===l)continue;const u=l.buffer,f=l.type,h=l.bytesPerElement,d=!0===r.isWebGL2&&(f===e.INT||f===e.UNSIGNED_INT||1013===o.gpuType);if(o.isInterleavedBufferAttribute){const n=o.data,r=n.stride,l=o.offset;if(n.isInstancedInterleavedBuffer){for(let e=0;e0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const a="undefined"!=typeof WebGL2RenderingContext&&"WebGL2RenderingContext"===e.constructor.name;let o=void 0!==n.precision?n.precision:"highp";const s=i(o);s!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",s,"instead."),o=s);const c=a||t.has("WEBGL_draw_buffers"),l=!0===n.logarithmicDepthBuffer,u=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),f=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),h=e.getParameter(e.MAX_TEXTURE_SIZE),d=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),p=e.getParameter(e.MAX_VERTEX_ATTRIBS),g=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),b=e.getParameter(e.MAX_VARYING_VECTORS),m=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),w=f>0,v=a||t.has("OES_texture_float");return{isWebGL2:a,drawBuffers:c,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:l,maxTextures:u,maxVertexTextures:f,maxTextureSize:h,maxCubemapSize:d,maxAttributes:p,maxVertexUniforms:g,maxVaryings:b,maxFragmentUniforms:m,vertexTextures:w,floatFragmentTextures:v,floatVertexTextures:w&&v,maxSamples:a?e.getParameter(e.MAX_SAMPLES):0}}function FP(e){const t=this;let n=null,r=0,i=!1,a=!1;const o=new _P,s=new NO,c={value:null,needsUpdate:!1};function l(e,n,r,i){const a=null!==e?e.length:0;let l=null;if(0!==a){if(l=c.value,!0!==i||null===l){const t=r+4*a,i=n.matrixWorldInverse;s.getNormalMatrix(i),(null===l||l.length0),t.numPlanes=r,t.numIntersection=0);else{const e=a?0:r,t=4*e;let i=p.clippingState||null;c.value=i,i=l(f,s,t,u);for(let e=0;e!==t;++e)i[e]=n[e];p.clippingState=i,this.numIntersection=h?this.numPlanes:0,this.numPlanes+=e}}}function UP(e){let t=new WeakMap;function n(e,t){return 303===t?e.mapping=MI:304===t&&(e.mapping=II),e}function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture&&!1===i.isRenderTargetTexture){const a=i.mapping;if(303===a||304===a){if(t.has(i))return n(t.get(i).texture,i.mapping);{const a=i.image;if(a&&a.height>0){const o=new wP(a.height/2);return o.fromEquirectangularTexture(e,i),t.set(i,o),i.addEventListener("dispose",r),n(o.texture,i.mapping)}return null}}}return i},dispose:function(){t=new WeakMap}}}class jP extends dP{constructor(e=-1,t=1,n=1,r=-1,i=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),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=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,a){null===this.view&&(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=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-e,a=n+e,o=r+t,s=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,a=i+e*this.view.width,o-=t*this.view.offsetY,s=o-t*this.view.height}this.projectionMatrix.makeOrthographic(i,a,o,s,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}const BP=[.125,.215,.35,.446,.526,.582],zP=new jP,$P=new SR;let HP=null,GP=0,VP=0;const WP=(1+Math.sqrt(5))/2,qP=1/WP,XP=[new aN(1,1,1),new aN(-1,1,1),new aN(1,1,-1),new aN(-1,1,-1),new aN(0,WP,qP),new aN(0,WP,-qP),new aN(qP,0,WP),new aN(-qP,0,WP),new aN(WP,qP,0),new aN(-WP,qP,0)];class YP{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,t=0,n=.1,r=100){HP=this._renderer.getRenderTarget(),GP=this._renderer.getActiveCubeFace(),VP=this._renderer.getActiveMipmapLevel(),this._setSize(256);const i=this._allocateTargets();return i.depthBuffer=!0,this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=JP(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=QP(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;ee-4?s=BP[o-e+4-1]:0===o&&(s=0),r.push(s);const c=1/(a-2),l=-c,u=1+c,f=[l,l,u,l,u,u,l,l,u,u,l,u],h=6,d=6,p=3,g=2,b=1,m=new Float32Array(p*d*h),w=new Float32Array(g*d*h),v=new Float32Array(b*d*h);for(let e=0;e2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];m.set(r,p*d*e),w.set(f,g*d*e);const i=[e,e,e,e,e,e];v.set(i,b*d*e)}const y=new zR;y.setAttribute("position",new IR(m,p)),y.setAttribute("uv",new IR(w,g)),y.setAttribute("faceIndex",new IR(v,b)),t.push(y),i>4&&i--}return{lodPlanes:t,sizeLods:n,sigmas:r}}(r)),this._blurMaterial=function(e,t,n){const r=new Float32Array(20),i=new aN(0,1,0);return new hP({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}(r,e,t)}return r}_compileMaterial(e){const t=new aP(this._lodPlanes[0],e);this._renderer.compile(t,zP)}_sceneToCubeUV(e,t,n,r){const i=new pP(90,1,t,n),a=[1,-1,1,1,1,1],o=[1,1,1,-1,-1,-1],s=this._renderer,c=s.autoClear,l=s.toneMapping;s.getClearColor($P),s.toneMapping=SI,s.autoClear=!1;const u=new kR({name:"PMREM.Background",side:1,depthWrite:!1,depthTest:!1}),f=new aP(new sP,u);let h=!1;const d=e.background;d?d.isColor&&(u.color.copy(d),e.background=null,h=!0):(u.color.copy($P),h=!0);for(let t=0;t<6;t++){const n=t%3;0===n?(i.up.set(0,a[t],0),i.lookAt(o[t],0,0)):1===n?(i.up.set(0,0,a[t]),i.lookAt(0,o[t],0)):(i.up.set(0,a[t],0),i.lookAt(0,0,o[t]));const c=this._cubeSize;ZP(r,n*c,t>2?c:0,c,c),s.setRenderTarget(r),h&&s.render(f,i),s.render(e,i)}f.geometry.dispose(),f.material.dispose(),s.toneMapping=l,s.autoClear=c,e.background=d}_textureToCubeUV(e,t){const n=this._renderer,r=e.mapping===MI||e.mapping===II;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=JP()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=QP());const i=r?this._cubemapMaterial:this._equirectMaterial,a=new aP(this._lodPlanes[0],i);i.uniforms.envMap.value=e;const o=this._cubeSize;ZP(t,0,0,3*o,2*o),n.setRenderTarget(t),n.render(a,zP)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let t=1;t20&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${p} samples when the maximum is set to 20`);const g=[];let b=0;for(let e=0;e<20;++e){const t=e/d,n=Math.exp(-t*t/2);g.push(n),0===e?b+=n:em-4?r-m+4:0),4*(this._cubeSize-w),3*w,2*w),s.setRenderTarget(t),s.render(l,zP)}}function KP(e,t,n){const r=new tN(e,t,n);return r.texture.mapping=OI,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function ZP(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function QP(){return new hP({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function JP(){return new hP({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function eL(e){let t=new WeakMap,n=null;function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const a=i.mapping,o=303===a||304===a,s=a===MI||a===II;if(o||s){if(i.isRenderTargetTexture&&!0===i.needsPMREMUpdate){i.needsPMREMUpdate=!1;let r=t.get(i);return null===n&&(n=new YP(e)),r=o?n.fromEquirectangular(i,r):n.fromCubemap(i,r),t.set(i,r),r.texture}if(t.has(i))return t.get(i).texture;{const a=i.image;if(o&&a&&a.height>0||s&&a&&function(e){let t=0;for(let n=0;n<6;n++)void 0!==e[n]&&t++;return 6===t}(a)){null===n&&(n=new YP(e));const a=o?n.fromEquirectangular(i):n.fromCubemap(i);return t.set(i,a),i.addEventListener("dispose",r),a.texture}return null}}}return i},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function tL(e){const t={};function n(n){if(void 0!==t[n])return t[n];let r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture")},get:function(e){const t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function nL(e,t,n,r){const i={},a=new WeakMap;function o(e){const s=e.target;null!==s.index&&t.remove(s.index);for(const e in s.attributes)t.remove(s.attributes[e]);for(const e in s.morphAttributes){const n=s.morphAttributes[e];for(let e=0,r=n.length;et.maxTextureSize&&(T=Math.ceil(x/t.maxTextureSize),x=t.maxTextureSize);const A=new Float32Array(x*T*4*d),k=new nN(A,x,T,d);k.type=$I,k.needsUpdate=!0;const C=4*S;for(let I=0;I0)return e;const i=t*n;let a=dL[i];if(void 0===a&&(a=new Float32Array(i),dL[i]=a),0!==t){r.toArray(a,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(a,i)}return a}function vL(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n":" "} ${i}: ${n[e]}`)}return r.join("\n")}(e.getShaderSource(t),r)}return i}function mD(e,t){const n=function(e){const t=HO.getPrimaries(HO.workingColorSpace),n=HO.getPrimaries(e);let r;switch(t===n?r="":t===fO&&n===uO?r="LinearDisplayP3ToLinearSRGB":t===uO&&n===fO&&(r="LinearSRGBToLinearDisplayP3"),e){case aO:case sO:return[r,"LinearTransferOETF"];case iO:case oO:return[r,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",e),[r,"LinearTransferOETF"]}}(t);return`vec4 ${e}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function wD(e,t){let n;switch(t){case xI:n="Linear";break;case TI:n="Reinhard";break;case AI:n="OptimizedCineon";break;case kI:n="ACESFilmic";break;case CI:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function vD(e){return""!==e}function yD(e,t){const n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function ED(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const _D=/^[ \t]*#include +<([\w\d./]+)>/gm;function SD(e){return e.replace(_D,TD)}const xD=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function TD(e,t){let n=MP[t];if(void 0===n){const e=xD.get(t);if(void 0===e)throw new Error("Can not resolve #include <"+t+">");n=MP[e],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,e)}return SD(n)}const AD=/#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 kD(e){return e.replace(AD,CD)}function CD(e,t,n,r){let i="";for(let e=parseInt(t);e0&&(b+="\n"),m=[d,"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,p].filter(vD).join("\n"),m.length>0&&(m+="\n")):(b=[MD(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,p,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",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 "+u:"",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&&!1===n.flatShading?"#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&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+c:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(vD).join("\n"),m=[d,MD(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,p,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+l:"",n.envMap?"#define "+u:"",n.envMap?"#define "+f:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.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.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&&!1===n.flatShading?"#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 "+c:"",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":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==SI?"#define TONE_MAPPING":"",n.toneMapping!==SI?MP.tonemapping_pars_fragment:"",n.toneMapping!==SI?wD("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",MP.colorspace_pars_fragment,mD("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(vD).join("\n")),o=SD(o),o=yD(o,n),o=ED(o,n),s=SD(s),s=yD(s,n),s=ED(s,n),o=kD(o),s=kD(s),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(w="#version 300 es\n",b=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+b,m=["precision mediump sampler2DArray;","#define varying in",n.glslVersion===dO?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===dO?"":"#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("\n")+"\n"+m);const v=w+b+o,y=w+m+s,E=dD(i,i.VERTEX_SHADER,v),_=dD(i,i.FRAGMENT_SHADER,y);function S(t){if(e.debug.checkShaderErrors){const n=i.getProgramInfoLog(g).trim(),r=i.getShaderInfoLog(E).trim(),a=i.getShaderInfoLog(_).trim();let o=!0,s=!0;if(!1===i.getProgramParameter(g,i.LINK_STATUS))if(o=!1,"function"==typeof e.debug.onShaderError)e.debug.onShaderError(i,g,E,_);else{const e=bD(i,E,"vertex"),t=bD(i,_,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(g,i.VALIDATE_STATUS)+"\n\nProgram Info Log: "+n+"\n"+e+"\n"+t)}else""!==n?console.warn("THREE.WebGLProgram: Program Info Log:",n):""!==r&&""!==a||(s=!1);s&&(t.diagnostics={runnable:o,programLog:n,vertexShader:{log:r,prefix:b},fragmentShader:{log:a,prefix:m}})}i.deleteShader(E),i.deleteShader(_),x=new hD(i,g),T=function(e,t){const n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i0,V=a.clearcoat>0,W=a.iridescence>0,q=a.sheen>0,X=a.transmission>0,Y=G&&!!a.anisotropyMap,K=V&&!!a.clearcoatMap,Z=V&&!!a.clearcoatNormalMap,Q=V&&!!a.clearcoatRoughnessMap,J=W&&!!a.iridescenceMap,ee=W&&!!a.iridescenceThicknessMap,te=q&&!!a.sheenColorMap,ne=q&&!!a.sheenRoughnessMap,re=!!a.specularMap,ie=!!a.specularColorMap,ae=!!a.specularIntensityMap,oe=X&&!!a.transmissionMap,se=X&&!!a.thicknessMap,ce=!!a.gradientMap,le=!!a.alphaMap,ue=a.alphaTest>0,fe=!!a.alphaHash,he=!!a.extensions,de=!!v.attributes.uv1,pe=!!v.attributes.uv2,ge=!!v.attributes.uv3;let be=SI;return a.toneMapped&&(null!==O&&!0!==O.isXRRenderTarget||(be=e.toneMapping)),{isWebGL2:u,shaderID:S,shaderType:a.type,shaderName:a.name,vertexShader:A,fragmentShader:k,defines:a.defines,customVertexShaderID:C,customFragmentShaderID:M,isRawShaderMaterial:!0===a.isRawShaderMaterial,glslVersion:a.glslVersion,precision:d,instancing:N,instancingColor:N&&null!==m.instanceColor,supportsVertexTextures:h,outputColorSpace:null===O?e.outputColorSpace:!0===O.isXRRenderTarget?O.texture.colorSpace:aO,map:R,matcap:P,envMap:L,envMapMode:L&&E.mapping,envMapCubeUVHeight:_,aoMap:D,lightMap:F,bumpMap:U,normalMap:j,displacementMap:h&&B,emissiveMap:z,normalMapObjectSpace:j&&1===a.normalMapType,normalMapTangentSpace:j&&0===a.normalMapType,metalnessMap:$,roughnessMap:H,anisotropy:G,anisotropyMap:Y,clearcoat:V,clearcoatMap:K,clearcoatNormalMap:Z,clearcoatRoughnessMap:Q,iridescence:W,iridescenceMap:J,iridescenceThicknessMap:ee,sheen:q,sheenColorMap:te,sheenRoughnessMap:ne,specularMap:re,specularColorMap:ie,specularIntensityMap:ae,transmission:X,transmissionMap:oe,thicknessMap:se,gradientMap:ce,opaque:!1===a.transparent&&1===a.blending,alphaMap:le,alphaTest:ue,alphaHash:fe,combine:a.combine,mapUv:R&&g(a.map.channel),aoMapUv:D&&g(a.aoMap.channel),lightMapUv:F&&g(a.lightMap.channel),bumpMapUv:U&&g(a.bumpMap.channel),normalMapUv:j&&g(a.normalMap.channel),displacementMapUv:B&&g(a.displacementMap.channel),emissiveMapUv:z&&g(a.emissiveMap.channel),metalnessMapUv:$&&g(a.metalnessMap.channel),roughnessMapUv:H&&g(a.roughnessMap.channel),anisotropyMapUv:Y&&g(a.anisotropyMap.channel),clearcoatMapUv:K&&g(a.clearcoatMap.channel),clearcoatNormalMapUv:Z&&g(a.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Q&&g(a.clearcoatRoughnessMap.channel),iridescenceMapUv:J&&g(a.iridescenceMap.channel),iridescenceThicknessMapUv:ee&&g(a.iridescenceThicknessMap.channel),sheenColorMapUv:te&&g(a.sheenColorMap.channel),sheenRoughnessMapUv:ne&&g(a.sheenRoughnessMap.channel),specularMapUv:re&&g(a.specularMap.channel),specularColorMapUv:ie&&g(a.specularColorMap.channel),specularIntensityMapUv:ae&&g(a.specularIntensityMap.channel),transmissionMapUv:oe&&g(a.transmissionMap.channel),thicknessMapUv:se&&g(a.thicknessMap.channel),alphaMapUv:le&&g(a.alphaMap.channel),vertexTangents:!!v.attributes.tangent&&(j||G),vertexColors:a.vertexColors,vertexAlphas:!0===a.vertexColors&&!!v.attributes.color&&4===v.attributes.color.itemSize,vertexUv1s:de,vertexUv2s:pe,vertexUv3s:ge,pointsUvs:!0===m.isPoints&&!!v.attributes.uv&&(R||le),fog:!!w,useFog:!0===a.fog,fogExp2:w&&w.isFogExp2,flatShading:!0===a.flatShading,sizeAttenuation:!0===a.sizeAttenuation,logarithmicDepthBuffer:f,skinning:!0===m.isSkinnedMesh,morphTargets:void 0!==v.morphAttributes.position,morphNormals:void 0!==v.morphAttributes.normal,morphColors:void 0!==v.morphAttributes.color,morphTargetsCount:T,morphTextureStride:I,numDirLights:s.directional.length,numPointLights:s.point.length,numSpotLights:s.spot.length,numSpotLightMaps:s.spotLightMap.length,numRectAreaLights:s.rectArea.length,numHemiLights:s.hemi.length,numDirLightShadows:s.directionalShadowMap.length,numPointLightShadows:s.pointShadowMap.length,numSpotLightShadows:s.spotShadowMap.length,numSpotLightShadowsWithMaps:s.numSpotLightShadowsWithMaps,numLightProbes:s.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:a.dithering,shadowMapEnabled:e.shadowMap.enabled&&l.length>0,shadowMapType:e.shadowMap.type,toneMapping:be,useLegacyLights:e._useLegacyLights,decodeVideoTexture:R&&!0===a.map.isVideoTexture&&HO.getTransfer(a.map.colorSpace)===lO,premultipliedAlpha:a.premultipliedAlpha,doubleSided:2===a.side,flipSided:1===a.side,useDepthPacking:a.depthPacking>=0,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionDerivatives:he&&!0===a.extensions.derivatives,extensionFragDepth:he&&!0===a.extensions.fragDepth,extensionDrawBuffers:he&&!0===a.extensions.drawBuffers,extensionShaderTextureLOD:he&&!0===a.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||r.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:a.customProgramCacheKey()}},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(function(e,t){e.push(t.precision),e.push(t.outputColorSpace),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.mapUv),e.push(t.alphaMapUv),e.push(t.lightMapUv),e.push(t.aoMapUv),e.push(t.bumpMapUv),e.push(t.normalMapUv),e.push(t.displacementMapUv),e.push(t.emissiveMapUv),e.push(t.metalnessMapUv),e.push(t.roughnessMapUv),e.push(t.anisotropyMapUv),e.push(t.clearcoatMapUv),e.push(t.clearcoatNormalMapUv),e.push(t.clearcoatRoughnessMapUv),e.push(t.iridescenceMapUv),e.push(t.iridescenceThicknessMapUv),e.push(t.sheenColorMapUv),e.push(t.sheenRoughnessMapUv),e.push(t.specularMapUv),e.push(t.specularColorMapUv),e.push(t.specularIntensityMapUv),e.push(t.transmissionMapUv),e.push(t.thicknessMapUv),e.push(t.combine),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.numLightProbes),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}(n,t),function(e,t){s.disableAll(),t.isWebGL2&&s.enable(0),t.supportsVertexTextures&&s.enable(1),t.instancing&&s.enable(2),t.instancingColor&&s.enable(3),t.matcap&&s.enable(4),t.envMap&&s.enable(5),t.normalMapObjectSpace&&s.enable(6),t.normalMapTangentSpace&&s.enable(7),t.clearcoat&&s.enable(8),t.iridescence&&s.enable(9),t.alphaTest&&s.enable(10),t.vertexColors&&s.enable(11),t.vertexAlphas&&s.enable(12),t.vertexUv1s&&s.enable(13),t.vertexUv2s&&s.enable(14),t.vertexUv3s&&s.enable(15),t.vertexTangents&&s.enable(16),t.anisotropy&&s.enable(17),t.alphaHash&&s.enable(18),e.push(s.mask),s.disableAll(),t.fog&&s.enable(0),t.useFog&&s.enable(1),t.flatShading&&s.enable(2),t.logarithmicDepthBuffer&&s.enable(3),t.skinning&&s.enable(4),t.morphTargets&&s.enable(5),t.morphNormals&&s.enable(6),t.morphColors&&s.enable(7),t.premultipliedAlpha&&s.enable(8),t.shadowMapEnabled&&s.enable(9),t.useLegacyLights&&s.enable(10),t.doubleSided&&s.enable(11),t.flipSided&&s.enable(12),t.useDepthPacking&&s.enable(13),t.dithering&&s.enable(14),t.transmission&&s.enable(15),t.sheen&&s.enable(16),t.opaque&&s.enable(17),t.pointsUvs&&s.enable(18),t.decodeVideoTexture&&s.enable(19),e.push(s.mask)}(n,t),n.push(e.outputColorSpace)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=p[e.type];let n;if(t){const e=OP[t];n=fP.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let r;for(let e=0,t=l.length;e0?r.push(u):!0===o.transparent?i.push(u):n.push(u)},unshift:function(e,t,o,s,c,l){const u=a(e,t,o,s,c,l);o.transmission>0?r.unshift(u):!0===o.transparent?i.unshift(u):n.unshift(u)},finish:function(){for(let n=t,r=e.length;n1&&n.sort(e||DD),r.length>1&&r.sort(t||FD),i.length>1&&i.sort(t||FD)}}}function jD(){let e=new WeakMap;return{get:function(t,n){const r=e.get(t);let i;return void 0===r?(i=new UD,e.set(t,[i])):n>=r.length?(i=new UD,r.push(i)):i=r[n],i},dispose:function(){e=new WeakMap}}}function BD(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new aN,color:new SR};break;case"SpotLight":n={position:new aN,direction:new aN,color:new SR,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new aN,color:new SR,distance:0,decay:0};break;case"HemisphereLight":n={direction:new aN,skyColor:new SR,groundColor:new SR};break;case"RectAreaLight":n={color:new SR,position:new aN,halfWidth:new aN,halfHeight:new aN}}return e[t.id]=n,n}}}let zD=0;function $D(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function HD(e,t){const n=new BD,r=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new OO};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new OO,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={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 e=0;e<9;e++)i.probe.push(new aN);const a=new aN,o=new LN,s=new LN;return{setup:function(a,o){let s=0,c=0,l=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let u=0,f=0,h=0,d=0,p=0,g=0,b=0,m=0,w=0,v=0,y=0;a.sort($D);const E=!0===o?Math.PI:1;for(let e=0,t=a.length;e0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=IP.LTC_FLOAT_1,i.rectAreaLTC2=IP.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=IP.LTC_HALF_1,i.rectAreaLTC2=IP.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=s,i.ambient[1]=c,i.ambient[2]=l;const _=i.hash;_.directionalLength===u&&_.pointLength===f&&_.spotLength===h&&_.rectAreaLength===d&&_.hemiLength===p&&_.numDirectionalShadows===g&&_.numPointShadows===b&&_.numSpotShadows===m&&_.numSpotMaps===w&&_.numLightProbes===y||(i.directional.length=u,i.spot.length=h,i.rectArea.length=d,i.point.length=f,i.hemi.length=p,i.directionalShadow.length=g,i.directionalShadowMap.length=g,i.pointShadow.length=b,i.pointShadowMap.length=b,i.spotShadow.length=m,i.spotShadowMap.length=m,i.directionalShadowMatrix.length=g,i.pointShadowMatrix.length=b,i.spotLightMatrix.length=m+w-v,i.spotLightMap.length=w,i.numSpotLightShadowsWithMaps=v,i.numLightProbes=y,_.directionalLength=u,_.pointLength=f,_.spotLength=h,_.rectAreaLength=d,_.hemiLength=p,_.numDirectionalShadows=g,_.numPointShadows=b,_.numSpotShadows=m,_.numSpotMaps=w,_.numLightProbes=y,i.version=zD++)},setupView:function(e,t){let n=0,r=0,c=0,l=0,u=0;const f=t.matrixWorldInverse;for(let t=0,h=e.length;t=a.length?(o=new GD(e,t),a.push(o)):o=a[i],o},dispose:function(){n=new WeakMap}}}class WD extends AR{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,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 qD extends AR{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}}function XD(e,t,n){let r=new TP;const i=new OO,a=new OO,o=new JO,s=new WD({depthPacking:3201}),c=new qD,l={},u=n.maxTextureSize,f={0:1,1:0,2:2},h=new hP({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new OO},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),d=h.clone();d.defines.HORIZONTAL_PASS=1;const p=new zR;p.setAttribute("position",new IR(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const g=new aP(p,h),b=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=bI;let m=this.type;function w(n,r){const a=t.update(g);h.defines.VSM_SAMPLES!==n.blurSamples&&(h.defines.VSM_SAMPLES=n.blurSamples,d.defines.VSM_SAMPLES=n.blurSamples,h.needsUpdate=!0,d.needsUpdate=!0),null===n.mapPass&&(n.mapPass=new tN(i.x,i.y)),h.uniforms.shadow_pass.value=n.map.texture,h.uniforms.resolution.value=n.mapSize,h.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,a,h,g,null),d.uniforms.shadow_pass.value=n.mapPass.texture,d.uniforms.resolution.value=n.mapSize,d.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,a,d,g,null)}function v(t,n,r,i){let a=null;const o=!0===r.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==o)a=o;else if(a=!0===r.isPointLight?c:s,e.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0){const e=a.uuid,t=n.uuid;let r=l[e];void 0===r&&(r={},l[e]=r);let i=r[t];void 0===i&&(i=a.clone(),r[t]=i),a=i}return a.visible=n.visible,a.wireframe=n.wireframe,a.side=i===wI?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:f[n.side],a.alphaMap=n.alphaMap,a.alphaTest=n.alphaTest,a.map=n.map,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.clipIntersection=n.clipIntersection,a.displacementMap=n.displacementMap,a.displacementScale=n.displacementScale,a.displacementBias=n.displacementBias,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,!0===r.isPointLight&&!0===a.isMeshDistanceMaterial&&(e.properties.get(a).light=r),a}function y(n,i,a,o,s){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&s===wI)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);const r=t.update(n),i=n.material;if(Array.isArray(i)){const t=r.groups;for(let c=0,l=t.length;cu||i.y>u)&&(i.x>u&&(a.x=Math.floor(u/g.x),i.x=a.x*g.x,f.mapSize.x=a.x),i.y>u&&(a.y=Math.floor(u/g.y),i.y=a.y*g.y,f.mapSize.y=a.y)),null===f.map||!0===d||!0===p){const e=this.type!==wI?{minFilter:LI,magFilter:LI}:{};null!==f.map&&f.map.dispose(),f.map=new tN(i.x,i.y,e),f.map.texture.name=l.name+".shadowMap",f.camera.updateProjectionMatrix()}e.setRenderTarget(f.map),e.clear();const b=f.getViewportCount();for(let e=0;e=1):-1!==R.indexOf("OpenGL ES")&&(N=parseFloat(/^OpenGL ES (\d)/.exec(R)[1]),O=N>=2);let P=null,L={};const D=e.getParameter(e.SCISSOR_BOX),F=e.getParameter(e.VIEWPORT),U=(new JO).fromArray(D),j=(new JO).fromArray(F);function B(t,n,i,a){const o=new Uint8Array(4),s=e.createTexture();e.bindTexture(t,s),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let s=0;sr||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const r=t?kO:Math.floor,a=r(i*e.width),o=r(i*e.height);void 0===g&&(g=w(a,o));const s=n?w(a,o):g;return s.width=a,s.height=o,s.getContext("2d").drawImage(e,0,0,a,o),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+a+"x"+o+")."),s}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function y(e){return AO(e.width)&&AO(e.height)}function E(e,t){return e.generateMipmaps&&t&&e.minFilter!==LI&&e.minFilter!==FI}function _(t){e.generateMipmap(t)}function S(n,r,i,a,o=!1){if(!1===s)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let c=r;if(r===e.RED&&(i===e.FLOAT&&(c=e.R32F),i===e.HALF_FLOAT&&(c=e.R16F),i===e.UNSIGNED_BYTE&&(c=e.R8)),r===e.RED_INTEGER&&(i===e.UNSIGNED_BYTE&&(c=e.R8UI),i===e.UNSIGNED_SHORT&&(c=e.R16UI),i===e.UNSIGNED_INT&&(c=e.R32UI),i===e.BYTE&&(c=e.R8I),i===e.SHORT&&(c=e.R16I),i===e.INT&&(c=e.R32I)),r===e.RG&&(i===e.FLOAT&&(c=e.RG32F),i===e.HALF_FLOAT&&(c=e.RG16F),i===e.UNSIGNED_BYTE&&(c=e.RG8)),r===e.RGBA){const t=o?cO:HO.getTransfer(a);i===e.FLOAT&&(c=e.RGBA32F),i===e.HALF_FLOAT&&(c=e.RGBA16F),i===e.UNSIGNED_BYTE&&(c=t===lO?e.SRGB8_ALPHA8:e.RGBA8),i===e.UNSIGNED_SHORT_4_4_4_4&&(c=e.RGBA4),i===e.UNSIGNED_SHORT_5_5_5_1&&(c=e.RGB5_A1)}return c!==e.R16F&&c!==e.R32F&&c!==e.RG16F&&c!==e.RG32F&&c!==e.RGBA16F&&c!==e.RGBA32F||t.get("EXT_color_buffer_float"),c}function x(e,t,n){return!0===E(e,n)||e.isFramebufferTexture&&e.minFilter!==LI&&e.minFilter!==FI?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function T(t){return t===LI||1004===t||t===DI?e.NEAREST:e.LINEAR}function A(e){const t=e.target;t.removeEventListener("dispose",A),function(e){const t=r.get(e);if(void 0===t.__webglInit)return;const n=e.source,i=b.get(n);if(i){const r=i[t.__cacheKey];r.usedTimes--,0===r.usedTimes&&C(e),0===Object.keys(i).length&&b.delete(n)}r.remove(e)}(t),t.isVideoTexture&&p.delete(t)}function k(t){const n=t.target;n.removeEventListener("dispose",k),function(t){const n=t.texture,i=r.get(t),a=r.get(n);if(void 0!==a.__webglTexture&&(e.deleteTexture(a.__webglTexture),o.memory.textures--),t.depthTexture&&t.depthTexture.dispose(),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++){if(Array.isArray(i.__webglFramebuffer[t]))for(let n=0;n0&&a.__version!==t.version){const e=t.image;if(null===e)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void D(a,t,i);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.bindTexture(e.TEXTURE_2D,a.__webglTexture,e.TEXTURE0+i)}const O={[NI]:e.REPEAT,[RI]:e.CLAMP_TO_EDGE,[PI]:e.MIRRORED_REPEAT},N={[LI]:e.NEAREST,1004:e.NEAREST_MIPMAP_NEAREST,[DI]:e.NEAREST_MIPMAP_LINEAR,[FI]:e.LINEAR,1007:e.LINEAR_MIPMAP_NEAREST,[UI]:e.LINEAR_MIPMAP_LINEAR},R={512:e.NEVER,519:e.ALWAYS,513:e.LESS,515:e.LEQUAL,514:e.EQUAL,518:e.GEQUAL,516:e.GREATER,517:e.NOTEQUAL};function P(n,a,o){if(o?(e.texParameteri(n,e.TEXTURE_WRAP_S,O[a.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,O[a.wrapT]),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,O[a.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,N[a.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,N[a.minFilter])):(e.texParameteri(n,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(n,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,e.CLAMP_TO_EDGE),a.wrapS===RI&&a.wrapT===RI||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,e.TEXTURE_MAG_FILTER,T(a.magFilter)),e.texParameteri(n,e.TEXTURE_MIN_FILTER,T(a.minFilter)),a.minFilter!==LI&&a.minFilter!==FI&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),a.compareFunction&&(e.texParameteri(n,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(n,e.TEXTURE_COMPARE_FUNC,R[a.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){const o=t.get("EXT_texture_filter_anisotropic");if(a.magFilter===LI)return;if(a.minFilter!==DI&&a.minFilter!==UI)return;if(a.type===$I&&!1===t.has("OES_texture_float_linear"))return;if(!1===s&&a.type===HI&&!1===t.has("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(e.texParameterf(n,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function L(t,n){let r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",A));const i=n.source;let a=b.get(i);void 0===a&&(a={},b.set(i,a));const s=function(e){const t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}(n);if(s!==t.__cacheKey){void 0===a[s]&&(a[s]={texture:e.createTexture(),usedTimes:0},o.memory.textures++,r=!0),a[s].usedTimes++;const i=a[t.__cacheKey];void 0!==i&&(a[t.__cacheKey].usedTimes--,0===i.usedTimes&&C(n)),t.__cacheKey=s,t.__webglTexture=a[s].texture}return r}function D(t,i,o){let c=e.TEXTURE_2D;(i.isDataArrayTexture||i.isCompressedArrayTexture)&&(c=e.TEXTURE_2D_ARRAY),i.isData3DTexture&&(c=e.TEXTURE_3D);const l=L(t,i),f=i.source;n.bindTexture(c,t.__webglTexture,e.TEXTURE0+o);const h=r.get(f);if(f.version!==h.__version||!0===l){n.activeTexture(e.TEXTURE0+o);const t=HO.getPrimaries(HO.workingColorSpace),r=i.colorSpace===rO?null:HO.getPrimaries(i.colorSpace),d=i.colorSpace===rO||t===r?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,i.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,i.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,d);const p=function(e){return!s&&(e.wrapS!==RI||e.wrapT!==RI||e.minFilter!==LI&&e.minFilter!==FI)}(i)&&!1===y(i.image);let g=v(i.image,p,!1,u);g=$(i,g);const b=y(g)||s,m=a.convert(i.format,i.colorSpace);let w,T=a.convert(i.type),A=S(i.internalFormat,m,T,i.colorSpace,i.isVideoTexture);P(c,i,b);const k=i.mipmaps,C=s&&!0!==i.isVideoTexture,M=void 0===h.__version||!0===l,I=x(i,g,b);if(i.isDepthTexture)A=e.DEPTH_COMPONENT,s?A=i.type===$I?e.DEPTH_COMPONENT32F:i.type===zI?e.DEPTH_COMPONENT24:i.type===GI?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT16:i.type===$I&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),i.format===WI&&A===e.DEPTH_COMPONENT&&i.type!==BI&&i.type!==zI&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=zI,T=a.convert(i.type)),i.format===qI&&A===e.DEPTH_COMPONENT&&(A=e.DEPTH_STENCIL,i.type!==GI&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=GI,T=a.convert(i.type))),M&&(C?n.texStorage2D(e.TEXTURE_2D,1,A,g.width,g.height):n.texImage2D(e.TEXTURE_2D,0,A,g.width,g.height,0,m,T,null));else if(i.isDataTexture)if(k.length>0&&b){C&&M&&n.texStorage2D(e.TEXTURE_2D,I,A,k[0].width,k[0].height);for(let t=0,r=k.length;t>=1,r>>=1}}else if(k.length>0&&b){C&&M&&n.texStorage2D(e.TEXTURE_2D,I,A,k[0].width,k[0].height);for(let t=0,r=k.length;t>l),r=Math.max(1,i.height>>l);c===e.TEXTURE_3D||c===e.TEXTURE_2D_ARRAY?n.texImage3D(c,l,d,t,r,i.depth,0,u,f,null):n.texImage2D(c,l,d,t,r,0,u,f,null)}n.bindFramebuffer(e.FRAMEBUFFER,t),z(i)?h.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,s,c,r.get(o).__webglTexture,0,B(i)):(c===e.TEXTURE_2D||c>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&c<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,s,c,r.get(o).__webglTexture,l),n.bindFramebuffer(e.FRAMEBUFFER,null)}function U(t,n,r){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer&&!n.stencilBuffer){let i=!0===s?e.DEPTH_COMPONENT24:e.DEPTH_COMPONENT16;if(r||z(n)){const t=n.depthTexture;t&&t.isDepthTexture&&(t.type===$I?i=e.DEPTH_COMPONENT32F:t.type===zI&&(i=e.DEPTH_COMPONENT24));const r=B(n);z(n)?h.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,r,i,n.width,n.height):e.renderbufferStorageMultisample(e.RENDERBUFFER,r,i,n.width,n.height)}else e.renderbufferStorage(e.RENDERBUFFER,i,n.width,n.height);e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)}else if(n.depthBuffer&&n.stencilBuffer){const i=B(n);r&&!1===z(n)?e.renderbufferStorageMultisample(e.RENDERBUFFER,i,e.DEPTH24_STENCIL8,n.width,n.height):z(n)?h.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,i,e.DEPTH24_STENCIL8,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t)}else{const t=!0===n.isWebGLMultipleRenderTargets?n.texture:[n.texture];for(let i=0;i0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function $(e,n){const r=e.colorSpace,i=e.format,a=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||e.format===pO||r!==aO&&r!==rO&&(HO.getTransfer(r)===lO?!1===s?!0===t.has("EXT_sRGB")&&i===VI?(e.format=pO,e.minFilter=FI,e.generateMipmaps=!1):n=qO.sRGBToLinear(n):i===VI&&a===jI||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",r)),n}this.allocateTextureUnit=function(){const e=M;return e>=c&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+c),M+=1,e},this.resetTextureUnits=function(){M=0},this.setTexture2D=I,this.setTexture2DArray=function(t,i){const a=r.get(t);t.version>0&&a.__version!==t.version?D(a,t,i):n.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+i)},this.setTexture3D=function(t,i){const a=r.get(t);t.version>0&&a.__version!==t.version?D(a,t,i):n.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+i)},this.setTextureCube=function(t,i){const o=r.get(t);t.version>0&&o.__version!==t.version?function(t,i,o){if(6!==i.image.length)return;const c=L(t,i),u=i.source;n.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+o);const f=r.get(u);if(u.version!==f.__version||!0===c){n.activeTexture(e.TEXTURE0+o);const t=HO.getPrimaries(HO.workingColorSpace),r=i.colorSpace===rO?null:HO.getPrimaries(i.colorSpace),h=i.colorSpace===rO||t===r?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,i.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,i.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,h);const d=i.isCompressedTexture||i.image[0].isCompressedTexture,p=i.image[0]&&i.image[0].isDataTexture,g=[];for(let e=0;e<6;e++)g[e]=d||p?p?i.image[e].image:i.image[e]:v(i.image[e],!1,!0,l),g[e]=$(i,g[e]);const b=g[0],m=y(b)||s,w=a.convert(i.format,i.colorSpace),T=a.convert(i.type),A=S(i.internalFormat,w,T,i.colorSpace),k=s&&!0!==i.isVideoTexture,C=void 0===f.__version||!0===c;let M,I=x(i,b,m);if(P(e.TEXTURE_CUBE_MAP,i,m),d){k&&C&&n.texStorage2D(e.TEXTURE_CUBE_MAP,I,A,b.width,b.height);for(let t=0;t<6;t++){M=g[t].mipmaps;for(let r=0;r0&&I++,n.texStorage2D(e.TEXTURE_CUBE_MAP,I,A,g[0].width,g[0].height));for(let t=0;t<6;t++)if(p){k?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,g[t].width,g[t].height,w,T,g[t].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,A,g[t].width,g[t].height,0,w,T,g[t].data);for(let r=0;r0){l.__webglFramebuffer[t]=[];for(let n=0;n0){l.__webglFramebuffer=[];for(let t=0;t0&&!1===z(t)){const r=h?c:[c];l.__webglMultisampledFramebuffer=e.createFramebuffer(),l.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,l.__webglMultisampledFramebuffer);for(let n=0;n0)for(let r=0;r0)for(let n=0;n0&&!1===z(t)){const i=t.isWebGLMultipleRenderTargets?t.texture:[t.texture],a=t.width,o=t.height;let s=e.COLOR_BUFFER_BIT;const c=[],l=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,u=r.get(t),f=!0===t.isWebGLMultipleRenderTargets;if(f)for(let t=0;ts+l?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&o<=s-l&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==s&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1));null!==o&&(r=t.getPose(e.targetRaySpace,n),null===r&&null!==i&&(r=i),null!==r&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(eF)))}return null!==o&&(o.visible=null!==r),null!==s&&(s.visible=null!==i),null!==c&&(c.visible=null!==a),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const n=new JD;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class nF extends QO{constructor(e,t,n,r,i,a,o,s,c,l){if((l=void 0!==l?l:WI)!==WI&&l!==qI)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&l===WI&&(n=zI),void 0===n&&l===qI&&(n=GI),super(null,r,i,a,o,s,l,n,c),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=void 0!==o?o:LI,this.minFilter=void 0!==s?s:LI,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return null!==this.compareFunction&&(t.compareFunction=this.compareFunction),t}}class rF extends mO{constructor(e,t){super();const n=this;let r=null,i=1,a=null,o="local-floor",s=1,c=null,l=null,u=null,f=null,h=null,d=null;const p=t.getContextAttributes();let g=null,b=null;const m=[],w=[],v=new pP;v.layers.enable(1),v.viewport=new JO;const y=new pP;y.layers.enable(2),y.viewport=new JO;const E=[v,y],_=new QD;_.layers.enable(1),_.layers.enable(2);let S=null,x=null;function T(e){const t=w.indexOf(e.inputSource);if(-1===t)return;const n=m[t];void 0!==n&&(n.update(e.inputSource,e.frame,c||a),n.dispatchEvent({type:e.type,data:e.inputSource}))}function A(){r.removeEventListener("select",T),r.removeEventListener("selectstart",T),r.removeEventListener("selectend",T),r.removeEventListener("squeeze",T),r.removeEventListener("squeezestart",T),r.removeEventListener("squeezeend",T),r.removeEventListener("end",A),r.removeEventListener("inputsourceschange",k);for(let e=0;e=0&&(w[r]=null,m[r].disconnect(n))}for(let t=0;t=w.length){w.push(n),r=e;break}if(null===w[e]){w[e]=n,r=e;break}}if(-1===r)break}const i=m[r];i&&i.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=m[e];return void 0===t&&(t=new tF,m[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=m[e];return void 0===t&&(t=new tF,m[e]=t),t.getGripSpace()},this.getHand=function(e){let t=m[e];return void 0===t&&(t=new tF,m[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){i=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){o=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||a},this.setReferenceSpace=function(e){c=e},this.getBaseLayer=function(){return null!==f?f:h},this.getBinding=function(){return u},this.getFrame=function(){return d},this.getSession=function(){return r},this.setSession=async function(l){if(r=l,null!==r){if(g=e.getRenderTarget(),r.addEventListener("select",T),r.addEventListener("selectstart",T),r.addEventListener("selectend",T),r.addEventListener("squeeze",T),r.addEventListener("squeezestart",T),r.addEventListener("squeezeend",T),r.addEventListener("end",A),r.addEventListener("inputsourceschange",k),!0!==p.xrCompatible&&await t.makeXRCompatible(),void 0===r.renderState.layers||!1===e.capabilities.isWebGL2){const n={antialias:void 0!==r.renderState.layers||p.antialias,alpha:!0,depth:p.depth,stencil:p.stencil,framebufferScaleFactor:i};h=new XRWebGLLayer(r,t,n),r.updateRenderState({baseLayer:h}),b=new tN(h.framebufferWidth,h.framebufferHeight,{format:VI,type:jI,colorSpace:e.outputColorSpace,stencilBuffer:p.stencil})}else{let n=null,a=null,o=null;p.depth&&(o=p.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,n=p.stencil?qI:WI,a=p.stencil?GI:zI);const s={colorFormat:t.RGBA8,depthFormat:o,scaleFactor:i};u=new XRWebGLBinding(r,t),f=u.createProjectionLayer(s),r.updateRenderState({layers:[f]}),b=new tN(f.textureWidth,f.textureHeight,{format:VI,type:jI,depthTexture:new nF(f.textureWidth,f.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:p.stencil,colorSpace:e.outputColorSpace,samples:p.antialias?4:0}),e.properties.get(b).__ignoreDepthValues=f.ignoreDepthValues}b.isXRRenderTarget=!0,this.setFoveation(s),c=null,a=await r.requestReferenceSpace(o),N.setContext(r),N.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode};const C=new aN,M=new aN;function I(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===r)return;_.near=y.near=v.near=e.near,_.far=y.far=v.far=e.far,S===_.near&&x===_.far||(r.updateRenderState({depthNear:_.near,depthFar:_.far}),S=_.near,x=_.far);const t=e.parent,n=_.cameras;I(_,t);for(let e=0;e0&&(r.alphaTest.value=i.alphaTest);const a=t.get(i).envMap;if(a&&(r.envMap.value=a,r.flipEnvMap.value=a.isCubeTexture&&!1===a.isRenderTargetTexture?-1:1,r.reflectivity.value=i.reflectivity,r.ior.value=i.ior,r.refractionRatio.value=i.refractionRatio),i.lightMap){r.lightMap.value=i.lightMap;const t=!0===e._useLegacyLights?Math.PI:1;r.lightMapIntensity.value=i.lightMapIntensity*t,n(i.lightMap,r.lightMapTransform)}i.aoMap&&(r.aoMap.value=i.aoMap,r.aoMapIntensity.value=i.aoMapIntensity,n(i.aoMap,r.aoMapTransform))}return{refreshFogUniforms:function(t,n){n.color.getRGB(t.fogColor.value,uP(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)},refreshMaterialUniforms:function(e,i,a,o,s){i.isMeshBasicMaterial||i.isMeshLambertMaterial?r(e,i):i.isMeshToonMaterial?(r(e,i),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,i)):i.isMeshPhongMaterial?(r(e,i),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,i)):i.isMeshStandardMaterial?(r(e,i),function(e,r){e.metalness.value=r.metalness,r.metalnessMap&&(e.metalnessMap.value=r.metalnessMap,n(r.metalnessMap,e.metalnessMapTransform)),e.roughness.value=r.roughness,r.roughnessMap&&(e.roughnessMap.value=r.roughnessMap,n(r.roughnessMap,e.roughnessMapTransform));t.get(r).envMap&&(e.envMapIntensity.value=r.envMapIntensity)}(e,i),i.isMeshPhysicalMaterial&&function(e,t,r){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap,n(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,n(t.sheenRoughnessMap,e.sheenRoughnessMapTransform))),t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,n(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,n(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,n(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),1===t.side&&e.clearcoatNormalScale.value.negate())),t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap,n(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,n(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform))),t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,n(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,n(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)),t.anisotropy>0&&(e.anisotropyVector.value.set(t.anisotropy*Math.cos(t.anisotropyRotation),t.anisotropy*Math.sin(t.anisotropyRotation)),t.anisotropyMap&&(e.anisotropyMap.value=t.anisotropyMap,n(t.anisotropyMap,e.anisotropyMapTransform))),e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,n(t.specularColorMap,e.specularColorMapTransform)),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,n(t.specularIntensityMap,e.specularIntensityMapTransform))}(e,i,s)):i.isMeshMatcapMaterial?(r(e,i),function(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,i)):i.isMeshDepthMaterial?r(e,i):i.isMeshDistanceMaterial?(r(e,i),function(e,n){const r=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),e.nearDistance.value=r.shadow.camera.near,e.farDistance.value=r.shadow.camera.far}(e,i)):i.isMeshNormalMaterial?r(e,i):i.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform))}(e,i),i.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,i)):i.isPointsMaterial?function(e,t,r,i){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*r,e.scale.value=.5*i,t.map&&(e.map.value=t.map,n(t.map,e.uvTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,i,a,o):i.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,i):i.isShadowMaterial?(e.color.value.copy(i.color),e.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function aF(e,t,n,r){let i={},a={},o=[];const s=n.isWebGL2?e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS):0;function c(e,t,n){const r=e.value;if(void 0===n[t]){if("number"==typeof r)n[t]=r;else{const e=Array.isArray(r)?r:[r],i=[];for(let t=0;t0&&(r=n%16,0!==r&&16-r-a.boundary<0&&(n+=16-r,i.__offset=n)),n+=a.storage}r=n%16,r>0&&(n+=16-r),e.__size=n,e.__cache={}}(n),h=function(t){const n=function(){for(let e=0;e0),f=!!n.morphAttributes.position,h=!!n.morphAttributes.normal,d=!!n.morphAttributes.color;let p=SI;r.toneMapped&&(null!==_&&!0!==_.isXRRenderTarget||(p=w.toneMapping));const b=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,m=void 0!==b?b.length:0,v=Z.get(r),y=g.state.lights;if(!0===j&&(!0===B||e!==x)){const t=e===x&&r.id===S;ce.setState(r,e,t)}let E=!1;r.version===v.__version?v.needsLights&&v.lightsStateVersion!==y.state.version||v.outputColorSpace!==s||i.isInstancedMesh&&!1===v.instancing?E=!0:i.isInstancedMesh||!0!==v.instancing?i.isSkinnedMesh&&!1===v.skinning?E=!0:i.isSkinnedMesh||!0!==v.skinning?i.isInstancedMesh&&!0===v.instancingColor&&null===i.instanceColor||i.isInstancedMesh&&!1===v.instancingColor&&null!==i.instanceColor||v.envMap!==c||!0===r.fog&&v.fog!==a?E=!0:void 0===v.numClippingPlanes||v.numClippingPlanes===ce.numPlanes&&v.numIntersection===ce.numIntersection?(v.vertexAlphas!==l||v.vertexTangents!==u||v.morphTargets!==f||v.morphNormals!==h||v.morphColors!==d||v.toneMapping!==p||!0===X.isWebGL2&&v.morphTargetsCount!==m)&&(E=!0):E=!0:E=!0:E=!0:(E=!0,v.__version=r.version);let T=v.currentProgram;!0===E&&(T=Pe(r,t,i));let A=!1,k=!1,C=!1;const M=T.getUniforms(),I=v.uniforms;if(Y.useProgram(T.program)&&(A=!0,k=!0,C=!0),r.id!==S&&(S=r.id,k=!0),A||x!==e){M.setValue(me,"projectionMatrix",e.projectionMatrix),M.setValue(me,"viewMatrix",e.matrixWorldInverse);const t=M.map.cameraPosition;void 0!==t&&t.setValue(me,G.setFromMatrixPosition(e.matrixWorld)),X.logarithmicDepthBuffer&&M.setValue(me,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&M.setValue(me,"isOrthographic",!0===e.isOrthographicCamera),x!==e&&(x=e,k=!0,C=!0)}if(i.isSkinnedMesh){M.setOptional(me,i,"bindMatrix"),M.setOptional(me,i,"bindMatrixInverse");const e=i.skeleton;e&&(X.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),M.setValue(me,"boneTexture",e.boneTexture,Q),M.setValue(me,"boneTextureSize",e.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}const R=n.morphAttributes;if((void 0!==R.position||void 0!==R.normal||void 0!==R.color&&!0===X.isWebGL2)&&fe.update(i,n,T),(k||v.receiveShadow!==i.receiveShadow)&&(v.receiveShadow=i.receiveShadow,M.setValue(me,"receiveShadow",i.receiveShadow)),r.isMeshGouraudMaterial&&null!==r.envMap&&(I.envMap.value=c,I.flipEnvMap.value=c.isCubeTexture&&!1===c.isRenderTargetTexture?-1:1),k&&(M.setValue(me,"toneMappingExposure",w.toneMappingExposure),v.needsLights&&function(e,t){e.ambientLightColor.needsUpdate=t,e.lightProbe.needsUpdate=t,e.directionalLights.needsUpdate=t,e.directionalLightShadows.needsUpdate=t,e.pointLights.needsUpdate=t,e.pointLightShadows.needsUpdate=t,e.spotLights.needsUpdate=t,e.spotLightShadows.needsUpdate=t,e.rectAreaLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}(I,C),a&&!0===r.fog&&ae.refreshFogUniforms(I,a),ae.refreshMaterialUniforms(I,r,N,O,z),hD.upload(me,Le(v),I,Q)),r.isShaderMaterial&&!0===r.uniformsNeedUpdate&&(hD.upload(me,Le(v),I,Q),r.uniformsNeedUpdate=!1),r.isSpriteMaterial&&M.setValue(me,"center",i.center),M.setValue(me,"modelViewMatrix",i.modelViewMatrix),M.setValue(me,"normalMatrix",i.normalMatrix),M.setValue(me,"modelMatrix",i.matrixWorld),r.isShaderMaterial||r.isRawShaderMaterial){const e=r.uniformsGroups;for(let t=0,n=e.length;t{function n(){r.forEach((function(e){Z.get(e).currentProgram.isReady()&&r.delete(e)})),0!==r.size?setTimeout(n,10):t(e)}null!==q.get("KHR_parallel_shader_compile")?n():setTimeout(n,10)}))};let Ae=null;function ke(){Me.stop()}function Ce(){Me.start()}const Me=new AP;function Ie(e,t,n,r){if(!1===e.visible)return;if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)g.pushLight(e),e.castShadow&&g.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||U.intersectsSprite(e)){r&&G.setFromMatrixPosition(e.matrixWorld).applyMatrix4($);const t=re.update(e),i=e.material;i.visible&&p.push(e,t,i,n,G.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||U.intersectsObject(e))){const t=re.update(e),i=e.material;if(r&&(void 0!==e.boundingSphere?(null===e.boundingSphere&&e.computeBoundingSphere(),G.copy(e.boundingSphere.center)):(null===t.boundingSphere&&t.computeBoundingSphere(),G.copy(t.boundingSphere.center)),G.applyMatrix4(e.matrixWorld).applyMatrix4($)),Array.isArray(i)){const r=t.groups;for(let a=0,o=r.length;a0&&function(e,t,n,r){if(null!==(!0===n.isScene?n.overrideMaterial:null))return;const i=X.isWebGL2;null===z&&(z=new tN(1,1,{generateMipmaps:!0,type:q.has("EXT_color_buffer_half_float")?HI:jI,minFilter:UI,samples:i?4:0})),w.getDrawingBufferSize(H),i?z.setSize(H.x,H.y):z.setSize(kO(H.x),kO(H.y));const a=w.getRenderTarget();w.setRenderTarget(z),w.getClearColor(C),M=w.getClearAlpha(),M<1&&w.setClearColor(16777215,.5),w.clear();const o=w.toneMapping;w.toneMapping=SI,Ne(e,n,r),Q.updateMultisampleRenderTarget(z),Q.updateRenderTargetMipmap(z);let s=!1;for(let e=0,i=t.length;e0&&Ne(i,t,n),a.length>0&&Ne(a,t,n),o.length>0&&Ne(o,t,n),Y.buffers.depth.setTest(!0),Y.buffers.depth.setMask(!0),Y.buffers.color.setMask(!0),Y.setPolygonOffset(!1)}function Ne(e,t,n){const r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,a=e.length;i0?m[m.length-1]:null,b.pop(),p=b.length>0?b[b.length-1]:null},this.getActiveCubeFace=function(){return y},this.getActiveMipmapLevel=function(){return E},this.getRenderTarget=function(){return _},this.setRenderTargetTextures=function(e,t,n){Z.get(e.texture).__webglTexture=t,Z.get(e.depthTexture).__webglTexture=n;const r=Z.get(e);r.__hasExternalTextures=!0,r.__hasExternalTextures&&(r.__autoAllocateDepthBuffer=void 0===n,r.__autoAllocateDepthBuffer||!0===q.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),r.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){const n=Z.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,n=0){_=e,y=t,E=n;let r=!0,i=null,a=!1,o=!1;if(e){const s=Z.get(e);void 0!==s.__useDefaultFramebuffer?(Y.bindFramebuffer(me.FRAMEBUFFER,null),r=!1):void 0===s.__webglFramebuffer?Q.setupRenderTarget(e):s.__hasExternalTextures&&Q.rebindTextures(e,Z.get(e.texture).__webglTexture,Z.get(e.depthTexture).__webglTexture);const c=e.texture;(c.isData3DTexture||c.isDataArrayTexture||c.isCompressedArrayTexture)&&(o=!0);const l=Z.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(i=Array.isArray(l[t])?l[t][n]:l[t],a=!0):i=X.isWebGL2&&e.samples>0&&!1===Q.useMultisampledRTT(e)?Z.get(e).__webglMultisampledFramebuffer:Array.isArray(l)?l[n]:l,T.copy(e.viewport),A.copy(e.scissor),k=e.scissorTest}else T.copy(L).multiplyScalar(N).floor(),A.copy(D).multiplyScalar(N).floor(),k=F;if(Y.bindFramebuffer(me.FRAMEBUFFER,i)&&X.drawBuffers&&r&&Y.drawBuffers(e,i),Y.viewport(T),Y.scissor(A),Y.setScissorTest(k),a){const r=Z.get(e.texture);me.framebufferTexture2D(me.FRAMEBUFFER,me.COLOR_ATTACHMENT0,me.TEXTURE_CUBE_MAP_POSITIVE_X+t,r.__webglTexture,n)}else if(o){const r=Z.get(e.texture),i=t||0;me.framebufferTextureLayer(me.FRAMEBUFFER,me.COLOR_ATTACHMENT0,r.__webglTexture,n||0,i)}S=-1},this.readRenderTargetPixels=function(e,t,n,r,i,a,o){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let s=Z.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==o&&(s=s[o]),s){Y.bindFramebuffer(me.FRAMEBUFFER,s);try{const o=e.texture,s=o.format,c=o.type;if(s!==VI&&pe.convert(s)!==me.getParameter(me.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const l=c===HI&&(q.has("EXT_color_buffer_half_float")||X.isWebGL2&&q.has("EXT_color_buffer_float"));if(!(c===jI||pe.convert(c)===me.getParameter(me.IMPLEMENTATION_COLOR_READ_TYPE)||c===$I&&(X.isWebGL2||q.has("OES_texture_float")||q.has("WEBGL_color_buffer_float"))||l))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&me.readPixels(t,n,r,i,pe.convert(s),pe.convert(c),a)}finally{const e=null!==_?Z.get(_).__webglFramebuffer:null;Y.bindFramebuffer(me.FRAMEBUFFER,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){const r=Math.pow(2,-n),i=Math.floor(t.image.width*r),a=Math.floor(t.image.height*r);Q.setTexture2D(t,0),me.copyTexSubImage2D(me.TEXTURE_2D,n,0,0,e.x,e.y,i,a),Y.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r=0){const i=t.image.width,a=t.image.height,o=pe.convert(n.format),s=pe.convert(n.type);Q.setTexture2D(n,0),me.pixelStorei(me.UNPACK_FLIP_Y_WEBGL,n.flipY),me.pixelStorei(me.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),me.pixelStorei(me.UNPACK_ALIGNMENT,n.unpackAlignment),t.isDataTexture?me.texSubImage2D(me.TEXTURE_2D,r,e.x,e.y,i,a,o,s,t.image.data):t.isCompressedTexture?me.compressedTexSubImage2D(me.TEXTURE_2D,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,o,t.mipmaps[0].data):me.texSubImage2D(me.TEXTURE_2D,r,e.x,e.y,o,s,t.image),0===r&&n.generateMipmaps&&me.generateMipmap(me.TEXTURE_2D),Y.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,i=0){if(w.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const a=e.max.x-e.min.x+1,o=e.max.y-e.min.y+1,s=e.max.z-e.min.z+1,c=pe.convert(r.format),l=pe.convert(r.type);let u;if(r.isData3DTexture)Q.setTexture3D(r,0),u=me.TEXTURE_3D;else{if(!r.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");Q.setTexture2DArray(r,0),u=me.TEXTURE_2D_ARRAY}me.pixelStorei(me.UNPACK_FLIP_Y_WEBGL,r.flipY),me.pixelStorei(me.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),me.pixelStorei(me.UNPACK_ALIGNMENT,r.unpackAlignment);const f=me.getParameter(me.UNPACK_ROW_LENGTH),h=me.getParameter(me.UNPACK_IMAGE_HEIGHT),d=me.getParameter(me.UNPACK_SKIP_PIXELS),p=me.getParameter(me.UNPACK_SKIP_ROWS),g=me.getParameter(me.UNPACK_SKIP_IMAGES),b=n.isCompressedTexture?n.mipmaps[0]:n.image;me.pixelStorei(me.UNPACK_ROW_LENGTH,b.width),me.pixelStorei(me.UNPACK_IMAGE_HEIGHT,b.height),me.pixelStorei(me.UNPACK_SKIP_PIXELS,e.min.x),me.pixelStorei(me.UNPACK_SKIP_ROWS,e.min.y),me.pixelStorei(me.UNPACK_SKIP_IMAGES,e.min.z),n.isDataTexture||n.isData3DTexture?me.texSubImage3D(u,i,t.x,t.y,t.z,a,o,s,c,l,b.data):n.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),me.compressedTexSubImage3D(u,i,t.x,t.y,t.z,a,o,s,c,b.data)):me.texSubImage3D(u,i,t.x,t.y,t.z,a,o,s,c,l,b),me.pixelStorei(me.UNPACK_ROW_LENGTH,f),me.pixelStorei(me.UNPACK_IMAGE_HEIGHT,h),me.pixelStorei(me.UNPACK_SKIP_PIXELS,d),me.pixelStorei(me.UNPACK_SKIP_ROWS,p),me.pixelStorei(me.UNPACK_SKIP_IMAGES,g),0===i&&r.generateMipmaps&&me.generateMipmap(u),Y.unbindTexture()},this.initTexture=function(e){e.isCubeTexture?Q.setTextureCube(e,0):e.isData3DTexture?Q.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?Q.setTexture2DArray(e,0):Q.setTexture2D(e,0),Y.unbindTexture()},this.resetState=function(){y=0,E=0,_=null,Y.reset(),ge.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return gO}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===oO?"display-p3":"srgb",t.unpackColorSpace=HO.workingColorSpace===sO?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===iO?nO:3e3}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===nO?iO:aO}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 extends oF{}).prototype.isWebGL1Renderer=!0;class sF extends AR{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new SR(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const cF=new aN,lF=new aN,uF=new LN,fF=new PN,hF=new AN;class dF{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}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 t=[];let n,r=this.getPoint(0),i=0;t.push(0);for(let a=1;a<=e;a++)n=this.getPoint(a/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let r=0;const i=n.length;let a;a=t||e*n[i-1];let o,s=0,c=i-1;for(;s<=c;)if(r=Math.floor(s+(c-s)/2),o=n[r]-a,o<0)s=r+1;else{if(!(o>0)){c=r;break}c=r-1}if(r=c,n[r]===a)return r/(i-1);const l=n[r];return(r+(a-l)/(n[r+1]-l))/(i-1)}getTangent(e,t){const n=1e-4;let r=e-n,i=e+n;r<0&&(r=0),i>1&&(i=1);const a=this.getPoint(r),o=this.getPoint(i),s=t||(a.isVector2?new OO:new aN);return s.copy(o).sub(a).normalize(),s}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new aN,r=[],i=[],a=[],o=new aN,s=new LN;for(let t=0;t<=e;t++){const n=t/e;r[t]=this.getTangentAt(n,new aN)}i[0]=new aN,a[0]=new aN;let c=Number.MAX_VALUE;const l=Math.abs(r[0].x),u=Math.abs(r[0].y),f=Math.abs(r[0].z);l<=c&&(c=l,n.set(1,0,0)),u<=c&&(c=u,n.set(0,1,0)),f<=c&&n.set(0,0,1),o.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],o),a[0].crossVectors(r[0],i[0]);for(let t=1;t<=e;t++){if(i[t]=i[t-1].clone(),a[t]=a[t-1].clone(),o.crossVectors(r[t-1],r[t]),o.length()>Number.EPSILON){o.normalize();const e=Math.acos(SO(r[t-1].dot(r[t]),-1,1));i[t].applyMatrix4(s.makeRotationAxis(o,e))}a[t].crossVectors(r[t],i[t])}if(!0===t){let t=Math.acos(SO(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(o.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(s.makeRotationAxis(r[n],t*n)),a[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:a}}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 pF extends dF{constructor(e=0,t=0,n=1,r=1,i=0,a=2*Math.PI,o=!1,s=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=a,this.aClockwise=o,this.aRotation=s}getPoint(e,t){const n=t||new OO,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const a=Math.abs(i)r;)i-=r;i0?0:(Math.floor(Math.abs(c)/i)+1)*i:0===l&&c===i-1&&(c=i-2,l=1),this.closed||c>0?o=r[(c-1)%i]:(bF.subVectors(r[0],r[1]).add(r[0]),o=bF);const u=r[c%i],f=r[(c+1)%i];if(this.closed||c+2r.length-2?r.length-1:a+1],u=r[a>r.length-3?r.length-1:a+2];return n.set(yF(o,s.x,c.x,l.x,u.x),yF(o,s.y,c.y,l.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t0&&m(!0),t>0&&m(!1)),this.setIndex(l),this.setAttribute("position",new RR(u,3)),this.setAttribute("normal",new RR(f,3)),this.setAttribute("uv",new RR(h,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new AF(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class kF extends AF{constructor(e=1,t=1,n=32,r=1,i=!1,a=0,o=2*Math.PI){super(0,e,t,n,r,i,a,o),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:a,thetaLength:o}}static fromJSON(e){return new kF(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class CF extends zR{constructor(e=1,t=32,n=16,r=0,i=2*Math.PI,a=0,o=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:a,thetaLength:o},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const s=Math.min(a+o,Math.PI);let c=0;const l=[],u=new aN,f=new aN,h=[],d=[],p=[],g=[];for(let h=0;h<=n;h++){const b=[],m=h/n;let w=0;0===h&&0===a?w=.5/t:h===n&&s===Math.PI&&(w=-.5/t);for(let n=0;n<=t;n++){const s=n/t;u.x=-e*Math.cos(r+s*i)*Math.sin(a+m*o),u.y=e*Math.cos(a+m*o),u.z=e*Math.sin(r+s*i)*Math.sin(a+m*o),d.push(u.x,u.y,u.z),f.copy(u).normalize(),p.push(f.x,f.y,f.z),g.push(s+w,1-m),b.push(c++)}l.push(b)}for(let e=0;e0)&&h.push(t,i,c),(e!==n-1||s=i)break e;{const o=t[1];e=i)break t}a=n,n=0}}for(;n>>1;et;)--a;if(++a,0!==i||a!==r){i>=a&&(a=Math.max(a,1),i=a-1);const e=this.getValueSize();this.times=n.slice(i,a),this.values=this.values.slice(i*e,a*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let t=0;t!==i;t++){const r=n[t];if("number"==typeof r&&isNaN(r)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,r),e=!1;break}if(null!==a&&a>r){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,r,a),e=!1;break}a=r}if(void 0!==r&&function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(r))for(let t=0,n=r.length;t!==n;++t){const n=r[t];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,n),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===tO,i=e.length-1;let a=1;for(let o=1;o0){e[a]=e[i];for(let e=i*n,r=a*n,o=0;o!==n;++o)t[r+o]=t[e+o];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}LF.prototype.TimeBufferType=Float32Array,LF.prototype.ValueBufferType=Float32Array,LF.prototype.DefaultInterpolation=eO;class DF extends LF{}DF.prototype.ValueTypeName="bool",DF.prototype.ValueBufferType=Array,DF.prototype.DefaultInterpolation=JI,DF.prototype.InterpolantFactoryMethodLinear=void 0,DF.prototype.InterpolantFactoryMethodSmooth=void 0;(class extends LF{}).prototype.ValueTypeName="color";(class extends LF{}).prototype.ValueTypeName="number";class FF extends OF{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=(n-t)/(r-t);let c=e*o;for(let e=c+o;c!==e;c+=4)iN.slerpFlat(i,0,a,c-o,a,c,s);return i}}class UF extends LF{InterpolantFactoryMethodLinear(e){return new FF(this.times,this.values,this.getValueSize(),e)}}UF.prototype.ValueTypeName="quaternion",UF.prototype.DefaultInterpolation=eO,UF.prototype.InterpolantFactoryMethodSmooth=void 0;class jF extends LF{}jF.prototype.ValueTypeName="string",jF.prototype.ValueBufferType=Array,jF.prototype.DefaultInterpolation=JI,jF.prototype.InterpolantFactoryMethodLinear=void 0,jF.prototype.InterpolantFactoryMethodSmooth=void 0;(class extends LF{}).prototype.ValueTypeName="vector";const BF={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class zF{constructor(e,t,n){const r=this;let i,a=!1,o=0,s=0;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){s++,!1===a&&void 0!==r.onStart&&r.onStart(e,o,s),a=!0},this.itemEnd=function(e){o++,void 0!==r.onProgress&&r.onProgress(e,o,s),o===s&&(a=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return i?i(e):e},this.setURLModifier=function(e){return i=e,this},this.addHandler=function(e,t){return c.push(e,t),this},this.removeHandler=function(e){const t=c.indexOf(e);return-1!==t&&c.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=c.length;t0){const e=a[0].object;uU.setFromNormalAndCoplanarPoint(t.getWorldDirection(uU.normal),gU.setFromMatrixPosition(e.matrixWorld)),i!==e&&null!==i&&(o.dispatchEvent({type:"hoveroff",object:i}),n.style.cursor="auto",i=null),i!==e&&(o.dispatchEvent({type:"hoveron",object:e}),n.style.cursor="pointer",i=e)}else null!==i&&(o.dispatchEvent({type:"hoveroff",object:i}),n.style.cursor="auto",i=null)}}function u(i){!1!==o.enabled&&(h(i),a.length=0,fU.setFromCamera(hU,t),fU.intersectObjects(e,o.recursive,a),a.length>0&&(r=!0===o.transformGroup?e[0]:a[0].object,uU.setFromNormalAndCoplanarPoint(t.getWorldDirection(uU.normal),gU.setFromMatrixPosition(r.matrixWorld)),fU.ray.intersectPlane(uU,pU)&&(bU.copy(r.parent.matrixWorld).invert(),dU.copy(pU).sub(gU.setFromMatrixPosition(r.matrixWorld))),n.style.cursor="move",o.dispatchEvent({type:"dragstart",object:r})))}function f(){!1!==o.enabled&&(r&&(o.dispatchEvent({type:"dragend",object:r}),r=null),n.style.cursor=i?"pointer":"auto")}function h(e){const t=n.getBoundingClientRect();hU.x=(e.clientX-t.left)/t.width*2-1,hU.y=-(e.clientY-t.top)/t.height*2+1}s(),this.enabled=!0,this.recursive=!0,this.transformGroup=!1,this.activate=s,this.deactivate=c,this.dispose=function(){c()},this.getObjects=function(){return e},this.getRaycaster=function(){return fU}}}const wU=4294967296;function vU(e){return e.x}function yU(e){return e.y}function EU(e){return e.z}var _U=Math.PI*(3-Math.sqrt(5)),SU=20*Math.PI/(9+Math.sqrt(221));function xU(e,t){t=t||2;var n,r=Math.min(3,Math.max(1,Math.round(t))),i=1,a=.001,o=1-Math.pow(a,1/300),s=0,c=.6,l=new Map,u=PA(d),f=vA("tick","end"),h=function(){let e=1;return()=>(e=(1664525*e+1013904223)%wU)/wU}();function d(){p(),f.call("tick",n),i1&&(null==u.fy?u.y+=u.vy*=c:(u.y=u.fy,u.vy=0)),r>2&&(null==u.fz?u.z+=u.vz*=c:(u.z=u.fz,u.vz=0));return n}function g(){for(var t,n=0,i=e.length;n1&&isNaN(t.y)||r>2&&isNaN(t.z)){var a=10*(r>2?Math.cbrt(.5+n):r>1?Math.sqrt(.5+n):n),o=n*_U,s=n*SU;1===r?t.x=a:2===r?(t.x=a*Math.cos(o),t.y=a*Math.sin(o)):(t.x=a*Math.sin(o)*Math.cos(s),t.y=a*Math.cos(o),t.z=a*Math.sin(o)*Math.sin(s))}(isNaN(t.vx)||r>1&&isNaN(t.vy)||r>2&&isNaN(t.vz))&&(t.vx=0,r>1&&(t.vy=0),r>2&&(t.vz=0))}}function b(t){return t.initialize&&t.initialize(e,h,r),t}return null==e&&(e=[]),g(),n={tick:p,restart:function(){return u.restart(d),n},stop:function(){return u.stop(),n},numDimensions:function(e){return arguments.length?(r=Math.min(3,Math.max(1,Math.round(e))),l.forEach(b),n):r},nodes:function(t){return arguments.length?(e=t,g(),l.forEach(b),n):e},alpha:function(e){return arguments.length?(i=+e,n):i},alphaMin:function(e){return arguments.length?(a=+e,n):a},alphaDecay:function(e){return arguments.length?(o=+e,n):+o},alphaTarget:function(e){return arguments.length?(s=+e,n):s},velocityDecay:function(e){return arguments.length?(c=1-e,n):1-c},randomSource:function(e){return arguments.length?(h=e,l.forEach(b),n):h},force:function(e,t){return arguments.length>1?(null==t?l.delete(e):l.set(e,b(t)),n):l.get(e)},find:function(){var t,n,i,a,o,s,c=Array.prototype.slice.call(arguments),l=c.shift()||0,u=(r>1?c.shift():null)||0,f=(r>2?c.shift():null)||0,h=c.shift()||1/0,d=0,p=e.length;for(h*=h,d=0;d1?(f.on(e,t),n):f.on(e)}}}function TU(e){return function(){return e}}function AU(e){return 1e-6*(e()-.5)}function kU(e){return e.index}function CU(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function MU(e){var t,n,r,i,a,o,s,c=kU,l=function(e){return 1/Math.min(a[e.source.index],a[e.target.index])},u=TU(30),f=1;function h(r){for(var a=0,c=e.length;a1&&(m=h.y+h.vy-u.y-u.vy||AU(s)),i>2&&(w=h.z+h.vz-u.z-u.vz||AU(s)),b*=d=((d=Math.sqrt(b*b+m*m+w*w))-n[g])/d*r*t[g],m*=d,w*=d,h.vx-=b*(p=o[g]),i>1&&(h.vy-=m*p),i>2&&(h.vz-=w*p),u.vx+=b*(p=1-p),i>1&&(u.vy+=m*p),i>2&&(u.vz+=w*p)}function d(){if(r){var i,s,l=r.length,u=e.length,f=new Map(r.map(((e,t)=>[c(e,t,r),e])));for(i=0,a=new Array(l);i"function"==typeof e))||Math.random,i=t.find((e=>[1,2,3].includes(e)))||2,d()},h.links=function(t){return arguments.length?(e=t,d(),h):e},h.id=function(e){return arguments.length?(c=e,h):c},h.iterations=function(e){return arguments.length?(f=+e,h):f},h.strength=function(e){return arguments.length?(l="function"==typeof e?e:TU(+e),p(),h):l},h.distance=function(e){return arguments.length?(u="function"==typeof e?e:TU(+e),g(),h):u},h}function IU(e,t,n){if(isNaN(t))return e;var r,i,a,o,s,c,l=e._root,u={data:n},f=e._x0,h=e._x1;if(!l)return e._root=u,e;for(;l.length;)if((o=t>=(i=(f+h)/2))?f=i:h=i,r=l,!(l=l[s=+o]))return r[s]=u,e;if(t===(a=+e._x.call(null,l.data)))return u.next=l,r?r[s]=u:e._root=u,e;do{r=r?r[s]=new Array(2):e._root=new Array(2),(o=t>=(i=(f+h)/2))?f=i:h=i}while((s=+o)==(c=+(a>=i)));return r[c]=l,r[s]=u,e}function OU(e,t,n){this.node=e,this.x0=t,this.x1=n}function NU(e){return e[0]}function RU(e,t){var n=new PU(null==t?NU:t,NaN,NaN);return null==e?n:n.addAll(e)}function PU(e,t,n){this._x=e,this._x0=t,this._x1=n,this._root=void 0}function LU(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var DU=RU.prototype=PU.prototype;function FU(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a,o,s,c,l,u,f,h,d=e._root,p={data:r},g=e._x0,b=e._y0,m=e._x1,w=e._y1;if(!d)return e._root=p,e;for(;d.length;)if((l=t>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(b+w)/2))?b=o:w=o,i=d,!(d=d[f=u<<1|l]))return i[f]=p,e;if(s=+e._x.call(null,d.data),c=+e._y.call(null,d.data),t===s&&n===c)return p.next=d,i?i[f]=p:e._root=p,e;do{i=i?i[f]=new Array(4):e._root=new Array(4),(l=t>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(b+w)/2))?b=o:w=o}while((f=u<<1|l)==(h=(c>=o)<<1|s>=a));return i[h]=d,i[f]=p,e}function UU(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function jU(e){return e[0]}function BU(e){return e[1]}function zU(e,t,n){var r=new $U(null==t?jU:t,null==n?BU:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function $U(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function HU(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}DU.copy=function(){var e,t,n=new PU(this._x,this._x0,this._x1),r=this._root;if(!r)return n;if(!r.length)return n._root=LU(r),n;for(e=[{source:r,target:n._root=new Array(2)}];r=e.pop();)for(var i=0;i<2;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(2)}):r.target[i]=LU(t));return n},DU.add=function(e){var t=+this._x.call(null,e);return IU(this.cover(t),t,e)},DU.addAll=function(e){var t,n,r=e.length,i=new Array(r),a=1/0,o=-1/0;for(t=0;to&&(o=n));if(a>o)return this;for(this.cover(a).cover(o),t=0;te||e>=n;)switch(i=+(ec||(i=a.x1)=f))&&(a=l[l.length-1],l[l.length-1]=l[l.length-1-o],l[l.length-1-o]=a)}else{var h=Math.abs(e-+this._x.call(null,u.data));h=(o=(f+h)/2))?f=o:h=o,t=u,!(u=u[c=+s]))return this;if(!u.length)break;t[c+1&1]&&(n=t,l=c)}for(;u.data!==e;)if(r=u,!(u=u.next))return this;return(i=u.next)&&delete u.next,r?(i?r.next=i:delete r.next,this):t?(i?t[c]=i:delete t[c],(u=t[0]||t[1])&&u===(t[1]||t[0])&&!u.length&&(n?n[l]=u:this._root=u),this):(this._root=i,this)},DU.removeAll=function(e){for(var t=0,n=e.length;t=(o=(v+_)/2))?v=o:_=o,(d=n>=(s=(y+S)/2))?y=s:S=s,(p=r>=(c=(E+x)/2))?E=c:x=c,a=m,!(m=m[g=p<<2|d<<1|h]))return a[g]=w,e;if(l=+e._x.call(null,m.data),u=+e._y.call(null,m.data),f=+e._z.call(null,m.data),t===l&&n===u&&r===f)return w.next=m,a?a[g]=w:e._root=w,e;do{a=a?a[g]=new Array(8):e._root=new Array(8),(h=t>=(o=(v+_)/2))?v=o:_=o,(d=n>=(s=(y+S)/2))?y=s:S=s,(p=r>=(c=(E+x)/2))?E=c:x=c}while((g=p<<2|d<<1|h)==(b=(f>=c)<<2|(u>=s)<<1|l>=o));return a[b]=m,a[g]=w,e}function WU(e,t,n,r,i,a,o){this.node=e,this.x0=t,this.y0=n,this.z0=r,this.x1=i,this.y1=a,this.z1=o}function qU(e){return e[0]}function XU(e){return e[1]}function YU(e){return e[2]}function KU(e,t,n,r){var i=new ZU(null==t?qU:t,null==n?XU:n,null==r?YU:r,NaN,NaN,NaN,NaN,NaN,NaN);return null==e?i:i.addAll(e)}function ZU(e,t,n,r,i,a,o,s,c){this._x=e,this._y=t,this._z=n,this._x0=r,this._y0=i,this._z0=a,this._x1=o,this._y1=s,this._z1=c,this._root=void 0}function QU(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}GU.copy=function(){var e,t,n=new $U(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=HU(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=HU(t));return n},GU.add=function(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return FU(this.cover(t,n),t,n,e)},GU.addAll=function(e){var t,n,r,i,a=e.length,o=new Array(a),s=new Array(a),c=1/0,l=1/0,u=-1/0,f=-1/0;for(n=0;nu&&(u=r),if&&(f=i));if(c>u||l>f)return this;for(this.cover(c,l).cover(u,f),n=0;ne||e>=i||r>t||t>=a;)switch(s=(th||(a=c.y0)>d||(o=c.x1)=m)<<1|e>=b)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-l],p[p.length-1-l]=c)}else{var w=e-+this._x.call(null,g.data),v=t-+this._y.call(null,g.data),y=w*w+v*v;if(y=(s=(p+b)/2))?p=s:b=s,(u=o>=(c=(g+m)/2))?g=c:m=c,t=d,!(d=d[f=u<<1|l]))return this;if(!d.length)break;(t[f+1&3]||t[f+2&3]||t[f+3&3])&&(n=t,h=f)}for(;d.data!==e;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):t?(i?t[f]=i:delete t[f],(d=t[0]||t[1]||t[2]||t[3])&&d===(t[3]||t[2]||t[1]||t[0])&&!d.length&&(n?n[h]=d:this._root=d),this):(this._root=i,this)},GU.removeAll=function(e){for(var t=0,n=e.length;t1&&(e.y=o/u),t>2&&(e.z=s/u)}else{(n=e).x=n.data.x,t>1&&(n.y=n.data.y),t>2&&(n.z=n.data.z);do{l+=a[n.data.index]}while(n=n.next)}e.value=l}function d(e,o,u,f,h){if(!e.value)return!0;var d=[u,f,h][t-1],p=e.x-n.x,g=t>1?e.y-n.y:0,b=t>2?e.z-n.z:0,m=d-o,w=p*p+g*g+b*b;if(m*m/l1&&0===g&&(w+=(g=AU(r))*g),t>2&&0===b&&(w+=(b=AU(r))*b),w1&&(n.vy+=g*e.value*i/w),t>2&&(n.vz+=b*e.value*i/w)),!0;if(!(e.length||w>=c)){(e.data!==n||e.next)&&(0===p&&(w+=(p=AU(r))*p),t>1&&0===g&&(w+=(g=AU(r))*g),t>2&&0===b&&(w+=(b=AU(r))*b),w1&&(n.vy+=g*m),t>2&&(n.vz+=b*m))}while(e=e.next)}}return u.initialize=function(n,...i){e=n,r=i.find((e=>"function"==typeof e))||Math.random,t=i.find((e=>[1,2,3].includes(e)))||2,f()},u.strength=function(e){return arguments.length?(o="function"==typeof e?e:TU(+e),f(),u):o},u.distanceMin=function(e){return arguments.length?(s=e*e,u):Math.sqrt(s)},u.distanceMax=function(e){return arguments.length?(c=e*e,u):Math.sqrt(c)},u.theta=function(e){return arguments.length?(l=e*e,u):Math.sqrt(l)},u}function tj(e,t,n){var r,i=1;function a(){var a,o,s=r.length,c=0,l=0,u=0;for(a=0;ad&&(d=r),ip&&(p=i),ag&&(g=a));if(u>d||f>p||h>g)return this;for(this.cover(u,f,h).cover(d,p,g),n=0;ne||e>=o||i>t||t>=s||a>n||n>=c;)switch(u=(nb||(o=f.y0)>m||(s=f.z0)>w||(c=f.x1)=S)<<2|(t>=_)<<1|e>=E)&&(f=v[v.length-1],v[v.length-1]=v[v.length-1-h],v[v.length-1-h]=f)}else{var x=e-+this._x.call(null,y.data),T=t-+this._y.call(null,y.data),A=n-+this._z.call(null,y.data),k=x*x+T*T+A*A;if(k=(c=(m+y)/2))?m=c:y=c,(h=o>=(l=(w+E)/2))?w=l:E=l,(d=s>=(u=(v+_)/2))?v=u:_=u,t=b,!(b=b[p=d<<2|h<<1|f]))return this;if(!b.length)break;(t[p+1&7]||t[p+2&7]||t[p+3&7]||t[p+4&7]||t[p+5&7]||t[p+6&7]||t[p+7&7])&&(n=t,g=p)}for(;b.data!==e;)if(r=b,!(b=b.next))return this;return(i=b.next)&&delete b.next,r?(i?r.next=i:delete r.next,this):t?(i?t[p]=i:delete t[p],(b=t[0]||t[1]||t[2]||t[3]||t[4]||t[5]||t[6]||t[7])&&b===(t[7]||t[6]||t[5]||t[4]||t[3]||t[2]||t[1]||t[0])&&!b.length&&(n?n[g]=b:this._root=b),this):(this._root=i,this)},JU.removeAll=function(e){for(var t=0,n=e.length;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},n instanceof Function?n(e):n,{initialised:!1}),r={};function i(t){return a(t,e),s(),i}var a=function(e,n){u.call(i,e,t,n),t.initialised=!0},s=function(e,t,n){var r,i,a,o,s,c,l=0,u=!1,f=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function d(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n)}function p(e){var n=e-c;return void 0===c||n>=t||n<0||f&&e-l>=a}function g(){var e=ij();if(p(e))return b(e);s=setTimeout(g,function(e){var n=t-(e-c);return f?oj(n,a-(e-l)):n}(e))}function b(e){return s=void 0,h&&r?d(e):(r=i=void 0,o)}function m(){var e=ij(),n=p(e);if(r=arguments,i=this,c=e,n){if(void 0===s)return function(e){return l=e,s=setTimeout(g,t),u?d(e):o}(c);if(f)return clearTimeout(s),s=setTimeout(g,t),d(c)}return void 0===s&&(s=setTimeout(g,t)),o}return t=yb(t)||0,_h(n)&&(u=!!n.leading,a=(f="maxWait"in n)?aj(yb(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),m.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=c=i=s=void 0},m.flush=function(){return void 0===s?o:b(ij())},m}((function(){t.initialised&&(h.call(i,t,r),r={})}),1);return d.forEach((function(e){i[e.name]=function(e){var n=e.name,a=e.triggerUpdate,o=void 0!==a&&a,c=e.onChange,l=void 0===c?function(e,t){}:c,u=e.defaultVal,f=void 0===u?null:u;return function(e){var a=t[n];if(!arguments.length)return a;var c=void 0===e?f:e;return t[n]=c,l.call(i,c,t,a),!r.hasOwnProperty(n)&&(r[n]=a),o&&s(),i}}(e)})),Object.keys(o).forEach((function(e){i[e]=function(){for(var n,r=arguments.length,a=new Array(r),s=0;st||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function pj(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n=i)&&(n=i)}return n}function gj(e,t){if(e){if("string"==typeof e)return bj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bj(e,t):void 0}}function bj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=(t instanceof Array?t.length?t:[void 0]:[t]).map((function(e){return{keyAccessor:e,isProp:!(e instanceof Function)}})),a=e.reduce((function(e,t){var r=e,a=t;return i.forEach((function(e,t){var o,s=e.keyAccessor;if(e.isProp){var c=a,l=c[s],u=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(c,[s].map(mj));o=l,a=u}else o=s(a,t);t+11&&void 0!==arguments[1]?arguments[1]:1;r===i.length?Object.keys(t).forEach((function(e){return t[e]=n(t[e])})):Object.values(t).forEach((function(t){return e(t,r+1)}))}(a);var o=a;return r&&(o=[],function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];n.length===i.length?o.push({keys:n,vals:t}):Object.entries(t).forEach((function(t){var r,i=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||gj(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),a=i[0],o=i[1];return e(o,[].concat(function(e){if(Array.isArray(e))return bj(e)}(r=n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||gj(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[a]))}))}(a),t instanceof Array&&0===t.length&&1===o.length&&(o[0].keys=[])),o};function vj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yj(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ej(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||Sj(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _j(e){return function(e){if(Array.isArray(e))return xj(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Sj(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sj(e,t){if(e){if("string"==typeof e)return xj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xj(e,t):void 0}}function xj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(i,Tj),b=function(e,t,n){var r=n.objBindAttr,i=void 0===r?"__obj":r,a=n.dataBindAttr,o=void 0===a?"__data":a,s=n.idAccessor,c=n.purge,l=void 0!==c&&c,u=function(e){return e.hasOwnProperty(o)},f=t.filter((function(e){return!u(e)})),h=t.filter(u).map((function(e){return e[o]})),d=l?{enter:e,exit:h,update:[]}:function(e,t,n){var r={enter:[],update:[],exit:[]};if(n){var i=wj(e,n,!1),a=wj(t,n,!1),o=Object.assign({},i,a);Object.entries(o).forEach((function(e){var t=Ej(e,2),n=t[0],o=t[1],s=i.hasOwnProperty(n)?a.hasOwnProperty(n)?"update":"exit":"enter";r[s].push("update"===s?[i[n],a[n]]:o)}))}else{var s=new Set(e),c=new Set(t);new Set([].concat(_j(s),_j(c))).forEach((function(e){var t=s.has(e)?c.has(e)?"update":"exit":"enter";r[t].push("update"===t?[e,e]:e)}))}return r}(h,e,s);return d.update=d.update.map((function(e){var t=Ej(e,2),n=t[0],r=t[1];return n!==r&&(r[i]=n[i],r[i][o]=r),r})),d.exit=d.exit.concat(f.map((function(e){return yj({},i,e)}))),d}(e,t,function(e){for(var t=1;t1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=tB(e,360),t=tB(t,100),n=tB(n,100),0===t)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;r=o(c,s,e+1/3),i=o(c,s,e),a=o(c,s,e-1/3)}return{r:255*r,g:255*i,b:255*a}}(e.h,r,a),o=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=eB(n),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function Dj(e,t,n){e=tB(e,255),t=tB(t,255),n=tB(n,255);var r,i,a=Math.max(e,t,n),o=Math.min(e,t,n),s=(a+o)/2;if(a==o)r=i=0;else{var c=a-o;switch(i=s>.5?c/(2-a-o):c/(a+o),a){case e:r=(t-n)/c+(t>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(Lj(r));return a}function Zj(e,t){t=t||6;for(var n=Lj(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(Lj({h:r,s:i,v:a})),a=(a+s)%1;return o}Lj.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=eB(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Fj(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Fj(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=Dj(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Dj(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return Uj(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var a=[iB(Math.round(e).toString(16)),iB(Math.round(t).toString(16)),iB(Math.round(n).toString(16)),iB(oB(r))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*tB(this._r,255))+"%",g:Math.round(100*tB(this._g,255))+"%",b:Math.round(100*tB(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*tB(this._r,255))+"%, "+Math.round(100*tB(this._g,255))+"%, "+Math.round(100*tB(this._b,255))+"%)":"rgba("+Math.round(100*tB(this._r,255))+"%, "+Math.round(100*tB(this._g,255))+"%, "+Math.round(100*tB(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(Jj[Uj(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+jj(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=Lj(e);n="#"+jj(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return Lj(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(Hj,arguments)},brighten:function(){return this._applyModification(Gj,arguments)},darken:function(){return this._applyModification(Vj,arguments)},desaturate:function(){return this._applyModification(Bj,arguments)},saturate:function(){return this._applyModification(zj,arguments)},greyscale:function(){return this._applyModification($j,arguments)},spin:function(){return this._applyModification(Wj,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(Kj,arguments)},complement:function(){return this._applyCombination(qj,arguments)},monochromatic:function(){return this._applyCombination(Zj,arguments)},splitcomplement:function(){return this._applyCombination(Yj,arguments)},triad:function(){return this._applyCombination(Xj,[3])},tetrad:function(){return this._applyCombination(Xj,[4])}},Lj.fromRatio=function(e,t){if("object"==Nj(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:aB(e[r]));e=n}return Lj(e,t)},Lj.equals=function(e,t){return!(!e||!t)&&Lj(e).toRgbString()==Lj(t).toRgbString()},Lj.random=function(){return Lj.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},Lj.mix=function(e,t,n){n=0===n?0:n||50;var r=Lj(e).toRgb(),i=Lj(t).toRgb(),a=n/100;return Lj({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})},Lj.readability=function(e,t){var n=Lj(e),r=Lj(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},Lj.isReadable=function(e,t,n){var r,i,a,o,s,c=Lj.readability(e,t);switch(i=!1,"AA"!==(o=((a=(a=n)||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==o&&(o="AA"),"small"!==(s=(a.size||"small").toLowerCase())&&"large"!==s&&(s="small"),(r={level:o,size:s}).level+r.size){case"AAsmall":case"AAAlarge":i=c>=4.5;break;case"AAlarge":i=c>=3;break;case"AAAsmall":i=c>=7}return i},Lj.mostReadable=function(e,t,n){var r,i,a,o,s=null,c=0;i=(n=n||{}).includeFallbackColors,a=n.level,o=n.size;for(var l=0;lc&&(c=r,s=Lj(t[l]));return Lj.isReadable(e,s,{level:a,size:o})||!i?s:(n.includeFallbackColors=!1,Lj.mostReadable(e,["#fff","#000"],n))};var Qj=Lj.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Jj=Lj.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(Qj);function eB(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function tB(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function nB(e){return Math.min(1,Math.max(0,e))}function rB(e){return parseInt(e,16)}function iB(e){return 1==e.length?"0"+e:""+e}function aB(e){return e<=1&&(e=100*e+"%"),e}function oB(e){return Math.round(255*parseFloat(e)).toString(16)}function sB(e){return rB(e)/255}var cB,lB,uB,fB=(lB="[\\s|\\(]+("+(cB="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+cB+")[,|\\s]+("+cB+")\\s*\\)?",uB="[\\s|\\(]+("+cB+")[,|\\s]+("+cB+")[,|\\s]+("+cB+")[,|\\s]+("+cB+")\\s*\\)?",{CSS_UNIT:new RegExp(cB),rgb:new RegExp("rgb"+lB),rgba:new RegExp("rgba"+uB),hsl:new RegExp("hsl"+lB),hsla:new RegExp("hsla"+uB),hsv:new RegExp("hsv"+lB),hsva:new RegExp("hsva"+uB),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function hB(e){return!!fB.CSS_UNIT.exec(e)}function dB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pB(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:{},r=n.objFilter,i=void 0===r?function(){return!0}:r,a=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(n,IB);return Aj(e,t.children.filter(i),(function(e){return t.add(e)}),(function(e){t.remove(e),MB(e)}),pB({objBindAttr:"__threeObj"},a))}var NB=function(e){return isNaN(e)?parseInt(Lj(e).toHex(),16):e},RB=function(e){return isNaN(e)?Lj(e).getAlpha():1},PB=function e(){var t=new kj,n=[],r=[],i=Ij;function a(e){let a=t.get(e);if(void 0===a){if(i!==Ij)return i;t.set(e,a=n.push(e)-1)}return r[a%r.length]}return a.domain=function(e){if(!arguments.length)return n.slice();n=[],t=new kj;for(const r of e)t.has(r)||t.set(r,n.push(r)-1);return a},a.range=function(e){return arguments.length?(r=Array.from(e),a):r.slice()},a.unknown=function(e){return arguments.length?(i=e,a):i},a.copy=function(){return e(n,r).unknown(i)},FM.apply(a,arguments),a}(Oj);function LB(e,t,n){t&&"string"==typeof n&&e.filter((function(e){return!e[n]})).forEach((function(e){e[n]=PB(t(e))}))}var DB=window.THREE?window.THREE:{Group:JD,Mesh:aP,MeshLambertMaterial:class extends AR{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new SR(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new SR(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new OO(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=yI,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.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}},Color:SR,BufferGeometry:zR,BufferAttribute:IR,Matrix4:LN,Vector3:aN,SphereGeometry:CF,CylinderGeometry:AF,TubeGeometry:MF,ConeGeometry:kF,Line:class extends oR{constructor(e=new zR,t=new sF){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,r=t.count;es)continue;f.applyMatrix4(this.matrixWorld);const a=e.ray.origin.distanceTo(f);ae.far||t.push({distance:a,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}else for(let n=Math.max(0,a.start),r=Math.min(p.count,a.start+a.count)-1;ns)continue;f.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(f);re.far||t.push({distance:r,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e2?-60:-30),e<3&&r(t.graphData.nodes,"z"),e<2&&r(t.graphData.nodes,"y")}},dagMode:{onChange:function(e,t){!e&&"d3"===t.forceEngine&&(t.graphData.nodes||[]).forEach((function(e){return e.fx=e.fy=e.fz=void 0}))}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4},nodeId:{default:"id"},nodeVal:{default:"val"},nodeResolution:{default:8},nodeColor:{default:"color"},nodeAutoColorBy:{},nodeOpacity:{default:.75},nodeVisibility:{default:!0},nodeThreeObject:{},nodeThreeObjectExtend:{default:!1},nodePositionUpdate:{triggerUpdate:!1},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0},linkColor:{default:"color"},linkAutoColorBy:{},linkOpacity:{default:.2},linkWidth:{},linkResolution:{default:6},linkCurvature:{default:0,triggerUpdate:!1},linkCurveRotation:{default:0,triggerUpdate:!1},linkMaterial:{},linkThreeObject:{},linkThreeObjectExtend:{default:!1},linkPositionUpdate:{triggerUpdate:!1},linkDirectionalArrowLength:{default:0},linkDirectionalArrowColor:{},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1},linkDirectionalArrowResolution:{default:8},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleWidth:{default:.5},linkDirectionalParticleColor:{},linkDirectionalParticleResolution:{default:4},forceEngine:{default:"d3"},d3AlphaMin:{default:0},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.velocityDecay(e)}},ngraphPhysics:{default:{timeStep:20,gravity:-1.2,theta:.8,springLength:30,springCoefficient:8e-4,dragCoefficient:.02}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onLoading:{default:function(){},triggerUpdate:!1},onFinishLoading:{default:function(){},triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1}},methods:{refresh:function(e){return e._flushObjects=!0,e._rerender(),this},d3Force:function(e,t,n){return void 0===n?e.d3ForceLayout.force(t):(e.d3ForceLayout.force(t,n),this)},d3ReheatSimulation:function(e){return e.d3ForceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},tickFrame:function(e){var t,n,r,i,a="ngraph"!==e.forceEngine;return e.engineRunning&&function(){++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||a&&e.d3AlphaMin>0&&e.d3ForceLayout.alpha()0){var p=s.x-o.x,g=s.y-o.y||0,b=(new DB.Vector3).subVectors(f,u),m=b.clone().multiplyScalar(c).cross(0!==p||0!==g?new DB.Vector3(0,0,1):new DB.Vector3(0,1,0)).applyAxisAngle(b.normalize(),d).add((new DB.Vector3).addVectors(u,f).divideScalar(2));l=new DB.QuadraticBezierCurve3(u,m,f)}else{var w=70*c,v=-d,y=v+Math.PI/2;l=new DB.CubicBezierCurve3(u,new DB.Vector3(w*Math.cos(y),w*Math.sin(y),0).add(u),new DB.Vector3(w*Math.cos(v),w*Math.sin(v),0).add(u),f)}t.__curve=l}else t.__curve=null}}(t);var f=o(t);if(!e.linkPositionUpdate||!e.linkPositionUpdate(f?s.children[1]:s,{start:{x:l.x,y:l.y,z:l.z},end:{x:u.x,y:u.y,z:u.z}},t)||f){var h=t.__curve,d=s.children.length?s.children[0]:s;if("Line"===d.type){if(h)d.geometry.setFromPoints(h.getPoints(30));else{var p=d.geometry.getAttribute("position");p&&p.array&&6===p.array.length||d.geometry[UB]("position",p=new DB.BufferAttribute(new Float32Array(6),3)),p.array[0]=l.x,p.array[1]=l.y||0,p.array[2]=l.z||0,p.array[3]=u.x,p.array[4]=u.y||0,p.array[5]=u.z||0,p.needsUpdate=!0}d.geometry.computeBoundingSphere()}else if("Mesh"===d.type)if(h){d.geometry.type.match(/^Tube(Buffer)?Geometry$/)||(d.position.set(0,0,0),d.rotation.set(0,0,0),d.scale.set(1,1,1));var g=Math.ceil(10*n(t))/10/2,b=new DB.TubeGeometry(h,30,g,e.linkResolution,!1);d.geometry.dispose(),d.geometry=b}else{if(!d.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)){var m=Math.ceil(10*n(t))/10/2,w=new DB.CylinderGeometry(m,m,1,e.linkResolution,1,!1);w[jB]((new DB.Matrix4).makeTranslation(0,.5,0)),w[jB]((new DB.Matrix4).makeRotationX(Math.PI/2)),d.geometry.dispose(),d.geometry=w}var v=new DB.Vector3(l.x,l.y||0,l.z||0),y=new DB.Vector3(u.x,u.y||0,u.z||0),E=v.distanceTo(y);d.position.x=v.x,d.position.y=v.y,d.position.z=v.z,d.scale.z=E,d.parent.localToWorld(y),d.lookAt(y)}}}}}))}(),t=hj(e.linkDirectionalArrowRelPos),n=hj(e.linkDirectionalArrowLength),r=hj(e.nodeVal),e.graphData.links.forEach((function(i){var o=i.__arrowObj;if(o){var s=a?i:e.layout.getLinkPosition(e.layout.graph.getLink(i.source,i.target).id),c=s[a?"source":"from"],l=s[a?"target":"to"];if(c&&l&&c.hasOwnProperty("x")&&l.hasOwnProperty("x")){var u=Math.cbrt(Math.max(0,r(c)||1))*e.nodeRelSize,f=Math.cbrt(Math.max(0,r(l)||1))*e.nodeRelSize,h=n(i),d=t(i),p=i.__curve?function(e){return i.__curve.getPoint(e)}:function(e){var t=function(e,t,n,r){return t[e]+(n[e]-t[e])*r||0};return{x:t("x",c,l,e),y:t("y",c,l,e),z:t("z",c,l,e)}},g=i.__curve?i.__curve.getLength():Math.sqrt(["x","y","z"].map((function(e){return Math.pow((l[e]||0)-(c[e]||0),2)})).reduce((function(e,t){return e+t}),0)),b=u+h+(g-u-f-h)*d,m=p(b/g),w=p((b-h)/g);["x","y","z"].forEach((function(e){return o.position[e]=w[e]}));var v=yB(DB.Vector3,SB(["x","y","z"].map((function(e){return m[e]}))));o.parent.localToWorld(v),o.lookAt(v)}}})),i=hj(e.linkDirectionalParticleSpeed),e.graphData.links.forEach((function(t){var n=t.__photonsObj&&t.__photonsObj.children,r=t.__singleHopPhotonsObj&&t.__singleHopPhotonsObj.children;if(r&&r.length||n&&n.length){var o=a?t:e.layout.getLinkPosition(e.layout.graph.getLink(t.source,t.target).id),s=o[a?"source":"from"],c=o[a?"target":"to"];if(s&&c&&s.hasOwnProperty("x")&&c.hasOwnProperty("x")){var l=i(t),u=t.__curve?function(e){return t.__curve.getPoint(e)}:function(e){var t=function(e,t,n,r){return t[e]+(n[e]-t[e])*r||0};return{x:t("x",s,c,e),y:t("y",s,c,e),z:t("z",s,c,e)}};[].concat(SB(n||[]),SB(r||[])).forEach((function(e,t){var r="singleHopPhotons"===e.parent.__linkThreeObjType;if(e.hasOwnProperty("__progressRatio")||(e.__progressRatio=r?0:t/n.length),e.__progressRatio+=l,e.__progressRatio>=1){if(r)return e.parent.remove(e),void MB(e);e.__progressRatio=e.__progressRatio%1}var i=e.__progressRatio,a=u(i);["x","y","z"].forEach((function(t){return e.position[t]=a[t]}))}))}}})),this},emitParticle:function(e,t){if(t&&e.graphData.links.includes(t)){if(!t.__singleHopPhotonsObj){var n=new DB.Group;n.__linkThreeObjType="singleHopPhotons",t.__singleHopPhotonsObj=n,e.graphScene.add(n)}var r=hj(e.linkDirectionalParticleWidth),i=Math.ceil(10*r(t))/10/2,a=e.linkDirectionalParticleResolution,o=new DB.SphereGeometry(i,a,a),s=hj(e.linkColor),c=hj(e.linkDirectionalParticleColor)(t)||s(t)||"#f0f0f0",l=new DB.Color(NB(c)),u=3*e.linkOpacity,f=new DB.MeshLambertMaterial({color:l,transparent:!0,opacity:u});t.__singleHopPhotonsObj.add(new DB.Mesh(o,f))}return this},getGraphBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};if(!e.initialised)return null;var n=function e(n){var r=[];if(n.geometry){n.geometry.computeBoundingBox();var i=new DB.Box3;i.copy(n.geometry.boundingBox).applyMatrix4(n.matrixWorld),r.push(i)}return r.concat.apply(r,SB((n.children||[]).filter((function(e){return!e.hasOwnProperty("__graphObjType")||"node"===e.__graphObjType&&t(e.__data)})).map(e)))}(e.graphScene);return n.length?Object.assign.apply(Object,SB(["x","y","z"].map((function(e){return bB({},e,[dj(n,(function(t){return t.min[e]})),pj(n,(function(t){return t.max[e]}))])})))):null}},stateInit:function(){return{d3ForceLayout:xU().force("link",MU()).force("charge",ej()).force("center",tj()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,t){t.graphScene=e},update:function(e,t){var n=function(e){return e.some((function(e){return t.hasOwnProperty(e)}))};if(e.engineRunning=!1,e.onUpdate(),null!==e.nodeAutoColorBy&&n(["nodeAutoColorBy","graphData","nodeColor"])&&LB(e.graphData.nodes,hj(e.nodeAutoColorBy),e.nodeColor),null!==e.linkAutoColorBy&&n(["linkAutoColorBy","graphData","linkColor"])&&LB(e.graphData.links,hj(e.linkAutoColorBy),e.linkColor),e._flushObjects||n(["graphData","nodeThreeObject","nodeThreeObjectExtend","nodeVal","nodeColor","nodeVisibility","nodeRelSize","nodeResolution","nodeOpacity"])){var r=hj(e.nodeThreeObject),i=hj(e.nodeThreeObjectExtend),a=hj(e.nodeVal),o=hj(e.nodeColor),s=hj(e.nodeVisibility),c={},l={};OB(e.graphData.nodes.filter(s),e.graphScene,{purge:e._flushObjects||n(["nodeThreeObject","nodeThreeObjectExtend"]),objFilter:function(e){return"node"===e.__graphObjType},createObj:function(t){var n,a=r(t),o=i(t);return a&&e.nodeThreeObject===a&&(a=a.clone()),a&&!o?n=a:((n=new DB.Mesh).__graphDefaultObj=!0,a&&o&&n.add(a)),n.__graphObjType="node",n},updateObj:function(t,n){if(t.__graphDefaultObj){var r=a(n)||1,i=Math.cbrt(r)*e.nodeRelSize,s=e.nodeResolution;t.geometry.type.match(/^Sphere(Buffer)?Geometry$/)&&t.geometry.parameters.radius===i&&t.geometry.parameters.widthSegments===s||(c.hasOwnProperty(r)||(c[r]=new DB.SphereGeometry(i,s,s)),t.geometry.dispose(),t.geometry=c[r]);var u=o(n),f=new DB.Color(NB(u||"#ffffaa")),h=e.nodeOpacity*RB(u);"MeshLambertMaterial"===t.material.type&&t.material.color.equals(f)&&t.material.opacity===h||(l.hasOwnProperty(u)||(l[u]=new DB.MeshLambertMaterial({color:f,transparent:!0,opacity:h})),t.material.dispose(),t.material=l[u])}}})}if(e._flushObjects||n(["graphData","linkThreeObject","linkThreeObjectExtend","linkMaterial","linkColor","linkWidth","linkVisibility","linkResolution","linkOpacity","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution"])){var u=hj(e.linkThreeObject),f=hj(e.linkThreeObjectExtend),h=hj(e.linkMaterial),d=hj(e.linkVisibility),p=hj(e.linkColor),g=hj(e.linkWidth),b={},m={},w={},v=e.graphData.links.filter(d);if(OB(v,e.graphScene,{objBindAttr:"__lineObj",purge:e._flushObjects||n(["linkThreeObject","linkThreeObjectExtend","linkWidth"]),objFilter:function(e){return"link"===e.__graphObjType},exitObj:function(e){var t=e.__data&&e.__data.__singleHopPhotonsObj;t&&(t.parent.remove(t),MB(t),delete e.__data.__singleHopPhotonsObj)},createObj:function(t){var n,r,i=u(t),a=f(t);if(i&&e.linkThreeObject===i&&(i=i.clone()),!i||a)if(g(t))n=new DB.Mesh;else{var o=new DB.BufferGeometry;o[UB]("position",new DB.BufferAttribute(new Float32Array(6),3)),n=new DB.Line(o)}return i?a?((r=new DB.Group).__graphDefaultObj=!0,r.add(n),r.add(i)):r=i:(r=n).__graphDefaultObj=!0,r.renderOrder=10,r.__graphObjType="link",r},updateObj:function(t,n){if(t.__graphDefaultObj){var r=t.children.length?t.children[0]:t,i=Math.ceil(10*g(n))/10,a=!!i;if(a){var o=i/2,s=e.linkResolution;if(!r.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)||r.geometry.parameters.radiusTop!==o||r.geometry.parameters.radialSegments!==s){if(!b.hasOwnProperty(i)){var c=new DB.CylinderGeometry(o,o,1,s,1,!1);c[jB]((new DB.Matrix4).makeTranslation(0,.5,0)),c[jB]((new DB.Matrix4).makeRotationX(Math.PI/2)),b[i]=c}r.geometry.dispose(),r.geometry=b[i]}}var l=h(n);if(l)r.material=l;else{var u=p(n),f=new DB.Color(NB(u||"#f0f0f0")),d=e.linkOpacity*RB(u),v=a?"MeshLambertMaterial":"LineBasicMaterial";if(r.material.type!==v||!r.material.color.equals(f)||r.material.opacity!==d){var y=a?m:w;y.hasOwnProperty(u)||(y[u]=new DB[v]({color:f,transparent:d<1,opacity:d,depthWrite:d>=1})),r.material.dispose(),r.material=y[u]}}}}}),e.linkDirectionalArrowLength||t.hasOwnProperty("linkDirectionalArrowLength")){var y=hj(e.linkDirectionalArrowLength),E=hj(e.linkDirectionalArrowColor);OB(v.filter(y),e.graphScene,{objBindAttr:"__arrowObj",objFilter:function(e){return"arrow"===e.__linkThreeObjType},createObj:function(){var e=new DB.Mesh(void 0,new DB.MeshLambertMaterial({transparent:!0}));return e.__linkThreeObjType="arrow",e},updateObj:function(t,n){var r=y(n),i=e.linkDirectionalArrowResolution;if(!t.geometry.type.match(/^Cone(Buffer)?Geometry$/)||t.geometry.parameters.height!==r||t.geometry.parameters.radialSegments!==i){var a=new DB.ConeGeometry(.25*r,r,i);a.translate(0,r/2,0),a.rotateX(Math.PI/2),t.geometry.dispose(),t.geometry=a}var o=E(n)||p(n)||"#f0f0f0";t.material.color=new DB.Color(NB(o)),t.material.opacity=3*e.linkOpacity*RB(o)}})}if(e.linkDirectionalParticles||t.hasOwnProperty("linkDirectionalParticles")){var _=hj(e.linkDirectionalParticles),S=hj(e.linkDirectionalParticleWidth),x=hj(e.linkDirectionalParticleColor),T={},A={};OB(v.filter(_),e.graphScene,{objBindAttr:"__photonsObj",objFilter:function(e){return"photons"===e.__linkThreeObjType},createObj:function(){var e=new DB.Group;return e.__linkThreeObjType="photons",e},updateObj:function(t,n){var r,i=Math.round(Math.abs(_(n))),a=!!t.children.length&&t.children[0],o=Math.ceil(10*S(n))/10/2,s=e.linkDirectionalParticleResolution;a&&a.geometry.parameters.radius===o&&a.geometry.parameters.widthSegments===s?r=a.geometry:(A.hasOwnProperty(o)||(A[o]=new DB.SphereGeometry(o,s,s)),r=A[o],a&&a.geometry.dispose());var c,l=x(n)||p(n)||"#f0f0f0",u=new DB.Color(NB(l)),f=3*e.linkOpacity;a&&a.material.color.equals(u)&&a.material.opacity===f?c=a.material:(T.hasOwnProperty(l)||(T[l]=new DB.MeshLambertMaterial({color:u,transparent:!0,opacity:f})),c=T[l],a&&a.material.dispose()),OB(SB(new Array(i)).map((function(e,t){return{idx:t}})),t,{idAccessor:function(e){return e.idx},createObj:function(){return new DB.Mesh(r,c)},updateObj:function(e){e.geometry=r,e.material=c}})}})}}if(e._flushObjects=!1,n(["graphData","nodeId","linkSource","linkTarget","numDimensions","forceEngine","dagMode","dagNodeFilter","dagLevelDistance"])){e.engineRunning=!1,e.graphData.links.forEach((function(t){t.source=t[e.linkSource],t.target=t[e.linkTarget]}));var k,C="ngraph"!==e.forceEngine;if(C){(k=e.d3ForceLayout).stop().alpha(1).numDimensions(e.numDimensions).nodes(e.graphData.nodes);var M=e.d3ForceLayout.force("link");M&&M.id((function(t){return t[e.nodeId]})).links(e.graphData.links);var I=e.dagMode&&function(e,t){var n=e.nodes,r=e.links,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.nodeFilter,o=void 0===a?function(){return!0}:a,s=i.onLoopError,c=void 0===s?function(e){throw"Invalid DAG structure! Found cycle in node path: ".concat(e.join(" -> "),".")}:s,l={};n.forEach((function(e){return l[t(e)]={data:e,out:[],depth:-1,skip:!o(e)}})),r.forEach((function(e){var n=e.source,r=e.target,i=c(n),a=c(r);if(!l.hasOwnProperty(i))throw"Missing source node with id: ".concat(i);if(!l.hasOwnProperty(a))throw"Missing target node with id: ".concat(a);var o=l[i],s=l[a];function c(e){return"object"===gB(e)?t(e):e}o.out.push(s)}));var u=[];return function e(n){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=function(){var a=n[o];if(-1!==r.indexOf(a)){var s=[].concat(SB(r.slice(r.indexOf(a))),[a]).map((function(e){return t(e.data)}));return u.some((function(e){return e.length===s.length&&e.every((function(e,t){return e===s[t]}))}))||(u.push(s),c(s)),"continue"}i>a.depth&&(a.depth=i,e(a.out,[].concat(SB(r),[a]),i+(a.skip?0:1)))},o=0,s=n.length;o1&&(u.vy+=h*g),a>2&&(u.vz+=d*g)}}function u(){if(i){var t,n=i.length;for(o=new Array(n),s=new Array(n),t=0;t[1,2,3].includes(e)))||2,u()},l.strength=function(e){return arguments.length?(c="function"==typeof e?e:TU(+e),u(),l):c},l.radius=function(t){return arguments.length?(e="function"==typeof t?t:TU(+t),u(),l):e},l.x=function(e){return arguments.length?(t=+e,l):t},l.y=function(e){return arguments.length?(n=+e,l):n},l.z=function(e){return arguments.length?(r=+e,l):r},l}((function(t){var n=I[t[e.nodeId]]||-1;return("radialin"===e.dagMode?O-n:n)*N})).strength((function(t){return e.dagNodeFilter(t)?1:0})):null)}else{var F=FB.graph();e.graphData.nodes.forEach((function(t){F.addNode(t[e.nodeId])})),e.graphData.links.forEach((function(e){F.addLink(e.source,e.target)})),(k=FB.forcelayout(F,pB({dimensions:e.numDimensions},e.ngraphPhysics))).graph=F}for(var U=0;U0&&e.d3ForceLayout.alpha()2&&void 0!==arguments[2]&&arguments[2],n=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wB(e,t)}(s,n);var r,i,a,o=(i=s,a=vB(),function(){var e,t=mB(i);if(a){var n=mB(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return EB(e)}(this,e)});function s(){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var r=arguments.length,i=new Array(r),a=0;a1&&void 0!==arguments[1]?arguments[1]:Object);return Object.keys(e()).forEach((function(e){return n.prototype[e]=function(){var t,n=(t=this.__kapsuleInstance)[e].apply(t,arguments);return n===this.__kapsuleInstance?this:n}})),n}(BB,(window.THREE?window.THREE:{Group:JD}).Group,!0);const $B={type:"change"},HB={type:"start"},GB={type:"end"};class VB extends mO{constructor(e,t){super();const n=this,r=-1;this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.screen={left:0,top:0,width:0,height:0},this.rotateSpeed=1,this.zoomSpeed=1.2,this.panSpeed=.3,this.noRotate=!1,this.noZoom=!1,this.noPan=!1,this.staticMoving=!1,this.dynamicDampingFactor=.2,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.keys=["KeyA","KeyS","KeyD"],this.mouseButtons={LEFT:gI.ROTATE,MIDDLE:gI.DOLLY,RIGHT:gI.PAN},this.target=new aN;const i=1e-6,a=new aN;let o=1,s=r,c=r,l=0,u=0,f=0;const h=new aN,d=new OO,p=new OO,g=new aN,b=new OO,m=new OO,w=new OO,v=new OO,y=[],E={};this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone(),this.zoom0=this.object.zoom,this.handleResize=function(){const e=n.domElement.getBoundingClientRect(),t=n.domElement.ownerDocument.documentElement;n.screen.left=e.left+window.pageXOffset-t.clientLeft,n.screen.top=e.top+window.pageYOffset-t.clientTop,n.screen.width=e.width,n.screen.height=e.height};const _=function(){const e=new OO;return function(t,r){return e.set((t-n.screen.left)/n.screen.width,(r-n.screen.top)/n.screen.height),e}}(),S=function(){const e=new OO;return function(t,r){return e.set((t-.5*n.screen.width-n.screen.left)/(.5*n.screen.width),(n.screen.height+2*(n.screen.top-r))/n.screen.width),e}}();function x(e){!1!==n.enabled&&(0===y.length&&(n.domElement.setPointerCapture(e.pointerId),n.domElement.addEventListener("pointermove",T),n.domElement.addEventListener("pointerup",A)),function(e){y.push(e)}(e),"touch"===e.pointerType?function(e){if(1===(R(e),y.length))s=3,p.copy(S(y[0].pageX,y[0].pageY)),d.copy(p);else{s=4;const e=y[0].pageX-y[1].pageX,t=y[0].pageY-y[1].pageY;u=l=Math.sqrt(e*e+t*t);const n=(y[0].pageX+y[1].pageX)/2,r=(y[0].pageY+y[1].pageY)/2;w.copy(_(n,r)),v.copy(w)}n.dispatchEvent(HB)}(e):function(e){if(s===r)switch(e.button){case n.mouseButtons.LEFT:s=0;break;case n.mouseButtons.MIDDLE:s=1;break;case n.mouseButtons.RIGHT:s=2}const t=c!==r?c:s;0!==t||n.noRotate?1!==t||n.noZoom?2!==t||n.noPan||(w.copy(_(e.pageX,e.pageY)),v.copy(w)):(b.copy(_(e.pageX,e.pageY)),m.copy(b)):(p.copy(S(e.pageX,e.pageY)),d.copy(p)),n.dispatchEvent(HB)}(e))}function T(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){if(1===(R(e),y.length))d.copy(p),p.copy(S(e.pageX,e.pageY));else{const t=function(e){const t=e.pointerId===y[0].pointerId?y[1]:y[0];return E[t.pointerId]}(e),n=e.pageX-t.x,r=e.pageY-t.y;u=Math.sqrt(n*n+r*r);const i=(e.pageX+t.x)/2,a=(e.pageY+t.y)/2;v.copy(_(i,a))}}(e):function(e){const t=c!==r?c:s;0!==t||n.noRotate?1!==t||n.noZoom?2!==t||n.noPan||v.copy(_(e.pageX,e.pageY)):m.copy(_(e.pageX,e.pageY)):(d.copy(p),p.copy(S(e.pageX,e.pageY)))}(e))}function A(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(y.length){case 0:s=r;break;case 1:s=3,p.copy(S(e.pageX,e.pageY)),d.copy(p);break;case 2:s=4;for(let t=0;t0&&(n.object.isPerspectiveCamera?h.multiplyScalar(e):n.object.isOrthographicCamera?(n.object.zoom=IO.clamp(n.object.zoom/e,n.minZoom,n.maxZoom),o!==n.object.zoom&&n.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")),n.staticMoving?b.copy(m):b.y+=(m.y-b.y)*this.dynamicDampingFactor)},this.panCamera=function(){const e=new OO,t=new aN,r=new aN;return function(){if(e.copy(v).sub(w),e.lengthSq()){if(n.object.isOrthographicCamera){const t=(n.object.right-n.object.left)/n.object.zoom/n.domElement.clientWidth,r=(n.object.top-n.object.bottom)/n.object.zoom/n.domElement.clientWidth;e.x*=t,e.y*=r}e.multiplyScalar(h.length()*n.panSpeed),r.copy(h).cross(n.object.up).setLength(e.x),r.add(t.copy(n.object.up).setLength(e.y)),n.object.position.add(r),n.target.add(r),n.staticMoving?w.copy(v):w.add(e.subVectors(v,w).multiplyScalar(n.dynamicDampingFactor))}}}(),this.checkDistances=function(){n.noZoom&&n.noPan||(h.lengthSq()>n.maxDistance*n.maxDistance&&(n.object.position.addVectors(n.target,h.setLength(n.maxDistance)),b.copy(m)),h.lengthSq()i&&(n.dispatchEvent($B),a.copy(n.object.position))):n.object.isOrthographicCamera?(n.object.lookAt(n.target),(a.distanceToSquared(n.object.position)>i||o!==n.object.zoom)&&(n.dispatchEvent($B),a.copy(n.object.position),o=n.object.zoom)):console.warn("THREE.TrackballControls: Unsupported camera type")},this.reset=function(){s=r,c=r,n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.up.copy(n.up0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),h.subVectors(n.object.position,n.target),n.object.lookAt(n.target),n.dispatchEvent($B),a.copy(n.object.position),o=n.object.zoom},this.dispose=function(){n.domElement.removeEventListener("contextmenu",O),n.domElement.removeEventListener("pointerdown",x),n.domElement.removeEventListener("pointercancel",k),n.domElement.removeEventListener("wheel",I),n.domElement.removeEventListener("pointermove",T),n.domElement.removeEventListener("pointerup",A),window.removeEventListener("keydown",C),window.removeEventListener("keyup",M)},this.domElement.addEventListener("contextmenu",O),this.domElement.addEventListener("pointerdown",x),this.domElement.addEventListener("pointercancel",k),this.domElement.addEventListener("wheel",I,{passive:!1}),window.addEventListener("keydown",C),window.addEventListener("keyup",M),this.handleResize(),this.update()}}const WB={type:"change"},qB={type:"start"},XB={type:"end"},YB=new PN,KB=new _P,ZB=Math.cos(70*IO.DEG2RAD);class QB extends mO{constructor(e,t){super(),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new aN,this.cursor=new aN,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:gI.ROTATE,MIDDLE:gI.DOLLY,RIGHT:gI.PAN},this.touches={ONE:0,TWO:2},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return o.phi},this.getAzimuthalAngle=function(){return o.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(e){e.addEventListener("keydown",W),this._domElementKeyEvents=e},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",W),this._domElementKeyEvents=null},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(WB),n.update(),i=r.NONE},this.update=function(){const t=new aN,u=(new iN).setFromUnitVectors(e.up,new aN(0,1,0)),f=u.clone().invert(),h=new aN,d=new iN,p=new aN,g=2*Math.PI;return function(b=null){const m=n.object.position;t.copy(m).sub(n.target),t.applyQuaternion(u),o.setFromVector3(t),n.autoRotate&&i===r.NONE&&T(function(e){return null!==e?2*Math.PI/60*n.autoRotateSpeed*e:2*Math.PI/60/60*n.autoRotateSpeed}(b)),n.enableDamping?(o.theta+=s.theta*n.dampingFactor,o.phi+=s.phi*n.dampingFactor):(o.theta+=s.theta,o.phi+=s.phi);let w=n.minAzimuthAngle,_=n.maxAzimuthAngle;isFinite(w)&&isFinite(_)&&(w<-Math.PI?w+=g:w>Math.PI&&(w-=g),_<-Math.PI?_+=g:_>Math.PI&&(_-=g),o.theta=w<=_?Math.max(w,Math.min(_,o.theta)):o.theta>(w+_)/2?Math.max(w,o.theta):Math.min(_,o.theta)),o.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,o.phi)),o.makeSafe(),!0===n.enableDamping?n.target.addScaledVector(l,n.dampingFactor):n.target.add(l),n.target.sub(n.cursor),n.target.clampLength(n.minTargetRadius,n.maxTargetRadius),n.target.add(n.cursor),n.zoomToCursor&&E||n.object.isOrthographicCamera?o.radius=R(o.radius):o.radius=R(o.radius*c),t.setFromSpherical(o),t.applyQuaternion(f),m.copy(n.target).add(t),n.object.lookAt(n.target),!0===n.enableDamping?(s.theta*=1-n.dampingFactor,s.phi*=1-n.dampingFactor,l.multiplyScalar(1-n.dampingFactor)):(s.set(0,0,0),l.set(0,0,0));let S=!1;if(n.zoomToCursor&&E){let r=null;if(n.object.isPerspectiveCamera){const e=t.length();r=R(e*c);const i=e-r;n.object.position.addScaledVector(v,i),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){const e=new aN(y.x,y.y,0);e.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/c)),n.object.updateProjectionMatrix(),S=!0;const i=new aN(y.x,y.y,0);i.unproject(n.object),n.object.position.sub(i).add(e),n.object.updateMatrixWorld(),r=t.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;null!==r&&(this.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(r).add(n.object.position):(YB.origin.copy(n.object.position),YB.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(YB.direction))a||8*(1-d.dot(n.object.quaternion))>a||p.distanceToSquared(n.target)>0)&&(n.dispatchEvent(WB),h.copy(n.object.position),d.copy(n.object.quaternion),p.copy(n.target),S=!1,!0)}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",q),n.domElement.removeEventListener("pointerdown",$),n.domElement.removeEventListener("pointercancel",G),n.domElement.removeEventListener("wheel",V),n.domElement.removeEventListener("pointermove",H),n.domElement.removeEventListener("pointerup",G),null!==n._domElementKeyEvents&&(n._domElementKeyEvents.removeEventListener("keydown",W),n._domElementKeyEvents=null)};const n=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let i=r.NONE;const a=1e-6,o=new lU,s=new lU;let c=1;const l=new aN,u=new OO,f=new OO,h=new OO,d=new OO,p=new OO,g=new OO,b=new OO,m=new OO,w=new OO,v=new aN,y=new OO;let E=!1;const _=[],S={};function x(){return Math.pow(.95,n.zoomSpeed)}function T(e){s.theta-=e}function A(e){s.phi-=e}const k=function(){const e=new aN;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),l.add(e)}}(),C=function(){const e=new aN;return function(t,r){!0===n.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),l.add(e)}}(),M=function(){const e=new aN;return function(t,r){const i=n.domElement;if(n.object.isPerspectiveCamera){const a=n.object.position;e.copy(a).sub(n.target);let o=e.length();o*=Math.tan(n.object.fov/2*Math.PI/180),k(2*t*o/i.clientHeight,n.object.matrix),C(2*r*o/i.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(k(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),C(r*(n.object.top-n.object.bottom)/n.object.zoom/i.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function I(e){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?c/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function O(e){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?c*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function N(e){if(!n.zoomToCursor)return;E=!0;const t=n.domElement.getBoundingClientRect(),r=e.clientX-t.left,i=e.clientY-t.top,a=t.width,o=t.height;y.x=r/a*2-1,y.y=-i/o*2+1,v.set(y.x,y.y,1).unproject(n.object).sub(n.object.position).normalize()}function R(e){return Math.max(n.minDistance,Math.min(n.maxDistance,e))}function P(e){u.set(e.clientX,e.clientY)}function L(e){d.set(e.clientX,e.clientY)}function D(){if(1===_.length)u.set(_[0].pageX,_[0].pageY);else{const e=.5*(_[0].pageX+_[1].pageX),t=.5*(_[0].pageY+_[1].pageY);u.set(e,t)}}function F(){if(1===_.length)d.set(_[0].pageX,_[0].pageY);else{const e=.5*(_[0].pageX+_[1].pageX),t=.5*(_[0].pageY+_[1].pageY);d.set(e,t)}}function U(){const e=_[0].pageX-_[1].pageX,t=_[0].pageY-_[1].pageY,n=Math.sqrt(e*e+t*t);b.set(0,n)}function j(e){if(1==_.length)f.set(e.pageX,e.pageY);else{const t=Y(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);f.set(n,r)}h.subVectors(f,u).multiplyScalar(n.rotateSpeed);const t=n.domElement;T(2*Math.PI*h.x/t.clientHeight),A(2*Math.PI*h.y/t.clientHeight),u.copy(f)}function B(e){if(1===_.length)p.set(e.pageX,e.pageY);else{const t=Y(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);p.set(n,r)}g.subVectors(p,d).multiplyScalar(n.panSpeed),M(g.x,g.y),d.copy(p)}function z(e){const t=Y(e),r=e.pageX-t.x,i=e.pageY-t.y,a=Math.sqrt(r*r+i*i);m.set(0,a),w.set(0,Math.pow(m.y/b.y,n.zoomSpeed)),I(w.y),b.copy(m)}function $(e){!1!==n.enabled&&(0===_.length&&(n.domElement.setPointerCapture(e.pointerId),n.domElement.addEventListener("pointermove",H),n.domElement.addEventListener("pointerup",G)),function(e){_.push(e)}(e),"touch"===e.pointerType?function(e){switch(X(e),_.length){case 1:switch(n.touches.ONE){case 0:if(!1===n.enableRotate)return;D(),i=r.TOUCH_ROTATE;break;case 1:if(!1===n.enablePan)return;F(),i=r.TOUCH_PAN;break;default:i=r.NONE}break;case 2:switch(n.touches.TWO){case 2:if(!1===n.enableZoom&&!1===n.enablePan)return;n.enableZoom&&U(),n.enablePan&&F(),i=r.TOUCH_DOLLY_PAN;break;case 3:if(!1===n.enableZoom&&!1===n.enableRotate)return;n.enableZoom&&U(),n.enableRotate&&D(),i=r.TOUCH_DOLLY_ROTATE;break;default:i=r.NONE}break;default:i=r.NONE}i!==r.NONE&&n.dispatchEvent(qB)}(e):function(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case gI.DOLLY:if(!1===n.enableZoom)return;!function(e){N(e),b.set(e.clientX,e.clientY)}(e),i=r.DOLLY;break;case gI.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enablePan)return;L(e),i=r.PAN}else{if(!1===n.enableRotate)return;P(e),i=r.ROTATE}break;case gI.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enableRotate)return;P(e),i=r.ROTATE}else{if(!1===n.enablePan)return;L(e),i=r.PAN}break;default:i=r.NONE}i!==r.NONE&&n.dispatchEvent(qB)}(e))}function H(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(X(e),i){case r.TOUCH_ROTATE:if(!1===n.enableRotate)return;j(e),n.update();break;case r.TOUCH_PAN:if(!1===n.enablePan)return;B(e),n.update();break;case r.TOUCH_DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;!function(e){n.enableZoom&&z(e),n.enablePan&&B(e)}(e),n.update();break;case r.TOUCH_DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;!function(e){n.enableZoom&&z(e),n.enableRotate&&j(e)}(e),n.update();break;default:i=r.NONE}}(e):function(e){switch(i){case r.ROTATE:if(!1===n.enableRotate)return;!function(e){f.set(e.clientX,e.clientY),h.subVectors(f,u).multiplyScalar(n.rotateSpeed);const t=n.domElement;T(2*Math.PI*h.x/t.clientHeight),A(2*Math.PI*h.y/t.clientHeight),u.copy(f),n.update()}(e);break;case r.DOLLY:if(!1===n.enableZoom)return;!function(e){m.set(e.clientX,e.clientY),w.subVectors(m,b),w.y>0?I(x()):w.y<0&&O(x()),b.copy(m),n.update()}(e);break;case r.PAN:if(!1===n.enablePan)return;!function(e){p.set(e.clientX,e.clientY),g.subVectors(p,d).multiplyScalar(n.panSpeed),M(g.x,g.y),d.copy(p),n.update()}(e)}}(e))}function G(e){!function(e){delete S[e.pointerId];for(let t=0;t<_.length;t++)if(_[t].pointerId==e.pointerId)return void _.splice(t,1)}(e),0===_.length&&(n.domElement.releasePointerCapture(e.pointerId),n.domElement.removeEventListener("pointermove",H),n.domElement.removeEventListener("pointerup",G)),n.dispatchEvent(XB),i=r.NONE}function V(e){!1!==n.enabled&&!1!==n.enableZoom&&i===r.NONE&&(e.preventDefault(),n.dispatchEvent(qB),function(e){N(e),e.deltaY<0?O(x()):e.deltaY>0&&I(x()),n.update()}(e),n.dispatchEvent(XB))}function W(e){!1!==n.enabled&&!1!==n.enablePan&&function(e){let t=!1;switch(e.code){case n.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?A(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):M(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?A(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):M(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?T(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):M(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?T(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):M(-n.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),n.update())}(e)}function q(e){!1!==n.enabled&&e.preventDefault()}function X(e){let t=S[e.pointerId];void 0===t&&(t=new OO,S[e.pointerId]=t),t.set(e.pageX,e.pageY)}function Y(e){const t=e.pointerId===_[0].pointerId?_[1]:_[0];return S[t.pointerId]}n.domElement.addEventListener("contextmenu",q),n.domElement.addEventListener("pointerdown",$),n.domElement.addEventListener("pointercancel",G),n.domElement.addEventListener("wheel",V,{passive:!1}),this.update()}}const JB={type:"change"};class ez extends mO{constructor(e,t){super(),this.object=e,this.domElement=t,this.enabled=!0,this.movementSpeed=1,this.rollSpeed=.005,this.dragToLook=!1,this.autoForward=!1;const n=this,r=1e-6,i=new iN,a=new aN;this.tmpQuaternion=new iN,this.status=0,this.moveState={up:0,down:0,left:0,right:0,forward:0,back:0,pitchUp:0,pitchDown:0,yawLeft:0,yawRight:0,rollLeft:0,rollRight:0},this.moveVector=new aN(0,0,0),this.rotationVector=new aN(0,0,0),this.keydown=function(e){if(!e.altKey&&!1!==this.enabled){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=.1;break;case"KeyW":this.moveState.forward=1;break;case"KeyS":this.moveState.back=1;break;case"KeyA":this.moveState.left=1;break;case"KeyD":this.moveState.right=1;break;case"KeyR":this.moveState.up=1;break;case"KeyF":this.moveState.down=1;break;case"ArrowUp":this.moveState.pitchUp=1;break;case"ArrowDown":this.moveState.pitchDown=1;break;case"ArrowLeft":this.moveState.yawLeft=1;break;case"ArrowRight":this.moveState.yawRight=1;break;case"KeyQ":this.moveState.rollLeft=1;break;case"KeyE":this.moveState.rollRight=1}this.updateMovementVector(),this.updateRotationVector()}},this.keyup=function(e){if(!1!==this.enabled){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=1;break;case"KeyW":this.moveState.forward=0;break;case"KeyS":this.moveState.back=0;break;case"KeyA":this.moveState.left=0;break;case"KeyD":this.moveState.right=0;break;case"KeyR":this.moveState.up=0;break;case"KeyF":this.moveState.down=0;break;case"ArrowUp":this.moveState.pitchUp=0;break;case"ArrowDown":this.moveState.pitchDown=0;break;case"ArrowLeft":this.moveState.yawLeft=0;break;case"ArrowRight":this.moveState.yawRight=0;break;case"KeyQ":this.moveState.rollLeft=0;break;case"KeyE":this.moveState.rollRight=0}this.updateMovementVector(),this.updateRotationVector()}},this.pointerdown=function(e){if(!1!==this.enabled)if(this.dragToLook)this.status++;else{switch(e.button){case 0:this.moveState.forward=1;break;case 2:this.moveState.back=1}this.updateMovementVector()}},this.pointermove=function(e){if(!1!==this.enabled&&(!this.dragToLook||this.status>0)){const t=this.getContainerDimensions(),n=t.size[0]/2,r=t.size[1]/2;this.moveState.yawLeft=-(e.pageX-t.offset[0]-n)/n,this.moveState.pitchDown=(e.pageY-t.offset[1]-r)/r,this.updateRotationVector()}},this.pointerup=function(e){if(!1!==this.enabled){if(this.dragToLook)this.status--,this.moveState.yawLeft=this.moveState.pitchDown=0;else{switch(e.button){case 0:this.moveState.forward=0;break;case 2:this.moveState.back=0}this.updateMovementVector()}this.updateRotationVector()}},this.pointercancel=function(){!1!==this.enabled&&(this.dragToLook?(this.status=0,this.moveState.yawLeft=this.moveState.pitchDown=0):(this.moveState.forward=0,this.moveState.back=0,this.updateMovementVector()),this.updateRotationVector())},this.contextMenu=function(e){!1!==this.enabled&&e.preventDefault()},this.update=function(e){if(!1===this.enabled)return;const t=e*n.movementSpeed,o=e*n.rollSpeed;n.object.translateX(n.moveVector.x*t),n.object.translateY(n.moveVector.y*t),n.object.translateZ(n.moveVector.z*t),n.tmpQuaternion.set(n.rotationVector.x*o,n.rotationVector.y*o,n.rotationVector.z*o,1).normalize(),n.object.quaternion.multiply(n.tmpQuaternion),(a.distanceToSquared(n.object.position)>r||8*(1-i.dot(n.object.quaternion))>r)&&(n.dispatchEvent(JB),i.copy(n.object.quaternion),a.copy(n.object.position))},this.updateMovementVector=function(){const e=this.moveState.forward||this.autoForward&&!this.moveState.back?1:0;this.moveVector.x=-this.moveState.left+this.moveState.right,this.moveVector.y=-this.moveState.down+this.moveState.up,this.moveVector.z=-e+this.moveState.back},this.updateRotationVector=function(){this.rotationVector.x=-this.moveState.pitchDown+this.moveState.pitchUp,this.rotationVector.y=-this.moveState.yawRight+this.moveState.yawLeft,this.rotationVector.z=-this.moveState.rollRight+this.moveState.rollLeft},this.getContainerDimensions=function(){return this.domElement!=document?{size:[this.domElement.offsetWidth,this.domElement.offsetHeight],offset:[this.domElement.offsetLeft,this.domElement.offsetTop]}:{size:[window.innerWidth,window.innerHeight],offset:[0,0]}},this.dispose=function(){this.domElement.removeEventListener("contextmenu",o),this.domElement.removeEventListener("pointerdown",c),this.domElement.removeEventListener("pointermove",s),this.domElement.removeEventListener("pointerup",l),this.domElement.removeEventListener("pointercancel",u),window.removeEventListener("keydown",f),window.removeEventListener("keyup",h)};const o=this.contextMenu.bind(this),s=this.pointermove.bind(this),c=this.pointerdown.bind(this),l=this.pointerup.bind(this),u=this.pointercancel.bind(this),f=this.keydown.bind(this),h=this.keyup.bind(this);this.domElement.addEventListener("contextmenu",o),this.domElement.addEventListener("pointerdown",c),this.domElement.addEventListener("pointermove",s),this.domElement.addEventListener("pointerup",l),this.domElement.addEventListener("pointercancel",u),window.addEventListener("keydown",f),window.addEventListener("keyup",h),this.updateMovementVector(),this.updateRotationVector()}}const tz={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class nz{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const rz=new jP(-1,1,1,-1,0,1),iz=new class extends zR{constructor(){super(),this.setAttribute("position",new RR([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new RR([0,2,0,0,2,0],2))}};class az{constructor(e){this._mesh=new aP(iz,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,rz)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}class oz extends nz{constructor(e,t){super(),this.textureID=void 0!==t?t:"tDiffuse",e instanceof hP?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=fP.clone(e.uniforms),this.material=new hP({name:void 0!==e.name?e.name:"unspecified",defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.fsQuad=new az(this.material)}render(e,t,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class sz extends nz{constructor(e,t){super(),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,t,n){const r=e.getContext(),i=e.state;let a,o;i.buffers.color.setMask(!1),i.buffers.depth.setMask(!1),i.buffers.color.setLocked(!0),i.buffers.depth.setLocked(!0),this.inverse?(a=0,o=1):(a=1,o=0),i.buffers.stencil.setTest(!0),i.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),i.buffers.stencil.setFunc(r.ALWAYS,a,4294967295),i.buffers.stencil.setClear(o),i.buffers.stencil.setLocked(!0),e.setRenderTarget(n),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),i.buffers.color.setLocked(!1),i.buffers.depth.setLocked(!1),i.buffers.color.setMask(!0),i.buffers.depth.setMask(!0),i.buffers.stencil.setLocked(!1),i.buffers.stencil.setFunc(r.EQUAL,1,4294967295),i.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),i.buffers.stencil.setLocked(!0)}}class cz extends nz{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}class lz{constructor(e,t){if(this.renderer=e,this._pixelRatio=e.getPixelRatio(),void 0===t){const n=e.getSize(new OO);this._width=n.width,this._height=n.height,(t=new tN(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:HI})).texture.name="EffectComposer.rt1"}else this._width=t.width,this._height=t.height;this.renderTarget1=t,this.renderTarget2=t.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new oz(tz),this.copyPass.material.blending=0,this.clock=new ZF}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const t=this.passes.indexOf(e);-1!==t&&this.passes.splice(t,1)}isLastEnabledPass(e){for(let t=e+1;t=0&&i<1?(s=a,c=o):i>=1&&i<2?(s=o,c=a):i>=2&&i<3?(c=a,l=o):i>=3&&i<4?(c=o,l=a):i>=4&&i<5?(s=o,l=a):i>=5&&i<6&&(s=a,l=o);var u=n-a/2;return r(s+u,c+u,l+u)}var vz={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},yz=/^#[a-fA-F0-9]{6}$/,Ez=/^#[a-fA-F0-9]{8}$/,_z=/^#[a-fA-F0-9]{3}$/,Sz=/^#[a-fA-F0-9]{4}$/,xz=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,Tz=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,Az=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,kz=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function Cz(e){if("string"!=typeof e)throw new gz(3);var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return vz[t]?"#"+vz[t]:e}(e);if(t.match(yz))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match(Ez)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(_z))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(Sz)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var i=xz.exec(t);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var a=Tz.exec(t.substring(0,50));if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10),alpha:parseFloat(""+a[4])>1?parseFloat(""+a[4])/100:parseFloat(""+a[4])};var o=Az.exec(t);if(o){var s="rgb("+wz(parseInt(""+o[1],10),parseInt(""+o[2],10)/100,parseInt(""+o[3],10)/100)+")",c=xz.exec(s);if(!c)throw new gz(4,t,s);return{red:parseInt(""+c[1],10),green:parseInt(""+c[2],10),blue:parseInt(""+c[3],10)}}var l=kz.exec(t.substring(0,50));if(l){var u="rgb("+wz(parseInt(""+l[1],10),parseInt(""+l[2],10)/100,parseInt(""+l[3],10)/100)+")",f=xz.exec(u);if(!f)throw new gz(4,t,u);return{red:parseInt(""+f[1],10),green:parseInt(""+f[2],10),blue:parseInt(""+f[3],10),alpha:parseFloat(""+l[4])>1?parseFloat(""+l[4])/100:parseFloat(""+l[4])}}throw new gz(5)}var Mz=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function Iz(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function Oz(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return Mz("#"+Iz(e)+Iz(t)+Iz(n));if("object"==typeof e&&void 0===t&&void 0===n)return Mz("#"+Iz(e.red)+Iz(e.green)+Iz(e.blue));throw new gz(6)}function Nz(e,t,n){return function(){var r=n.concat(Array.prototype.slice.call(arguments));return r.length>=t?e.apply(this,r):Nz(e,t,r)}}function Rz(e){return Nz(e,e.length,[])}function Pz(e,t,n){return Math.max(e,Math.min(t,n))}function Lz(e,t){if("transparent"===t)return t;var n=Cz(t),r="number"==typeof n.alpha?n.alpha:1;return function(e,t,n,r){if("string"==typeof e&&"number"==typeof t){var i=Cz(e);return"rgba("+i.red+","+i.green+","+i.blue+","+t+")"}if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r)return r>=1?Oz(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if("object"==typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?Oz(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new gz(7)}((0,ve.A)({},n,{alpha:Pz(0,1,(100*r+100*parseFloat(e))/100)}))}var Dz=Rz(Lz),Fz={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-Fz.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*Fz.Bounce.In(2*e):.5*Fz.Bounce.Out(2*e-1)+.5}}},Uz="undefined"==typeof self&&"undefined"!=typeof process&&process.hrtime?function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},jz=function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map((function(t){return e._tweens[t]}))},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},e.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},e.prototype.update=function(e,t){void 0===e&&(e=Uz()),void 0===t&&(t=!1);var n=Object.keys(this._tweens);if(0===n.length)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var r=0;r1?a(e[n],e[n-1],n-r):a(e[i],e[i+1>n?n:i+1],r-i)},Bezier:function(e,t){for(var n=0,r=e.length-1,i=Math.pow,a=Bz.Utils.Bernstein,o=0;o<=r;o++)n+=i(1-t,r-o)*i(t,o)*e[o]*a(r,o);return n},CatmullRom:function(e,t){var n=e.length-1,r=n*t,i=Math.floor(r),a=Bz.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(i=Math.floor(r=n*(1+t))),a(e[(i-1+n)%n],e[i],e[(i+1)%n],e[(i+2)%n],r-i)):t<0?e[0]-(a(e[0],e[0],e[1],e[1],-r)-e[0]):t>1?e[n]-(a(e[n],e[n],e[n-1],e[n-1],r-n)-e[n]):a(e[i?i-1:0],e[i],e[n1;r--)n*=r;return e[t]=n,n}}(),CatmullRom:function(e,t,n,r,i){var a=.5*(n-e),o=.5*(r-t),s=i*i;return(2*t-2*n+a+o)*(i*s)+(-3*t+3*n-2*a-o)*s+a*i+t}}},zz=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),$z=new jz,Hz=function(){function e(e,t){void 0===t&&(t=$z),this._object=e,this._group=t,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Fz.Linear.None,this._interpolationFunction=Bz.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=zz.nextId(),this._isChainStopped=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.to=function(e,t){return this._valuesEnd=Object.create(e),void 0!==t&&(this._duration=t),this},e.prototype.duration=function(e){return this._duration=e,this},e.prototype.start=function(e){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var t in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(t),this._valuesStart[t]=this._valuesStartRepeat[t];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==e?"string"==typeof e?Uz()+parseFloat(e):e:Uz(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},e.prototype._setupProperties=function(e,t,n,r){for(var i in n){var a=e[i],o=Array.isArray(a),s=o?"array":typeof a,c=!o&&Array.isArray(n[i]);if("undefined"!==s&&"function"!==s){if(c){var l=n[i];if(0===l.length)continue;l=l.map(this._handleRelativeValue.bind(this,a)),n[i]=[a].concat(l)}if("object"!==s&&!o||!a||c)void 0===t[i]&&(t[i]=a),o||(t[i]*=1),r[i]=c?n[i].slice().reverse():t[i]||0;else{for(var u in t[i]=o?[]:{},a)t[i][u]=a[u];r[i]=o?[]:{},this._setupProperties(a,t[i],n[i],r[i])}}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(e){return void 0===e&&(e=Uz()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this)),this},e.prototype.resume=function(e){return void 0===e&&(e=Uz()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},e.prototype.stopChainedTweens=function(){for(var e=0,t=this._chainedTweens.length;ei)return!1;t&&this.start(e)}if(this._goToEnd=!1,e1?1:r;var a=this._easingFunction(r);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,a),this._onUpdateCallback&&this._onUpdateCallback(this._object,r),1===r){if(this._repeat>0){for(n in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[n]||(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var o=0,s=this._chainedTweens.length;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t}},PerspectiveCamera:pP,Raycaster:oU,SRGBColorSpace:iO,TextureLoader:class extends HF{constructor(e){super(e)}load(e,t,n,r){const i=new QO,a=new GF(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,(function(e){i.image=e,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}},Vector2:OO,Vector3:aN,Box3:cN,Color:SR,Mesh:aP,SphereGeometry:CF,MeshBasicMaterial:kR,BackSide:1,EventDispatcher:mO,MOUSE:gI,Quaternion:iN,Spherical:lU,Clock:ZF},Kz=fj({props:{width:{default:window.innerWidth,onChange:function(e,t,n){isNaN(e)&&(t.width=n)}},height:{default:window.innerHeight,onChange:function(e,t,n){isNaN(e)&&(t.height=n)}},backgroundColor:{default:"#000011"},backgroundImageUrl:{},onBackgroundImageLoaded:{},showNavInfo:{default:!0},skyRadius:{default:5e4},objects:{default:[]},lights:{default:[]},enablePointerInteraction:{default:!0,onChange:function(e,t){t.hoverObj=null,t.toolTipElem&&(t.toolTipElem.innerHTML="")},triggerUpdate:!1},lineHoverPrecision:{default:1,triggerUpdate:!1},hoverOrderComparator:{default:function(){return-1},triggerUpdate:!1},hoverFilter:{default:function(){return!0},triggerUpdate:!1},tooltipContent:{triggerUpdate:!1},hoverDuringDrag:{default:!1,triggerUpdate:!1},clickAfterDrag:{default:!1,triggerUpdate:!1},onHover:{default:function(){},triggerUpdate:!1},onClick:{default:function(){},triggerUpdate:!1},onRightClick:{triggerUpdate:!1}},methods:{tick:function(e){if(e.initialised){if(e.controls.update&&e.controls.update(e.clock.getDelta()),e.postProcessingComposer?e.postProcessingComposer.render():e.renderer.render(e.scene,e.camera),e.extraRenderers.forEach((function(t){return t.render(e.scene,e.camera)})),e.enablePointerInteraction){var t=null;if(e.hoverDuringDrag||!e.isPointerDragging){var n=this.intersectingObjects(e.pointerPos.x,e.pointerPos.y).filter((function(t){return e.hoverFilter(t.object)})).sort((function(t,n){return e.hoverOrderComparator(t.object,n.object)})),r=n.length?n[0]:null;t=r?r.object:null,e.intersectionPoint=r?r.point:null}t!==e.hoverObj&&(e.onHover(t,e.hoverObj),e.toolTipElem.innerHTML=t&&hj(e.tooltipContent)(t)||"",e.hoverObj=t)}Vz()}return this},getPointerPos:function(e){var t=e.pointerPos;return{x:t.x,y:t.y}},cameraPosition:function(e,t,n,r){var i=e.camera;if(t&&e.initialised){var a=t,o=n||{x:0,y:0,z:0};if(r){var s=Object.assign({},i.position),c=f();new Hz(s).to(a,r).easing(Fz.Quadratic.Out).onUpdate(l).start(),new Hz(c).to(o,r/3).easing(Fz.Quadratic.Out).onUpdate(u).start()}else l(a),u(o);return this}return Object.assign({},i.position,{lookAt:f()});function l(e){var t=e.x,n=e.y,r=e.z;void 0!==t&&(i.position.x=t),void 0!==n&&(i.position.y=n),void 0!==r&&(i.position.z=r)}function u(t){var n=new Yz.Vector3(t.x,t.y,t.z);e.controls.target?e.controls.target=n:i.lookAt(n)}function f(){return Object.assign(new Yz.Vector3(0,0,-1e3).applyQuaternion(i.quaternion).add(i.position))}},zoomToFit:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length,i=new Array(r>3?r-3:0),a=3;a2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,i=e.camera;if(t){var a=new Yz.Vector3(0,0,0),o=2*Math.max.apply(Math,Wz(Object.entries(t).map((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||qz(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),n=t[0],r=t[1];return Math.max.apply(Math,Wz(r.map((function(e){return Math.abs(a[n]-e)}))))})))),s=(1-2*r/e.height)*i.fov,c=o/Math.atan(s*Math.PI/180),l=c/i.aspect,u=Math.max(c,l);if(u>0){var f=a.clone().sub(i.position).normalize().multiplyScalar(-u);this.cameraPosition(f,a,n)}}return this},getBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=new Yz.Box3(new Yz.Vector3(0,0,0),new Yz.Vector3(0,0,0)),r=e.objects.filter(t);return r.length?(r.forEach((function(e){return n.expandByObject(e)})),Object.assign.apply(Object,Wz(["x","y","z"].map((function(e){return function(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},e,[n.min[e],n.max[e]])}))))):null},getScreenCoords:function(e,t,n,r){var i=new Yz.Vector3(t,n,r);return i.project(this.camera()),{x:(i.x+1)*e.width/2,y:-(i.y-1)*e.height/2}},getSceneCoords:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=new Yz.Vector2(t/e.width*2-1,-n/e.height*2+1),a=new Yz.Raycaster;return a.setFromCamera(i,e.camera),Object.assign({},a.ray.at(r,new Yz.Vector3))},intersectingObjects:function(e,t,n){var r=new Yz.Vector2(t/e.width*2-1,-n/e.height*2+1),i=new Yz.Raycaster;return i.params.Line.threshold=e.lineHoverPrecision,i.setFromCamera(r,e.camera),i.intersectObjects(e.objects,!0)},renderer:function(e){return e.renderer},scene:function(e){return e.scene},camera:function(e){return e.camera},postProcessingComposer:function(e){return e.postProcessingComposer},controls:function(e){return e.controls},tbControls:function(e){return e.controls}},stateInit:function(){return{scene:new Yz.Scene,camera:new Yz.PerspectiveCamera,clock:new Yz.Clock}},init:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.controlType,i=void 0===r?"trackball":r,a=n.rendererConfig,o=void 0===a?{}:a,s=n.extraRenderers,c=void 0===s?[]:s,l=n.waitForLoadComplete,u=void 0===l||l;e.innerHTML="",e.appendChild(t.container=document.createElement("div")),t.container.className="scene-container",t.container.style.position="relative",t.container.appendChild(t.navInfo=document.createElement("div")),t.navInfo.className="scene-nav-info",t.navInfo.textContent={orbit:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",trackball:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",fly:"WASD: move, R|F: up | down, Q|E: roll, up|down: pitch, left|right: yaw"}[i]||"",t.navInfo.style.display=t.showNavInfo?null:"none",t.toolTipElem=document.createElement("div"),t.toolTipElem.classList.add("scene-tooltip"),t.container.appendChild(t.toolTipElem),t.pointerPos=new Yz.Vector2,t.pointerPos.x=-2,t.pointerPos.y=-2,["pointermove","pointerdown"].forEach((function(e){return t.container.addEventListener(e,(function(n){if("pointerdown"===e&&(t.isPointerPressed=!0),!t.isPointerDragging&&"pointermove"===n.type&&(n.pressure>0||t.isPointerPressed)&&("touch"!==n.pointerType||void 0===n.movementX||[n.movementX,n.movementY].some((function(e){return Math.abs(e)>1})))&&(t.isPointerDragging=!0),t.enablePointerInteraction){var r=(i=t.container.getBoundingClientRect(),a=window.pageXOffset||document.documentElement.scrollLeft,o=window.pageYOffset||document.documentElement.scrollTop,{top:i.top+o,left:i.left+a});t.pointerPos.x=n.pageX-r.left,t.pointerPos.y=n.pageY-r.top,t.toolTipElem.style.top="".concat(t.pointerPos.y,"px"),t.toolTipElem.style.left="".concat(t.pointerPos.x,"px"),t.toolTipElem.style.transform="translate(-".concat(t.pointerPos.x/t.width*100,"%, ").concat(t.height-t.pointerPos.y<100?"calc(-100% - 8px)":"21px",")")}var i,a,o}),{passive:!0})})),t.container.addEventListener("pointerup",(function(e){t.isPointerPressed=!1,t.isPointerDragging&&(t.isPointerDragging=!1,!t.clickAfterDrag)||requestAnimationFrame((function(){0===e.button&&t.onClick(t.hoverObj||null,e,t.intersectionPoint),2===e.button&&t.onRightClick&&t.onRightClick(t.hoverObj||null,e,t.intersectionPoint)}))}),{passive:!0,capture:!0}),t.container.addEventListener("contextmenu",(function(e){t.onRightClick&&e.preventDefault()})),t.renderer=new Yz.WebGLRenderer(Object.assign({antialias:!0,alpha:!0},o)),t.renderer.setPixelRatio(Math.min(2,window.devicePixelRatio)),t.container.appendChild(t.renderer.domElement),t.extraRenderers=c,t.extraRenderers.forEach((function(e){e.domElement.style.position="absolute",e.domElement.style.top="0px",e.domElement.style.pointerEvents="none",t.container.appendChild(e.domElement)})),t.postProcessingComposer=new lz(t.renderer),t.postProcessingComposer.addPass(new uz(t.scene,t.camera)),t.controls=new{trackball:VB,orbit:QB,fly:ez}[i](t.camera,t.renderer.domElement),"fly"===i&&(t.controls.movementSpeed=300,t.controls.rollSpeed=Math.PI/6,t.controls.dragToLook=!0),"trackball"!==i&&"orbit"!==i||(t.controls.minDistance=.1,t.controls.maxDistance=t.skyRadius,t.controls.addEventListener("start",(function(){t.controlsEngaged=!0})),t.controls.addEventListener("change",(function(){t.controlsEngaged&&(t.controlsDragging=!0)})),t.controls.addEventListener("end",(function(){t.controlsEngaged=!1,t.controlsDragging=!1}))),[t.renderer,t.postProcessingComposer].concat(Wz(t.extraRenderers)).forEach((function(e){return e.setSize(t.width,t.height)})),t.camera.aspect=t.width/t.height,t.camera.updateProjectionMatrix(),t.camera.position.z=1e3,t.scene.add(t.skysphere=new Yz.Mesh),t.skysphere.visible=!1,t.loadComplete=t.scene.visible=!u,window.scene=t.scene},update:function(e,t){if(e.width&&e.height&&(t.hasOwnProperty("width")||t.hasOwnProperty("height"))&&(e.container.style.width="".concat(e.width,"px"),e.container.style.height="".concat(e.height,"px"),[e.renderer,e.postProcessingComposer].concat(Wz(e.extraRenderers)).forEach((function(t){return t.setSize(e.width,e.height)})),e.camera.aspect=e.width/e.height,e.camera.updateProjectionMatrix()),t.hasOwnProperty("skyRadius")&&e.skyRadius&&(e.controls.hasOwnProperty("maxDistance")&&t.skyRadius&&(e.controls.maxDistance=Math.min(e.controls.maxDistance,e.skyRadius)),e.camera.far=2.5*e.skyRadius,e.camera.updateProjectionMatrix(),e.skysphere.geometry=new Yz.SphereGeometry(e.skyRadius)),t.hasOwnProperty("backgroundColor")){var n=Cz(e.backgroundColor).alpha;void 0===n&&(n=1),e.renderer.setClearColor(new Yz.Color(Dz(1,e.backgroundColor)),n)}function r(){e.loadComplete=e.scene.visible=!0}t.hasOwnProperty("backgroundImageUrl")&&(e.backgroundImageUrl?(new Yz.TextureLoader).load(e.backgroundImageUrl,(function(t){t.colorSpace=Yz.SRGBColorSpace,e.skysphere.material=new Yz.MeshBasicMaterial({map:t,side:Yz.BackSide}),e.skysphere.visible=!0,e.onBackgroundImageLoaded&&setTimeout(e.onBackgroundImageLoaded),!e.loadComplete&&r()})):(e.skysphere.visible=!1,e.skysphere.material.map=null,!e.loadComplete&&r())),t.hasOwnProperty("showNavInfo")&&(e.navInfo.style.display=e.showNavInfo?null:"none"),t.hasOwnProperty("lights")&&((t.lights||[]).forEach((function(t){return e.scene.remove(t)})),e.lights.forEach((function(t){return e.scene.add(t)}))),t.hasOwnProperty("objects")&&((t.objects||[]).forEach((function(t){return e.scene.remove(t)})),e.objects.forEach((function(t){return e.scene.add(t)})))}});function Zz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qz(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?i-1:0),o=1;o3?i-3:0),o=3;o1?t-1:0),r=1;r{const[t,n]=(0,e.useState)(),[r,i]=(0,e.useState)(["same"]),[a,o]=(0,e.useState)(0),[s,c]=(0,e.useState)(0),{dataLoading:l,dataTree:u,getStoreKey:f,dataStore:h,ensureFullExplorerData:d,fullLoadProgress:p}=Nx(),g=(0,e.useRef)(),[b,m]=(0,e.useState)(""),[w,v]=(0,e.useState)(""),[y,E]=(0,e.useState)([]),[_,S]=(0,e.useState)([]);(0,e.useEffect)((()=>{d()}),[d]);const[x,T]=(0,e.useState)(!0),A=e=>e.split(":")[0],k=e=>`grouped_${e}`,C=e=>e.replace("grouped_","");(0,e.useEffect)((()=>{const e=Object.values(h).filter((e=>"CRE"===e.doctype)).map((e=>({key:e.id,text:e.displayName,value:e.id})));E([{key:"none_typeA",text:"None",value:""},{key:"all_cre",text:"ALL CREs",value:"all_cre"},...e])}),[h]),(0,e.useEffect)((()=>{const e={nodes:[],links:[]};function t(e,n=[]){return e.doctype&&"standard"===e.doctype.toLowerCase()&&n.push(e),e.links&&Array.isArray(e.links)&&e.links.forEach((e=>{e.document&&t(e.document,n)})),n}Object.values(h);let i=[];u.forEach((e=>{i=i.concat(t(e))}));const a=new Map;i.forEach((e=>{const t=A(e.id);a.has(t)||a.set(t,[]),a.get(t).push(e)}));const s=new Map;a.forEach(((e,t)=>{const n=k(t);e.forEach((e=>{s.set(e.id,n)}))}));const l=i.map((e=>e.id));console.log("Standard IDs from JSON data:",l),console.log("Grouped standards:",Array.from(a.keys()));const d=Array.from(a.entries()).map((([e,t])=>({key:k(e),text:`${e} (${t.length})`,value:k(e)}))),p=(e,t)=>{var n,r,i;if(!t||""===t)return!0;if((i=t)&&i.startsWith("all_")){const r=(e=>e.replace("all_",""))(t);return(null===(n=e.doctype)||void 0===n?void 0:n.toLowerCase())===r.toLowerCase()}if((e=>e&&e.startsWith("grouped_"))(t)){const n=C(t);return"standard"===(null===(r=e.doctype)||void 0===r?void 0:r.toLowerCase())&&A(e.id)===n}return e.id===t},g=t=>{t.links&&Array.isArray(t.links)&&t.links.forEach((n=>{var i,a;if(n.document&&!r.includes(n.ltype.toLowerCase())){const r="standard"===(null===(i=t.doctype)||void 0===i?void 0:i.toLowerCase())&&s.get(t.id)||f(t),o="standard"===(null===(a=n.document.doctype)||void 0===a?void 0:a.toLowerCase())&&s.get(n.document.id)||f(n.document);e.links.push({source:r,target:o,count:"Contains"===n.ltype?2:1,type:n.ltype}),g(n.document)}}))};u.forEach((e=>g(e))),x||!b&&!w||(e.links=e.links.filter((e=>{let t=h[e.source],n=h[e.target];if(e.source.startsWith("grouped_")){const n=C(e.source);t={id:e.source,doctype:"standard",displayName:n,links:[],url:"",name:n}}if(e.target.startsWith("grouped_")){const t=C(e.target);n={id:e.target,doctype:"standard",displayName:t,links:[],url:"",name:t}}if(!t||!n)return!1;const r=p(t,b),i=p(t,w),a=p(n,b),o=p(n,w);return r||i||a||o})));const m={},v=function(t){if(m[t])m[t].size+=1;else{if(t.startsWith("grouped_")){const e=C(t),n=a.get(e)||[],r=n.length;m[t]={id:t,size:r,name:e,doctype:"standard",originalNodes:n}}else{const e=h[t];m[t]={id:t,size:1,name:e?e.displayName:t,doctype:e?e.doctype:"Unknown"}}e.nodes.push(m[t])}};e.links.forEach((e=>{v(e.source),v(e.target)}));const y=[{key:"none_typeB",text:"None",value:""},{key:"all_standard",text:"ALL Standards",value:"all_standard"},{key:"separator1",text:"─ Standards ─",value:"",disabled:!0},...d,{key:"separator2",text:"─ CREs ─",value:"",disabled:!0},{key:"all_cre_right",text:"ALL CREs",value:"all_cre"},...Object.values(h).filter((e=>"CRE"===e.doctype)).map((e=>({key:`${e.id}_right`,text:e.displayName,value:e.id})))];S(y),c(e.nodes.map((e=>e.size)).reduce(((e,t)=>Math.max(e,t)),0)),o(e.links.map((e=>e.count)).reduce(((e,t)=>Math.max(e,t)),0)),e.links=e.links.map((e=>({source:e.target,target:e.source,count:e.count,type:e.type}))),n(e)}),[r,u,b,w,x,h]);const M=e=>{const t=structuredClone(r);if(t.includes(e)){const n=t.indexOf(e);t.splice(n,1),i(t)}else t.push(e),i(t)};return(0,e.useEffect)((()=>{var e;t&&g.current&&(null===(e=g.current.d3Force("charge"))||void 0===e||e.strength(-55),setTimeout((()=>{var e,t,n;null===(t=null===(e=g.current)||void 0===e?void 0:e.d3Force("charge"))||void 0===t||t.strength(-75),null===(n=g.current)||void 0===n||n.d3ReheatSimulation()}),200),setTimeout((()=>{var e,t;null===(t=null===(e=g.current)||void 0===e?void 0:e.d3Force("charge"))||void 0===t||t.strength(-95)}),600))}),[t]),(0,e.useEffect)((()=>{g.current&&t&&setTimeout((()=>{var e;null===(e=g.current)||void 0===e||e.cameraPosition({x:1100,y:0,z:800},{x:-50,y:-100,z:-200},800)}),1200)}),[t]),e.createElement("div",null,e.createElement(Qg,{loading:l||!!p,error:null}),p&&e.createElement("p",{className:"explorer-full-load-progress"},"Loading graph data (",p,")…"),e.createElement(Ry,{label:"Contains",checked:!r.includes("contains"),onChange:()=>M("contains")})," | ",e.createElement(Ry,{label:"Related",checked:!r.includes("related"),onChange:()=>M("related")})," | ",e.createElement(Ry,{label:"Linked To",checked:!r.includes("linked to"),onChange:()=>M("linked to")})," | ",e.createElement(Ry,{label:"Same",checked:!r.includes("same"),onChange:()=>M("same")}),e.createElement("div",{style:{marginBottom:"10px",marginTop:"10px",marginLeft:"10px"}},e.createElement(KE,{placeholder:"Select CRE",options:y,value:b,onChange:(e,t)=>{var n;return m(null!==(n=t.value)&&void 0!==n?n:"")},style:{marginRight:"10px"},selection:!0,search:!0}),e.createElement(KE,{placeholder:"Select Standard or CRE",options:_,value:w,onChange:(e,t)=>{var n;return v(null!==(n=t.value)&&void 0!==n?n:"")},selection:!0,search:!0})," | ",e.createElement(Ry,{label:"Show All",checked:x,onChange:()=>T(!x)})),x||b||w?t&&e.createElement(b$,{ref:g,graphData:t,backgroundColor:"#06080f",nodeRelSize:6.32,nodeVal:e=>Math.max(14*e.size/s,.8),nodeLabel:e=>`${e.name} (${e.size})`,nodeColor:e=>(e=>{switch(e.toLowerCase()){case"cre":return"lightblue";case"standard":return"orange";case"tool":return"lightgreen";case"linked to":return"red";default:return"purple"}})(e.doctype),linkOpacity:.25,linkWidth:()=>5,linkColor:e=>(e=>{switch(e.toLowerCase()){case"related":return"skyblue";case"linked to":return"gray";case"same":return"red";default:return"white"}})(e.type),warmupTicks:0,cooldownTicks:120}):e.createElement("div",{style:{marginTop:"20px",color:"gray"}},'Please select at least one filter to view the graph or check "Show All".'))};var w$=n(73);i()(w$.A,{insert:"head",singleton:!1}),w$.A.locals;var v$=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())}))};const y$=e=>0==e?"Direct":e<=2?"Strong":e>=7?"Weak":"Average",E$=e=>0===e?"darkgreen":e<=2?"#93C54B":e>=7?"Red":"Orange",_$=(t,n,r)=>{let i=n[r].start.id;return e.createElement("div",{key:t.end.id,style:{marginBottom:".25em",fontWeight:"bold"}},e.createElement("a",{href:aw(t.end),target:"_blank",rel:"noopener noreferrer"},e.createElement(Tx,{wide:"very",size:"large",style:{textAlign:"center"},hoverable:!0,position:"right center",trigger:e.createElement("span",null,nw(t.end,!0)," ")},e.createElement(Tx.Content,null,nw(n[r].start,!0),t.path.map((t=>{const{text:n,nextID:r}=((t,n)=>{var r,i,a;let o=t.end,s=t.end.id,c=e.createElement(Bg,{name:"arrow down"});return n!==t.start.id&&(o=t.start,s=t.start.id,c=e.createElement(Bg,{name:"arrow up"})),{text:e.createElement(e.Fragment,null,e.createElement("br",null),c," ",e.createElement("span",{style:{textTransform:"capitalize"}},t.relationship.replace("_"," ").toLowerCase()," ",t.score>0&&e.createElement(e.Fragment,null," (+",t.score,")")),e.createElement("br",null)," ",nw(o,!0)," ",null!==(r=o.section)&&void 0!==r?r:""," ",null!==(i=o.subsection)&&void 0!==i?i:""," ",null!==(a=o.description)&&void 0!==a?a:""),nextID:s}})(t,i);return i=r,n})))),e.createElement(Tx,{wide:"very",size:"large",style:{textAlign:"center"},hoverable:!0,position:"right center",trigger:e.createElement("b",{style:{color:E$(t.score)}},"(",y$(t.score),":",t.score,")")},e.createElement(Tx.Content,null,e.createElement("b",null,"Generally: lower is better"),e.createElement("br",null),e.createElement("b",{style:{color:E$(0)}},y$(0)),": Directly Linked",e.createElement("br",null),e.createElement("b",{style:{color:E$(2)}},y$(2)),": Closely connected likely to have majority overlap",e.createElement("br",null),e.createElement("b",{style:{color:E$(6)}},y$(6)),": Connected likely to have partial overlap",e.createElement("br",null),e.createElement("b",{style:{color:E$(7)}},y$(7)),": Weakly connected likely to have small or no overlap"))))},S$=()=>{var t,n;const r=[{key:"",text:"",value:void 0}],i=function(){const{search:t}=at();return e.useMemo((()=>new URLSearchParams(t)),[t])}(),[a,o]=(0,e.useState)(r),[s,c]=(0,e.useState)(null!==(t=i.get("base"))&&void 0!==t?t:""),[l,u]=(0,e.useState)(null!==(n=i.get("compare"))&&void 0!==n?n:""),[f,h]=(0,e.useState)(""),[d,p]=(0,e.useState)(),[g,b]=(0,e.useState)(!1),[m,w]=(0,e.useState)(!1),[v,y]=(0,e.useState)(null),{apiUrl:E}=tb(),_=(0,e.useRef)();(0,e.useEffect)((()=>{b(!0),v$(void 0,void 0,void 0,(function*(){const e=yield cn().get(`${E}/ga_standards`);b(!1),o(r.concat(e.data.sort().map((e=>({key:e,text:e,value:e})))))})).catch((e=>{var t;b(!1),y(null!==(t=e.response.data.message)&&void 0!==t?t:e.message)}))}),[o,b,y]),(0,e.useEffect)((()=>{const e=()=>{clearInterval(_.current)};return f?(console.log("started polling"),_.current=setInterval((()=>{f&&v$(void 0,void 0,void 0,(function*(){const e=yield cn().get(`${E}/ma_job_results?id=`+f,{headers:{"Cache-Control":"no-cache",Pragma:"no-cache",Expires:"0"}});e.data.result&&(w(!1),p(e.data.result),h(""))})).catch((e=>{var t;w(!1),y(null!==(t=e.response.data.message)&&void 0!==t?t:e.message)}))}),1e4)):(console.log("stoped polling"),e()),()=>{e()}}),[f]),(0,e.useEffect)((()=>{s&&l&&s!==l&&(p(void 0),w(!0),v$(void 0,void 0,void 0,(function*(){const e=yield cn().get(`${E}/map_analysis?standard=${s}&standard=${l}`);e.data.result?(w(!1),p(e.data.result)):e.data.job_id&&h(e.data.job_id)})).catch((e=>{var t;w(!1),y(null!==(t=e.response.data.message)&&void 0!==t?t:e.message)})))}),[s,l,p,w,y]);const S=(0,e.useCallback)((e=>v$(void 0,void 0,void 0,(function*(){if(!d)return;const t=yield cn().get(`${E}/map_analysis_weak_links?standard=${s}&standard=${l}&key=${e}`);t.data.result&&p((n=>n?Object.assign(Object.assign({},n),{[e]:Object.assign(Object.assign({},n[e]),{weakLinks:t.data.result.paths})}):n))}))),[d,p]);return e.createElement("main",{id:"gap-analysis"},e.createElement("h1",{className:"standard-page__heading"},"Map Analysis"),e.createElement(Qg,{loading:m||g,error:v}),e.createElement(qx,{celled:!0,padded:!0,compact:!0},e.createElement(qx.Header,null,e.createElement(qx.Row,null,e.createElement(qx.HeaderCell,null,e.createElement("span",{className:"name"},"Base:"),e.createElement(KE,{placeholder:"Base Standard",search:!0,selection:!0,options:a,onChange:(e,{value:t})=>c(null==t?void 0:t.toString()),value:s})),e.createElement(qx.HeaderCell,null,e.createElement("span",{className:"name"},"Compare:"),e.createElement(KE,{placeholder:"Compare Standard",search:!0,selection:!0,options:a,onChange:(e,{value:t})=>u(null==t?void 0:t.toString()),value:l}),d&&e.createElement("div",{style:{float:"right"}},e.createElement(sv,{onClick:()=>{navigator.clipboard.writeText(`${window.location.origin}/map_analysis?base=${encodeURIComponent(s||"")}&compare=${encodeURIComponent(l||"")}`)},target:"_blank"},e.createElement(Bg,{name:"share square"})," Copy link to analysis"))))),e.createElement(qx.Body,null,d&&e.createElement(e.Fragment,null,Object.keys(d).sort(((e,t)=>nw(d[e].start,!0).localeCompare(nw(d[t].start,!0)))).map((t=>e.createElement(qx.Row,{key:t},e.createElement(qx.Cell,{textAlign:"left",verticalAlign:"top",selectable:!0},e.createElement("a",{href:aw(d[t].start),target:"_blank",rel:"noopener noreferrer"},e.createElement("p",null,e.createElement("b",null,nw(d[t].start,!0))))),e.createElement(qx.Cell,{style:{minWidth:"35vw"}},Object.values(d[t].paths).sort(((e,t)=>e.score-t.score)).map((e=>_$(e,d,t))),d[t].weakLinks&&Object.values(d[t].weakLinks).sort(((e,t)=>e.score-t.score)).map((e=>_$(e,d,t))),d[t].extra>0&&!d[t].weakLinks&&e.createElement(sv,{onClick:()=>v$(void 0,void 0,void 0,(function*(){return yield S(t)}))},"Show average and weak links (",d[t].extra,")"),0===Object.keys(d[t].paths).length&&0===d[t].extra&&e.createElement("i",null,"No links Found")))))))))};var x$=n(3789);i()(x$.A,{insert:"head",singleton:!1}),x$.A.locals;const T$=()=>e.createElement("div",{className:"membership-required"},e.createElement(ky,{as:"h1",className:"membership-required__heading"},"OWASP Membership Required"),e.createElement("p",null,"A OWASP Membership account is needed to login"),e.createElement(sv,{primary:!0,href:"https://owasp.org/membership/"},"Sign up"));var A$=n(6129);i()(A$.A,{insert:"head",singleton:!1}),A$.A.locals;var k$=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())}))};const C$=()=>{var t,n;const{apiUrl:r}=tb(),i="/rest/v1"!==r,[a,o]=(0,e.useState)(null),[s,c]=(0,e.useState)(!1),[l,u]=(0,e.useState)(null),[f,h]=(0,e.useState)(null),[d,p]=(0,e.useState)(null),[g,b]=(0,e.useState)(null),[m,w]=(0,e.useState)(!1),v=(0,e.useRef)(null);return e.createElement(My,{className:"myopencre-container"},e.createElement(ky,{as:"h1"},"MyOpenCRE"),e.createElement("p",null,"MyOpenCRE allows you to map your own security standard (e.g. SOC2) to OpenCRE Common Requirements using a CSV spreadsheet."),e.createElement("p",null,"Start by downloading the CRE catalogue below, then map your standard's controls or sections to CRE IDs in the spreadsheet."),e.createElement("div",{className:"myopencre-section"},e.createElement(sv,{primary:!0,onClick:()=>k$(void 0,void 0,void 0,(function*(){try{const e=r||window.location.origin,t=e.includes("localhost")?"http://127.0.0.1:5000":e,n=yield fetch(`${t}/cre_csv`,{method:"GET",headers:{Accept:"text/csv"}});if(!n.ok)throw new Error(`HTTP error ${n.status}`);const i=yield n.blob(),a=window.URL.createObjectURL(i),o=document.createElement("a");o.href=a,o.download="opencre-cre-mapping.csv",document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(a)}catch(e){console.error("CSV download failed:",e),alert("Failed to download CRE CSV")}}))},"Download CRE Catalogue (CSV)")),e.createElement("div",{className:"myopencre-section myopencre-upload"},e.createElement(ky,{as:"h3"},"Upload Mapping CSV"),e.createElement(Zg,{info:!0,className:"cursor-pointer"},e.createElement("details",null,e.createElement("summary",null,e.createElement("strong",null,"How to prepare your CSV")),e.createElement("ul",null,e.createElement("li",null,"Start from the downloaded CRE Catalogue CSV."),e.createElement("li",null,"Fill ",e.createElement("code",null,"standard|name")," and ",e.createElement("code",null,"standard|id")," for your standard."),e.createElement("li",null,"Map your controls using CRE columns (",e.createElement("code",null,"CRE 0"),", ",e.createElement("code",null,"CRE 1"),", …)."),e.createElement("li",null,"CRE values must be in the format ",e.createElement("code",null,"|"),e.createElement("br",null),e.createElement("em",null,"Example:")," ",e.createElement("code",null,"616-305|Development processes for security"))))),!i&&e.createElement(Zg,{info:!0,className:"myopencre-disabled"},"CSV upload is disabled on hosted environments due to resource constraints.",e.createElement("br",null),"Please run OpenCRE locally to enable standard imports."),l?l.errors&&l.errors.length>0?e.createElement(Zg,{negative:!0},e.createElement("strong",null,"Import failed due to validation errors"),e.createElement("ul",null,l.errors.map(((t,n)=>e.createElement("li",{key:n},e.createElement("strong",null,"Row ",t.row,":")," ",t.message))))):e.createElement(Zg,{negative:!0},l.message||"Import failed"):null,d&&e.createElement(Zg,{info:!0},d),f&&e.createElement(Zg,{positive:!0},e.createElement("strong",null,"Import successful"),e.createElement("ul",null,e.createElement("li",null,"New CREs added: ",null!==(n=null===(t=f.new_cres)||void 0===t?void 0:t.length)&&void 0!==n?n:0),e.createElement("li",null,"Standards imported: ",f.new_standards))),m&&!s&&!f&&!l&&e.createElement(Zg,{positive:!0},"CSV validated successfully. Click ",e.createElement("strong",null,"Upload CSV")," to start importing."),g&&e.createElement(Zg,{info:!0,className:"myopencre-preview"},e.createElement("strong",null,"Import Preview"),e.createElement("ul",null,e.createElement("li",null,"Rows detected: ",g.rows),e.createElement("li",null,"CRE mappings found: ",g.creMappings),e.createElement("li",null,"Unique standard sections: ",g.uniqueSections),e.createElement("li",null,"CRE columns detected: ",g.creColumns.join(", "))),e.createElement(sv,{primary:!0,size:"small",onClick:()=>{b(null),w(!0)}},"Confirm Import"),e.createElement(sv,{size:"small",onClick:()=>{b(null),w(!1),o(null),v.current&&(v.current.value="")}},"Cancel")),e.createElement(b_,null,e.createElement(b_.Field,null,e.createElement("input",{ref:v,type:"file",accept:".csv",disabled:!i||s||!!g,onChange:e=>{if(u(null),h(null),p(null),b(null),w(!1),!e.target.files||0===e.target.files.length)return;const t=e.target.files[0];if(!t.name.toLowerCase().endsWith(".csv"))return u({success:!1,type:"FILE_ERROR",message:"Please upload a valid CSV file."}),e.target.value="",void o(null);o(t),(e=>{k$(void 0,void 0,void 0,(function*(){const t=(yield e.text()).split("\n").filter(Boolean);if(t.length<2)return void b(null);const n=t[0].split(",").map((e=>e.trim())),r=t.slice(1),i=n.filter((e=>e.startsWith("CRE")));let a=0;const o=new Set;r.forEach((e=>{const t=e.split(","),r={};n.forEach(((e,n)=>{r[e]=(t[n]||"").trim()}));const s=(r["standard|name"]||"").trim(),c=(r["standard|id"]||"").trim();(s||c)&&o.add(`${s}|${c}`),i.forEach((e=>{r[e]&&(a+=1)}))})),b({rows:r.length,creMappings:a,uniqueSections:o.size,creColumns:i})}))})(t)}})),e.createElement(sv,{primary:!0,loading:s,disabled:!i||!a||!m||s,onClick:()=>k$(void 0,void 0,void 0,(function*(){if(!a||!m)return;c(!0),u(null),h(null),p(null);const e=new FormData;e.append("cre_csv",a);try{const t=yield fetch(`${r}/cre_csv_import`,{method:"POST",body:e});if(403===t.status)throw new Error("CSV import is disabled on hosted environments. Run OpenCRE locally with CRE_ALLOW_IMPORT=true.");const n=yield t.json();if(!t.ok)return void u(n);"noop"===n.import_type?p("Import completed successfully, but no new CREs or standards were added because all mappings already exist."):"empty"===n.import_type?p("The uploaded CSV did not contain any importable rows. No changes were made."):h(n),w(!1),b(null),v.current&&(v.current.value="")}catch(e){u({success:!1,type:"CLIENT_ERROR",message:e.message||"Unexpected error during import"}),b(null),w(!1)}finally{c(!1)}}))},"Upload CSV"))))},M$=["Standard","Tool","Code"],I$=()=>{const{searchTerm:t}=ot(),{apiUrl:n}=tb(),[r,i]=(0,e.useState)(!1),[a,o]=(0,e.useState)([]),[s,c]=(0,e.useState)(null);(0,e.useEffect)((()=>{i(!0),cn().get(`${n}/text_search`,{params:{text:t}}).then((function(e){c(null),o(e.data)})).catch((function(e){404===e.response.status?c("No results match your search term"):c(e.response)})).finally((()=>{i(!1)}))}),[t]);const l=iw(a,(e=>e.doctype));Object.keys(l).forEach((e=>{l[e]=l[e].sort(((e,t)=>(e.name+e.section).localeCompare(t.name+t.section)))}));const u=l.CRE;let f;for(var h of M$)l[h]&&(f=f?f.concat(l[h]):l[h]);return e.createElement("div",{className:"cre-page"},e.createElement("h1",{className:"standard-page__heading"},"Results matching : ",e.createElement("i",null,t)),e.createElement(Qg,{loading:r,error:s}),!r&&!s&&e.createElement("div",{className:"ui grid"},e.createElement("div",{className:"eight wide column"},e.createElement("h1",{className:"standard-page__heading"},"Matching CREs"),u&&e.createElement(vv,{results:u})),e.createElement("div",{className:"eight wide column"},e.createElement("h1",{className:"standard-page__heading"},"Matching sources"),f&&e.createElement(vv,{results:f}))))},O$=()=>{const{id:t,section:n,sectionID:r,subsection:i}=ot(),{apiUrl:a}=tb(),[o,s]=(0,e.useState)(1),[c,l]=(0,e.useState)(!1),[u,f]=(0,e.useState)(null),[h,d]=(0,e.useState)();(0,e.useEffect)((()=>{window.scrollTo(0,0),l(!0),cn().get(`${a}/standard/${t}?page=${o}${n?`§ion=${encodeURIComponent(n)}`:""}${r?`§ionID=${encodeURIComponent(r)}`:""}${i?`&subsection=${encodeURIComponent(i)}`:""}`).then((function(e){f(null),d(e.data)})).catch((function(e){404===e.response.status?f("Standard does not exist in the DB, please check your search parameters"):f(e.response)})).finally((()=>{l(!1)}))}),[t,n,r,o,i]);const p=((null==h?void 0:h.standards)||[])[0],g=(0,e.useMemo)((()=>p?rw(p):{}),[p]);return null==p||p.version,e.createElement(e.Fragment,null,e.createElement("div",{className:"standard-page section-page"},e.createElement("h5",{className:"standard-page__heading"},nw(p)),p&&p.hyperlink&&e.createElement(e.Fragment,null,e.createElement("span",null,"Reference: "),e.createElement("a",{href:null==p?void 0:p.hyperlink,target:"_blank",rel:"noopener noreferrer"}," ",p.hyperlink)),e.createElement(Qg,{loading:c,error:u}),!c&&!u&&e.createElement("div",{className:"cre-page__links-container"},Object.keys(g).length>0?Object.entries(g).map((([t,n])=>e.createElement("div",{className:"cre-page__links",key:t},e.createElement("div",{className:"cre-page__links-header"},e.createElement("b",null,"Which ",sw(t,n[0].document.doctype,p.doctype)),":"),n.sort(((e,t)=>nw(e.document).localeCompare(nw(t.document)))).map(((n,r)=>e.createElement("div",{key:r,className:"accordion ui fluid styled cre-page__links-container"},e.createElement(pv,{node:n.document,linkType:t}))))))):e.createElement("b",null,'"This document has no links yet, please open a ticket at https://github.com/OWASP/common-requirement-enumeration with your suggested mapping"')),h&&h.total_pages>0&&e.createElement("div",{className:"pagination-container"},e.createElement(Fm,{defaultActivePage:1,onPageChange:(e,t)=>s(t.activePage),totalPages:h.total_pages}))))},N$=e=>[...e.myopencre?[{path:"/myopencre",component:C$,showFilter:!1}]:[],{path:"/",component:on,showFilter:!1},{path:"/map_analysis",component:S$,showFilter:!1},{path:`/node${At}/:id${kt}/:section${Mt}/:subsection`,component:O$,showFilter:!0},{path:`/node${At}/:id${Ct}/:sectionID${Mt}/:subsection`,component:O$,showFilter:!0},{path:`/node${At}/:id${kt}/:section`,component:O$,showFilter:!0},{path:`/node${At}/:id${Ct}/:sectionID`,component:O$,showFilter:!0},{path:"/node/:type/:id",component:gv,showFilter:!0},{path:`${Ot}/:id`,component:mv,showFilter:!0},{path:"/graph/:id",component:ib,showFilter:!1},{path:`${It}/:searchTerm`,component:I$,showFilter:!0},{path:"/chatbot",component:x_,showFilter:!1},{path:"/members_required",component:T$,showFilter:!1},{path:"/root_cres",component:yv,showFilter:!1},{path:`${Nt}/circles`,component:Jx(nI),showFilter:!1},{path:`${Nt}/force_graph`,component:Jx(m$),showFilter:!1},{path:`${Nt}`,component:Jx(Zx),showFilter:!1}],R$=({capabilities:t})=>{const n=N$(t);return e.createElement(nt,null,n.map((({path:t,component:n})=>{if(!n)return null;const r=n;return e.createElement(tt,{key:t,path:t,exact:"/"===t,render:()=>e.createElement(r,null)})})),e.createElement(tt,{component:D$}))},P$=()=>{const{capabilities:t,loading:n}=(()=>{const{apiUrl:t}=tb(),[n,r]=(0,e.useState)(null),[i,a]=(0,e.useState)(!0);return(0,e.useEffect)((()=>{const e=t.replace("/rest/v1","");fetch(`${e}/api/capabilities`).then((e=>e.json())).then(r).catch((()=>r({myopencre:!1}))).finally((()=>a(!1)))}),[t]),{capabilities:n,loading:i}})();return n||!t?null:e.createElement(e.Fragment,null,e.createElement($$,{capabilities:t}),e.createElement(R$,{capabilities:t}))};var L$=n(8035);i()(L$.A,{insert:"head",singleton:!1}),L$.A.locals;const D$=()=>e.createElement(My,{className:"no-route__container"},e.createElement(ky,{icon:!0},e.createElement(Bg,{name:"search"}),"That page does not exist"));var F$=n(5963);i()(F$.A,{insert:"head",singleton:!1}),F$.A.locals;const U$=Gt("menu",[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]]);var j$=n(3101);i()(j$.A,{insert:"head",singleton:!1}),j$.A.locals;const B$={term:"",error:""},z$=()=>{const[t,n]=(0,e.useState)(B$),r=it(),i="navbar-search-input",a="navbar-search-error";return e.createElement("div",{className:"navbar__search"},e.createElement("form",{onSubmit:e=>{e.preventDefault();const{term:i}=t;i.trim()?(n(B$),r.push(`${It}/${i}`)):n(Object.assign(Object.assign({},t),{error:"Search term cannot be blank"}))}},e.createElement("label",{htmlFor:i,className:"visually-hidden"},"Search OpenCRE"),e.createElement(Wt,{className:"search-icon","aria-hidden":"true"}),e.createElement("input",{id:i,type:"text",placeholder:"Search...",value:t.term,"aria-label":"Search OpenCRE","aria-invalid":Boolean(t.error),"aria-describedby":t.error?a:void 0,onChange:e=>n(Object.assign(Object.assign({},t),{term:e.target.value}))})),t.error&&e.createElement("p",{id:a,className:"search-error",role:"alert"},t.error))},$$=({capabilities:t})=>{const n=N$(t);let r=new URLSearchParams(window.location.search);const i=it(),a=()=>{r.set("applyFilters","true"),i.push(window.location.pathname+"?"+r.toString())},{showFilter:o}=(e=>{const{pathname:t}=at(),n=e.map((({path:e,showFilter:n})=>Object.assign(Object.assign({},et(t,{path:e,exact:!0,strict:!1})),{showFilter:n}))).find((e=>null==e?void 0:e.isExact));return{params:(null==n?void 0:n.params)||{},url:(null==n?void 0:n.url)||"",showFilter:(null==n?void 0:n.showFilter)||!1}})(n),[s,c]=(0,e.useState)(!1);(0,e.useEffect)((()=>{const e=window.matchMedia("(min-width: 768px)"),t=e=>{e.matches&&c(!1)};return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}}),[]);const l=()=>{c(!1)};return e.createElement(e.Fragment,null,e.createElement("nav",{className:"navbar"},e.createElement("div",{className:"navbar__container"},e.createElement("div",{className:"navbar__content"},e.createElement(dt,{to:"/",className:"navbar__logo"},e.createElement("img",{src:"/logo.svg",alt:"Logo"})),e.createElement("div",{className:"navbar__desktop-links"},e.createElement(bt,{to:"/",exact:!0,className:"nav-link",activeClassName:"nav-link--active"},"Home"),e.createElement(bt,{to:"/root_cres",className:"nav-link",activeClassName:"nav-link--active"},"Browse"),e.createElement(bt,{to:"/chatbot",className:"nav-link",activeClassName:"nav-link--active"},"Chat"),e.createElement(bt,{to:"/map_analysis",className:"nav-link",activeClassName:"nav-link--active"},"Map Analysis"),e.createElement(bt,{to:"/explorer",className:"nav-link",activeClassName:"nav-link--active"},"Explorer"),t.myopencre&&e.createElement(bt,{to:"/myopencre",className:"nav-link",activeClassName:"nav-link--active"},"MyOpenCRE")),e.createElement("div",null,e.createElement(z$,null),o&&r.has("showButtons")?e.createElement("div",{className:"foo"},e.createElement(sv,{onClick:()=>{a()},content:"Apply Filters"}),e.createElement(cv,null)):""),e.createElement("div",{className:"navbar__actions"},e.createElement("button",{className:"navbar__mobile-menu-toggle",onClick:()=>c(!0)},e.createElement(U$,{className:"icon"}),e.createElement("span",{className:"sr-only"},"Toggle menu")))))),e.createElement("div",{className:"navbar__overlay "+(s?"is-open":""),onClick:l}),e.createElement("div",{className:"navbar__mobile-menu "+(s?"is-open":"")},e.createElement("div",{className:"mobile-search-container"},e.createElement(z$,null)),o&&r.has("showButtons")?e.createElement("div",{className:"foo"},e.createElement(sv,{onClick:()=>{a()},content:"Apply Filters"}),e.createElement(cv,null)):"",e.createElement("div",{className:"mobile-nav-links"},e.createElement(bt,{to:"/",exact:!0,className:"nav-link",activeClassName:"nav-link--active",onClick:l},"Home"),e.createElement(bt,{to:"/root_cres",className:"nav-link",activeClassName:"nav-link--active",onClick:l},"Browse"),e.createElement(bt,{to:"/chatbot",className:"nav-link",activeClassName:"nav-link--active",onClick:l},"Chat"),e.createElement(bt,{to:"/map_analysis",className:"nav-link",activeClassName:"nav-link--active",onClick:l},"Map Analysis"),e.createElement(bt,{to:"/explorer",className:"nav-link",activeClassName:"nav-link--active",onClick:l},"Explorer"),t.myopencre&&e.createElement(bt,{to:"/myopencre",className:"nav-link",activeClassName:"nav-link--active",onClick:l},"MyOpenCRE")),e.createElement("div",{className:"mobile-auth"})))},H$=new me.QueryClient,G$=()=>e.createElement("div",{className:"app"},e.createElement(Dt.Provider,{value:Lt},e.createElement(me.QueryClientProvider,{client:H$},e.createElement(st,null,e.createElement(be,null),e.createElement(P$,null)))));document.addEventListener("DOMContentLoaded",(()=>{t.render(e.createElement(G$,null),document.getElementById("mount"))}))})()})(); \ No newline at end of file +(()=>{var e={23:e=>{"use strict";function t(e){e.languages.mizar={comment:/::.+/,keyword:/@proof\b|\b(?:according|aggregate|all|and|antonym|are|as|associativity|assume|asymmetry|attr|be|begin|being|by|canceled|case|cases|clusters?|coherence|commutativity|compatibility|connectedness|consider|consistency|constructors|contradiction|correctness|def|deffunc|define|definitions?|defpred|do|does|end|environ|equals|ex|exactly|existence|for|from|func|given|hence|hereby|holds|idempotence|identity|iff?|implies|involutiveness|irreflexivity|is|it|let|means|mode|non|not|notations?|now|of|or|otherwise|over|per|pred|prefix|projectivity|proof|provided|qua|reconsider|redefine|reduce|reducibility|reflexivity|registrations?|requirements|reserve|sch|schemes?|section|selector|set|sethood|st|struct|such|suppose|symmetry|synonym|take|that|the|then|theorems?|thesis|thus|to|transitivity|uniqueness|vocabular(?:ies|y)|when|where|with|wrt)\b/,parameter:{pattern:/\$(?:10|\d)/,alias:"variable"},variable:/\b\w+(?=:)/,number:/(?:\b|-)\d+\b/,operator:/\.\.\.|->|&|\.?=/,punctuation:/\(#|#\)|[,:;\[\](){}]/}}e.exports=t,t.displayName="mizar",t.aliases=[]},33:e=>{"use strict";function t(e){!function(e){for(var t=/\(\*(?:[^(*]|\((?!\*)|\*(?!\))|)*\*\)/.source,n=0;n<2;n++)t=t.replace(//g,function(){return t});t=t.replace(//g,"[]"),e.languages.coq={comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},attribute:[{pattern:RegExp(/#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|)*\]/.source.replace(//g,function(){return t})),greedy:!0,alias:"attr-name",inside:{comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},operator:/=/,punctuation:/^#\[|\]$|[,()]/}},{pattern:/\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,alias:"attr-name"}],keyword:/\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,number:/\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,punct:{pattern:/@\{|\{\||\[=|:>/,alias:"punctuation"},operator:/\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,punctuation:/\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/}}(e)}e.exports=t,t.displayName="coq",t.aliases=[]},41:(e,t)=>{"use strict";var n,r,i,a;if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,c=s.now();t.unstable_now=function(){return s.now()-c}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var l=null,u=null,f=function(){if(null!==l)try{var e=t.unstable_now();l(!0,e),l=null}catch(e){throw setTimeout(f,0),e}};n=function(e){null!==l?setTimeout(n,0,e):(l=e,setTimeout(f,0))},r=function(e,t){u=setTimeout(e,t)},i=function(){clearTimeout(u)},t.unstable_shouldYield=function(){return!1},a=t.unstable_forceFrameRate=function(){}}else{var h=window.setTimeout,d=window.clearTimeout;if("undefined"!=typeof console){var p=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof p&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var g=!1,b=null,m=-1,w=5,v=0;t.unstable_shouldYield=function(){return t.unstable_now()>=v},a=function(){},t.unstable_forceFrameRate=function(e){0>e||125>>1,i=e[r];if(!(void 0!==i&&0T(o,n))void 0!==c&&0>T(c,o)?(e[r]=c,e[s]=n,r=s):(e[r]=o,e[a]=n,r=a);else{if(!(void 0!==c&&0>T(c,n)))break e;e[r]=c,e[s]=n,r=s}}}return t}return null}function T(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var A=[],k=[],C=1,M=null,I=3,O=!1,N=!1,R=!1;function P(e){for(var t=S(k);null!==t;){if(null===t.callback)x(k);else{if(!(t.startTime<=e))break;x(k),t.sortIndex=t.expirationTime,_(A,t)}t=S(k)}}function L(e){if(R=!1,P(e),!N)if(null!==S(A))N=!0,n(D);else{var t=S(k);null!==t&&r(L,t.startTime-e)}}function D(e,n){N=!1,R&&(R=!1,i()),O=!0;var a=I;try{for(P(n),M=S(A);null!==M&&(!(M.expirationTime>n)||e&&!t.unstable_shouldYield());){var o=M.callback;if("function"==typeof o){M.callback=null,I=M.priorityLevel;var s=o(M.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?M.callback=s:M===S(A)&&x(A),P(n)}else x(A);M=S(A)}if(null!==M)var c=!0;else{var l=S(k);null!==l&&r(L,l.startTime-n),c=!1}return c}finally{M=null,I=a,O=!1}}var F=a;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){N||O||(N=!0,n(D))},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_getFirstCallbackNode=function(){return S(A)},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=F,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_scheduleCallback=function(e,a,o){var s=t.unstable_now();switch(o="object"==typeof o&&null!==o&&"number"==typeof(o=o.delay)&&0s?(e.sortIndex=o,_(k,e),null===S(A)&&e===S(k)&&(R?i():R=!0,r(L,o-s))):(e.sortIndex=c,_(A,e),N||O||(N=!0,n(D))),e},t.unstable_wrapCallback=function(e){var t=I;return function(){var n=I;I=t;try{return e.apply(this,arguments)}finally{I=n}}}},56:e=>{"use strict";function t(e){!function(e){var t={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},r={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:n,punctuation:/[{}()\[\];:,]/};r.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:r}},r.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:r}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:r}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:r}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:r}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:r.interpolation}},rest:r}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:r.interpolation,comment:r.comment,punctuation:/[{},]/}},func:r.func,string:r.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:r.interpolation,punctuation:/[{}()\[\];:.]/}}(e)}e.exports=t,t.displayName="stylus",t.aliases=[]},58:e=>{"use strict";function t(e){!function(e){var t=/(?:\r?\n|\r)[ \t]*\|.+\|(?:(?!\|).)*/.source;e.languages.gherkin={pystring:{pattern:/("""|''')[\s\S]+?\1/,alias:"string"},comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},tag:{pattern:/(^[ \t]*)@\S*/m,lookbehind:!0},feature:{pattern:/((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Característica|Egenskab|Egenskap|Eiginleiki|Feature|Fīča|Fitur|Fonctionnalité|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Funcţionalitate|Funcționalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalitāte|Funkcionalnost|Funkcja|Funksie|Funktionalität|Funktionalitéit|Funzionalità|Hwaet|Hwæt|Jellemző|Karakteristik|Lastnost|Mak|Mogucnost|laH|Mogućnost|Moznosti|Možnosti|OH HAI|Omadus|Ominaisuus|Osobina|Özellik|Potrzeba biznesowa|perbogh|poQbogh malja'|Požadavek|Požiadavka|Pretty much|Qap|Qu'meH 'ut|Savybė|Tính năng|Trajto|Vermoë|Vlastnosť|Właściwość|Značilnost|Δυνατότητα|Λειτουργία|Могућност|Мөмкинлек|Особина|Свойство|Үзенчәлеклелек|Функционал|Функционалност|Функция|Функціонал|תכונה|خاصية|خصوصیت|صلاحیت|کاروبار کی ضرورت|وِیژگی|रूप लेख|ਖਾਸੀਅਤ|ਨਕਸ਼ ਨੁਹਾਰ|ਮੁਹਾਂਦਰਾ|గుణము|ಹೆಚ್ಚಳ|ความต้องการทางธุรกิจ|ความสามารถ|โครงหลัก|기능|フィーチャ|功能|機能):(?:[^:\r\n]+(?:\r?\n|\r|$))*/,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]+/,lookbehind:!0},keyword:/[^:\r\n]+:/}},scenario:{pattern:/(^[ \t]*)(?:Abstract Scenario|Abstrakt Scenario|Achtergrond|Aer|Ær|Agtergrond|All y'all|Antecedentes|Antecedents|Atburðarás|Atburðarásir|Awww, look mate|B4|Background|Baggrund|Bakgrund|Bakgrunn|Bakgrunnur|Beispiele|Beispiller|Bối cảnh|Cefndir|Cenario|Cenário|Cenario de Fundo|Cenário de Fundo|Cenarios|Cenários|Contesto|Context|Contexte|Contexto|Conto|Contoh|Contone|Dæmi|Dasar|Dead men tell no tales|Delineacao do Cenario|Delineação do Cenário|Dis is what went down|Dữ liệu|Dyagram Senaryo|Dyagram senaryo|Egzanp|Ejemplos|Eksempler|Ekzemploj|Enghreifftiau|Esbozo do escenario|Escenari|Escenario|Esempi|Esquema de l'escenari|Esquema del escenario|Esquema do Cenario|Esquema do Cenário|EXAMPLZ|Examples|Exempel|Exemple|Exemples|Exemplos|First off|Fono|Forgatókönyv|Forgatókönyv vázlat|Fundo|Geçmiş|Grundlage|Hannergrond|ghantoH|Háttér|Heave to|Istorik|Juhtumid|Keadaan|Khung kịch bản|Khung tình huống|Kịch bản|Koncept|Konsep skenario|Kontèks|Kontekst|Kontekstas|Konteksts|Kontext|Konturo de la scenaro|Latar Belakang|lut chovnatlh|lut|lutmey|Lýsing Atburðarásar|Lýsing Dæma|MISHUN SRSLY|MISHUN|Menggariskan Senario|mo'|Náčrt Scenára|Náčrt Scénáře|Náčrt Scenáru|Oris scenarija|Örnekler|Osnova|Osnova Scenára|Osnova scénáře|Osnutek|Ozadje|Paraugs|Pavyzdžiai|Példák|Piemēri|Plan du scénario|Plan du Scénario|Plan Senaryo|Plan senaryo|Plang vum Szenario|Pozadí|Pozadie|Pozadina|Príklady|Příklady|Primer|Primeri|Primjeri|Przykłady|Raamstsenaarium|Reckon it's like|Rerefons|Scenár|Scénář|Scenarie|Scenarij|Scenarijai|Scenarijaus šablonas|Scenariji|Scenārijs|Scenārijs pēc parauga|Scenarijus|Scenario|Scénario|Scenario Amlinellol|Scenario Outline|Scenario Template|Scenariomal|Scenariomall|Scenarios|Scenariu|Scenariusz|Scenaro|Schema dello scenario|Se ðe|Se the|Se þe|Senario|Senaryo Deskripsyon|Senaryo deskripsyon|Senaryo|Senaryo taslağı|Shiver me timbers|Situācija|Situai|Situasie Uiteensetting|Situasie|Skenario konsep|Skenario|Skica|Structura scenariu|Structură scenariu|Struktura scenarija|Stsenaarium|Swa hwaer swa|Swa|Swa hwær swa|Szablon scenariusza|Szenario|Szenariogrundriss|Tapaukset|Tapaus|Tapausaihio|Taust|Tausta|Template Keadaan|Template Senario|Template Situai|The thing of it is|Tình huống|Variantai|Voorbeelde|Voorbeelden|Wharrimean is|Yo-ho-ho|You'll wanna|Założenia|Παραδείγματα|Περιγραφή Σεναρίου|Σενάρια|Σενάριο|Υπόβαθρο|Кереш|Контекст|Концепт|Мисаллар|Мисоллар|Основа|Передумова|Позадина|Предистория|Предыстория|Приклади|Пример|Примери|Примеры|Рамка на сценарий|Скица|Структура сценарија|Структура сценария|Структура сценарію|Сценарий|Сценарий структураси|Сценарийның төзелеше|Сценарији|Сценарио|Сценарій|Тарих|Үрнәкләр|דוגמאות|רקע|תבנית תרחיש|תרחיש|الخلفية|الگوی سناریو|امثلة|پس منظر|زمینه|سناریو|سيناريو|سيناريو مخطط|مثالیں|منظر نامے کا خاکہ|منظرنامہ|نمونه ها|उदाहरण|परिदृश्य|परिदृश्य रूपरेखा|पृष्ठभूमि|ਉਦਾਹਰਨਾਂ|ਪਟਕਥਾ|ਪਟਕਥਾ ਢਾਂਚਾ|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਿਛੋਕੜ|ఉదాహరణలు|కథనం|నేపథ్యం|సన్నివేశం|ಉದಾಹರಣೆಗಳು|ಕಥಾಸಾರಾಂಶ|ವಿವರಣೆ|ಹಿನ್ನೆಲೆ|โครงสร้างของเหตุการณ์|ชุดของตัวอย่าง|ชุดของเหตุการณ์|แนวคิด|สรุปเหตุการณ์|เหตุการณ์|배경|시나리오|시나리오 개요|예|サンプル|シナリオ|シナリオアウトライン|シナリオテンプレ|シナリオテンプレート|テンプレ|例|例子|剧本|剧本大纲|劇本|劇本大綱|场景|场景大纲|場景|場景大綱|背景):[^:\r\n]*/m,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]*/,lookbehind:!0},keyword:/[^:\r\n]+:/}},"table-body":{pattern:RegExp("("+t+")(?:"+t+")+"),lookbehind:!0,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"},td:{pattern:/\s*[^\s|][^|]*/,alias:"string"},punctuation:/\|/}},"table-head":{pattern:RegExp(t),inside:{th:{pattern:/\s*[^\s|][^|]*/,alias:"variable"},punctuation:/\|/}},atrule:{pattern:/(^[ \t]+)(?:'a|'ach|'ej|7|a|A také|A taktiež|A tiež|A zároveň|Aber|Ac|Adott|Akkor|Ak|Aleshores|Ale|Ali|Allora|Alors|Als|Ama|Amennyiben|Amikor|Ampak|an|AN|Ananging|And y'all|And|Angenommen|Anrhegedig a|An|Apabila|Atès|Atesa|Atunci|Avast!|Aye|A|awer|Bagi|Banjur|Bet|Biết|Blimey!|Buh|But at the end of the day I reckon|But y'all|But|BUT|Cal|Când|Cand|Cando|Ce|Cuando|Če|Ða ðe|Ða|Dadas|Dada|Dados|Dado|DaH ghu' bejlu'|dann|Dann|Dano|Dan|Dar|Dat fiind|Data|Date fiind|Date|Dati fiind|Dati|Daţi fiind|Dați fiind|DEN|Dato|De|Den youse gotta|Dengan|Diberi|Diyelim ki|Donada|Donat|Donitaĵo|Do|Dun|Duota|Ðurh|Eeldades|Ef|Eğer ki|Entao|Então|Entón|E|En|Entonces|Epi|És|Etant donnée|Etant donné|Et|Étant données|Étant donnée|Étant donné|Etant données|Etant donnés|Étant donnés|Fakat|Gangway!|Gdy|Gegeben seien|Gegeben sei|Gegeven|Gegewe|ghu' noblu'|Gitt|Given y'all|Given|Givet|Givun|Ha|Cho|I CAN HAZ|In|Ir|It's just unbelievable|I|Ja|Jeśli|Jeżeli|Kad|Kada|Kadar|Kai|Kaj|Když|Keď|Kemudian|Ketika|Khi|Kiedy|Ko|Kuid|Kui|Kun|Lan|latlh|Le sa a|Let go and haul|Le|Lè sa a|Lè|Logo|Lorsqu'<|Lorsque|mä|Maar|Mais|Mając|Ma|Majd|Maka|Manawa|Mas|Men|Menawa|Mutta|Nalika|Nalikaning|Nanging|Når|När|Nato|Nhưng|Niin|Njuk|O zaman|Och|Og|Oletetaan|Ond|Onda|Oraz|Pak|Pero|Però|Podano|Pokiaľ|Pokud|Potem|Potom|Privzeto|Pryd|Quan|Quand|Quando|qaSDI'|Så|Sed|Se|Siis|Sipoze ke|Sipoze Ke|Sipoze|Si|Şi|Și|Soit|Stel|Tada|Tad|Takrat|Tak|Tapi|Ter|Tetapi|Tha the|Tha|Then y'all|Then|Thì|Thurh|Toda|Too right|Un|Und|ugeholl|Và|vaj|Vendar|Ve|wann|Wanneer|WEN|Wenn|When y'all|When|Wtedy|Wun|Y'know|Yeah nah|Yna|Youse know like when|Youse know when youse got|Y|Za predpokladu|Za předpokladu|Zadan|Zadani|Zadano|Zadate|Zadato|Zakładając|Zaradi|Zatati|Þa þe|Þa|Þá|Þegar|Þurh|Αλλά|Δεδομένου|Και|Όταν|Τότε|А також|Агар|Але|Али|Аммо|А|Әгәр|Әйтик|Әмма|Бирок|Ва|Вә|Дадено|Дано|Допустим|Если|Задате|Задати|Задато|И|І|К тому же|Када|Кад|Когато|Когда|Коли|Ләкин|Лекин|Нәтиҗәдә|Нехай|Но|Онда|Припустимо, що|Припустимо|Пусть|Также|Та|Тогда|Тоді|То|Унда|Һәм|Якщо|אבל|אזי|אז|בהינתן|וגם|כאשר|آنگاه|اذاً|اگر|اما|اور|با فرض|بالفرض|بفرض|پھر|تب|ثم|جب|عندما|فرض کیا|لكن|لیکن|متى|هنگامی|و|अगर|और|कदा|किन्तु|चूंकि|जब|तथा|तदा|तब|परन्तु|पर|यदि|ਅਤੇ|ਜਦੋਂ|ਜਿਵੇਂ ਕਿ|ਜੇਕਰ|ਤਦ|ਪਰ|అప్పుడు|ఈ పరిస్థితిలో|కాని|చెప్పబడినది|మరియు|ಆದರೆ|ನಂತರ|ನೀಡಿದ|ಮತ್ತು|ಸ್ಥಿತಿಯನ್ನು|กำหนดให้|ดังนั้น|แต่|เมื่อ|และ|그러면<|그리고<|단<|만약<|만일<|먼저<|조건<|하지만<|かつ<|しかし<|ただし<|ならば<|もし<|並且<|但し<|但是<|假如<|假定<|假設<|假设<|前提<|同时<|同時<|并且<|当<|當<|而且<|那么<|那麼<)(?=[ \t])/m,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"}}},outline:{pattern:/<[^>]+>/,alias:"variable"}}}(e)}e.exports=t,t.displayName="gherkin",t.aliases=[]},60:e=>{"use strict";function t(e){e.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i,greedy:!0},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],directive:{pattern:/#(?:Else|ElseIf|Endif|If|Pragma)\b/i,alias:"property"},keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|Auto|Boolean|Break|By(?:Ref|Val)|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:8|16|32|64|eger|erface)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Shared|Short|Single|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:8|16|32|64|eger)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|WeakAddressOf|Xor)\b/i,punctuation:/[.,;:()]/}}e.exports=t,t.displayName="xojo",t.aliases=[]},61:e=>{"use strict";function t(e){e.languages["splunk-spl"]={comment:/`comment\("(?:\\.|[^\\"])*"\)`/,string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0},keyword:/\b(?:abstract|accum|addcoltotals|addinfo|addtotals|analyzefields|anomalies|anomalousvalue|anomalydetection|append|appendcols|appendcsv|appendlookup|appendpipe|arules|associate|audit|autoregress|bin|bucket|bucketdir|chart|cluster|cofilter|collect|concurrency|contingency|convert|correlate|datamodel|dbinspect|dedup|delete|delta|diff|erex|eval|eventcount|eventstats|extract|fieldformat|fields|fieldsummary|filldown|fillnull|findtypes|folderize|foreach|format|from|gauge|gentimes|geom|geomfilter|geostats|head|highlight|history|iconify|input|inputcsv|inputlookup|iplocation|join|kmeans|kv|kvform|loadjob|localize|localop|lookup|makecontinuous|makemv|makeresults|map|mcollect|metadata|metasearch|meventcollect|mstats|multikv|multisearch|mvcombine|mvexpand|nomv|outlier|outputcsv|outputlookup|outputtext|overlap|pivot|predict|rangemap|rare|regex|relevancy|reltime|rename|replace|rest|return|reverse|rex|rtorder|run|savedsearch|script|scrub|search|searchtxn|selfjoin|sendemail|set|setfields|sichart|sirare|sistats|sitimechart|sitop|sort|spath|stats|strcat|streamstats|table|tags|tail|timechart|timewrap|top|transaction|transpose|trendline|tscollect|tstats|typeahead|typelearner|typer|union|uniq|untable|where|x11|xmlkv|xmlunescape|xpath|xyseries)\b/i,"operator-word":{pattern:/\b(?:and|as|by|not|or|xor)\b/i,alias:"operator"},function:/\b\w+(?=\s*\()/,property:/\b\w+(?=\s*=(?!=))/,date:{pattern:/\b\d{1,2}\/\d{1,2}\/\d{1,4}(?:(?::\d{1,2}){3})?\b/,alias:"number"},number:/\b\d+(?:\.\d+)?\b/,boolean:/\b(?:f|false|t|true)\b/i,operator:/[<>=]=?|[-+*/%|]/,punctuation:/[()[\],]/}}e.exports=t,t.displayName="splunkSpl",t.aliases=[]},70:(e,t,n)=>{"use strict";var r=n(8433);function i(e){e.register(r),e.languages.objectivec=e.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}e.exports=i,i.displayName="objectivec",i.aliases=["objc"]},73:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()(function(e){return e[1]});i.push([e.id,"main#gap-analysis{padding:30px;margin:var(--header-height) 0}main#gap-analysis span.name{padding:0 10px}@media(min-width: 0px)and (max-width: 500px){main#gap-analysis span.name{width:85px;display:inline-block}}@media(max-width: 768px){main#gap-analysis{padding:1rem}}",""]);const a=i},81:(e,t,n)=>{const r=n(3103);function i(e,t){return`\n${o(e,t)}\n${a(e)}\nreturn {Body: Body, Vector: Vector};\n`}function a(e){let t=r(e),n=t("{var}",{join:", "});return`\nfunction Body(${n}) {\n this.isPinned = false;\n this.pos = new Vector(${n});\n this.force = new Vector();\n this.velocity = new Vector();\n this.mass = 1;\n\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.reset = function() {\n this.force.reset();\n this.springCount = 0;\n this.springLength = 0;\n}\n\nBody.prototype.setPosition = function (${n}) {\n ${t("this.pos.{var} = {var} || 0;",{indent:2})}\n};`}function o(e,t){let n=r(e),i="";return t&&(i=`${n("\n var v{var};\nObject.defineProperty(this, '{var}', {\n set: function(v) { \n if (!Number.isFinite(v)) throw new Error('Cannot set non-numbers to {var}');\n v{var} = v; \n },\n get: function() { return v{var}; }\n});")}`),`function Vector(${n("{var}",{join:", "})}) {\n ${i}\n if (typeof arguments[0] === 'object') {\n // could be another vector\n let v = arguments[0];\n ${n('if (!Number.isFinite(v.{var})) throw new Error("Expected value is not a finite number at Vector constructor ({var})");',{indent:4})}\n ${n("this.{var} = v.{var};",{indent:4})}\n } else {\n ${n('this.{var} = typeof {var} === "number" ? {var} : 0;',{indent:4})}\n }\n }\n \n Vector.prototype.reset = function () {\n ${n("this.{var} = ",{join:""})}0;\n };`}e.exports=function(e,t){let n=i(e,t),{Body:r}=new Function(n)();return r},e.exports.generateCreateBodyFunctionBody=i,e.exports.getVectorCode=o,e.exports.getBodyCode=a},94:(e,t,n)=>{"use strict";var r=n(618);function i(e){e.register(r),function(e){e.languages.crystal=e.languages.extend("ruby",{keyword:[/\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|annotation|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|ptr|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|undef|uninitialized|union|unless|until|when|while|with|yield)\b/,{pattern:/(\.\s*)(?:is_a|responds_to)\?/,lookbehind:!0}],number:/\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,operator:[/->/,e.languages.ruby.operator],punctuation:/[(){}[\].,;\\]/}),e.languages.insertBefore("crystal","string-literal",{attribute:{pattern:/@\[.*?\]/,inside:{delimiter:{pattern:/^@\[|\]$/,alias:"punctuation"},attribute:{pattern:/^(\s*)\w+/,lookbehind:!0,alias:"class-name"},args:{pattern:/\S(?:[\s\S]*\S)?/,inside:e.languages.crystal}}},expansion:{pattern:/\{(?:\{.*?\}|%.*?%)\}/,inside:{content:{pattern:/^(\{.)[\s\S]+(?=.\}$)/,lookbehind:!0,inside:e.languages.crystal},delimiter:{pattern:/^\{[\{%]|[\}%]\}$/,alias:"operator"}}},char:{pattern:/'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,greedy:!0}})}(e)}e.exports=i,i.displayName="crystal",i.aliases=[]},98:(e,t,n)=>{"use strict";var r=n(2046),i=["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"];e.exports=function(e){var t,n,a,o={};return e?(r.forEach(e.split("\n"),function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(o[t]&&i.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}}),o):o}},153:e=>{"use strict";function t(e){!function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(n){var r=t[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),"diff"===n&&i.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(e)}e.exports=t,t.displayName="diff",t.aliases=[]},164:(e,t,n)=>{"use strict";var r=n(5880);function i(e){e.register(r),e.languages.plsql=e.languages.extend("sql",{comment:{pattern:/\/\*[\s\S]*?\*\/|--.*/,greedy:!0},keyword:/\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,operator:/:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/}),e.languages.insertBefore("plsql","operator",{label:{pattern:/<<\s*\w+\s*>>/,alias:"symbol"}})}e.exports=i,i.displayName="plsql",i.aliases=[]},187:e=>{"use strict";function t(e){e.languages.jolie=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\[\s\S]|[^"\\])*"/,lookbehind:!0,greedy:!0},"class-name":{pattern:/((?:\b(?:as|courier|embed|in|inputPort|outputPort|service)\b|@)[ \t]*)\w+/,lookbehind:!0},keyword:/\b(?:as|cH|comp|concurrent|constants|courier|cset|csets|default|define|else|embed|embedded|execution|exit|extender|for|foreach|forward|from|global|if|import|in|include|init|inputPort|install|instanceof|interface|is_defined|linkIn|linkOut|main|new|nullProcess|outputPort|over|private|provide|public|scope|sequential|service|single|spawn|synchronized|this|throw|throws|type|undef|until|while|with)\b/,function:/\b[a-z_]\w*(?=[ \t]*[@(])/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?l?/i,operator:/-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[?\/%^@|]/,punctuation:/[()[\]{},;.:]/,builtin:/\b(?:Byte|any|bool|char|double|enum|float|int|length|long|ranges|regex|string|undefined|void)\b/}),e.languages.insertBefore("jolie","keyword",{aggregates:{pattern:/(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,lookbehind:!0,inside:{keyword:/\bwith\b/,"class-name":/\w+/,punctuation:/,/}},redirects:{pattern:/(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,lookbehind:!0,inside:{punctuation:/,/,"class-name":/\w+/,operator:/=>/}},property:{pattern:/\b(?:Aggregates|[Ii]nterfaces|Java|Javascript|Jolie|[Ll]ocation|OneWay|[Pp]rotocol|Redirects|RequestResponse)\b(?=[ \t]*:)/}})}e.exports=t,t.displayName="jolie",t.aliases=[]},261:(e,t,n)=>{"use strict";e.exports=n(4505)},267:(e,t,n)=>{"use strict";var r=n(4696);function i(e){e.register(r),e.languages.sparql=e.languages.extend("turtle",{boolean:/\b(?:false|true)\b/i,variable:{pattern:/[?$]\w+/,greedy:!0}}),e.languages.insertBefore("sparql","punctuation",{keyword:[/\b(?:A|ADD|ALL|AS|ASC|ASK|BNODE|BY|CLEAR|CONSTRUCT|COPY|CREATE|DATA|DEFAULT|DELETE|DESC|DESCRIBE|DISTINCT|DROP|EXISTS|FILTER|FROM|GROUP|HAVING|INSERT|INTO|LIMIT|LOAD|MINUS|MOVE|NAMED|NOT|NOW|OFFSET|OPTIONAL|ORDER|RAND|REDUCED|SELECT|SEPARATOR|SERVICE|SILENT|STRUUID|UNION|USING|UUID|VALUES|WHERE)\b/i,/\b(?:ABS|AVG|BIND|BOUND|CEIL|COALESCE|CONCAT|CONTAINS|COUNT|DATATYPE|DAY|ENCODE_FOR_URI|FLOOR|GROUP_CONCAT|HOURS|IF|IRI|isBLANK|isIRI|isLITERAL|isNUMERIC|isURI|LANG|LANGMATCHES|LCASE|MAX|MD5|MIN|MINUTES|MONTH|REGEX|REPLACE|ROUND|sameTerm|SAMPLE|SECONDS|SHA1|SHA256|SHA384|SHA512|STR|STRAFTER|STRBEFORE|STRDT|STRENDS|STRLANG|STRLEN|STRSTARTS|SUBSTR|SUM|TIMEZONE|TZ|UCASE|URI|YEAR)\b(?=\s*\()/i,/\b(?:BASE|GRAPH|PREFIX)\b/i]}),e.languages.rq=e.languages.sparql}e.exports=i,i.displayName="sparql",i.aliases=["rq"]},276:(e,t,n)=>{"use strict";var r=n(2046),i=n(7595),a=n(8854),o=n(3725);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||o.adapter)(e).then(function(t){return s(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(s(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},309:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()(function(e){return e[1]});i.push([e.id,"main#explorer-content{padding:30px;margin:var(--header-height) 0;color:#f7fafc;border-radius:8px;box-shadow:0 2px 4px rgba(0,0,0,.1)}main#explorer-content h1,main#explorer-content h2,main#explorer-content h3,main#explorer-content h4,main#explorer-content h5,main#explorer-content h6,main#explorer-content p,main#explorer-content label,main#explorer-content .menu-title{color:#1a202c}main#explorer-content a{color:#0056b3}main#explorer-content .search-field input{font-size:16px;height:32px;width:320px;margin-bottom:10px;border-radius:3px;border:1px solid #858585;padding:0 5px;color:#333;background-color:#fff}main#explorer-content #graphs-menu{display:flex;margin-bottom:20px}main#explorer-content #graphs-menu .menu-title{margin:0 10px 0 0}main#explorer-content #graphs-menu ul{list-style:none;padding:0;margin:0;display:flex;font-size:15px}main#explorer-content #graphs-menu li{padding:0 8px}main#explorer-content #graphs-menu li+li{border-left:1px solid #b1b0b0}main#explorer-content #graphs-menu li:first-child{padding-left:0}main#explorer-content .list{padding:0;width:100%}main#explorer-content .arrow .icon{transform:rotate(-90deg)}main#explorer-content .arrow.active .icon{transform:rotate(0)}main#explorer-content .arrow:hover{cursor:pointer}main#explorer-content .item{border-top:1px dotted #d3d3d3;border-left:6px solid #d3d3d3;margin:4px 4px 4px 40px;background-color:rgba(200,200,200,.2);vertical-align:middle}main#explorer-content .item .content{display:flex;flex-wrap:wrap}main#explorer-content .item .header{margin-left:5px;overflow:hidden;white-space:nowrap;display:flex;align-items:center;vertical-align:middle}main#explorer-content .item .header>a{font-size:120%;line-height:30px;font-weight:bold;max-width:100%;white-space:normal}main#explorer-content .item .header .cre-code{margin-right:4px;color:gray}main#explorer-content .item .description{margin-left:20px}main#explorer-content .highlight{background-color:#ff0;color:#000}main#explorer-content>.list>.item{margin-left:0}@media(min-width: 0px)and (max-width: 770px){#graphs-menu{flex-direction:column}}#debug-toggle{margin-top:10px;margin-bottom:4px}@media(max-width: 768px){main#explorer-content{padding:1rem}main#explorer-content .search-field input{width:100%}main#explorer-content .item{margin:4px 4px 4px 1rem}}",""]);const a=i},310:e=>{"use strict";function t(e){e.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},identifier:{pattern:/([´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[{pattern:/(\bWITH\s+)COUNT(?=\s+INTO\b)/i,lookbehind:!0},/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_PATHS|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WINDOW|WITH)\b/i,{pattern:/(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,lookbehind:!0},{pattern:/\bOPTIONS(?=\s*\{)/i}],function:/\b(?!\d)\w+(?=\s*\()/,boolean:/\b(?:false|true)\b/i,range:{pattern:/\.\./,alias:"operator"},number:[/\b0b[01]+/i,/\b0x[0-9a-f]+/i,/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i],operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}}e.exports=t,t.displayName="aql",t.aliases=[]},323:e=>{"use strict";function t(e){e.languages.applescript={comment:[/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,/--.+/,/#.+/],string:/"(?:\\.|[^"\\\r\n])*"/,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?\b/i,operator:[/[&=≠≤≥*+\-\/÷^]|[<>]=?/,/\b(?:(?:begin|end|start)s? with|(?:contains?|(?:does not|doesn't) contain)|(?:is|isn't|is not) (?:contained by|in)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:comes|(?:does not|doesn't) come) (?:after|before)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equal to|equals|is not|isn't)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|as|div|mod|not|or))\b/],keyword:/\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,"class-name":/\b(?:POSIX file|RGB color|alias|application|boolean|centimeters|centimetres|class|constant|cubic centimeters|cubic centimetres|cubic feet|cubic inches|cubic meters|cubic metres|cubic yards|date|degrees Celsius|degrees Fahrenheit|degrees Kelvin|feet|file|gallons|grams|inches|integer|kilograms|kilometers|kilometres|list|liters|litres|meters|metres|miles|number|ounces|pounds|quarts|real|record|reference|script|square feet|square kilometers|square kilometres|square meters|square metres|square miles|square yards|text|yards)\b/,punctuation:/[{}():,¬«»《》]/}}e.exports=t,t.displayName="applescript",t.aliases=[]},334:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,o,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c{"use strict";function t(e){!function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(e)}e.exports=t,t.displayName="kotlin",t.aliases=["kt","kts"]},358:e=>{"use strict";function t(e){e.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,punctuation:/[()[\]{};,.]/},e.languages.uc=e.languages.uscript=e.languages.unrealscript}e.exports=t,t.displayName="unrealscript",t.aliases=["uc","uscript"]},377:e=>{"use strict";function t(e){e.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:False|True)\b/i,"class-name":/\b[A-Z][\dA-Z_]*\b/,number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}}e.exports=t,t.displayName="eiffel",t.aliases=[]},394:e=>{"use strict";function t(e){!function(e){e.languages.xquery=e.languages.extend("markup",{"xquery-comment":{pattern:/\(:[\s\S]*?:\)/,greedy:!0,alias:"comment"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},extension:{pattern:/\(#.+?#\)/,alias:"symbol"},variable:/\$[-\w:]+/,axis:{pattern:/(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/,lookbehind:!0,alias:"operator"},"keyword-operator":{pattern:/(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/,lookbehind:!0},function:/[\w-]+(?::[\w-]+)*(?=\s*\()/,"xquery-element":{pattern:/(element\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"tag"},"xquery-attribute":{pattern:/(attribute\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"attr-name"},builtin:{pattern:/(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:ENTITIES|ENTITY|ID|IDREFS?|NCName|NMTOKENS?|NOTATION|Name|QName|anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|int|integer|language|long|negativeInteger|nonNegativeInteger|nonPositiveInteger|normalizedString|positiveInteger|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/,lookbehind:!0},number:/\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/,operator:[/[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:/]/}),e.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,e.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/,e.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,e.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,inside:e.languages.xquery,alias:"language-xquery"};var t=function(e){return"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(t).join("")},n=function(r){for(var i=[],a=0;a0&&i[i.length-1].tagName===t(o.content[0].content[1])&&i.pop():"/>"===o.content[o.content.length-1].content||i.push({tagName:t(o.content[0].content[1]),openedBraces:0}):!(i.length>0&&"punctuation"===o.type&&"{"===o.content)||r[a+1]&&"punctuation"===r[a+1].type&&"{"===r[a+1].content||r[a-1]&&"plain-text"===r[a-1].type&&"{"===r[a-1].content?i.length>0&&i[i.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?i[i.length-1].openedBraces--:"comment"!==o.type&&(s=!0):i[i.length-1].openedBraces++),(s||"string"==typeof o)&&i.length>0&&0===i[i.length-1].openedBraces){var c=t(o);a0&&("string"==typeof r[a-1]||"plain-text"===r[a-1].type)&&(c=t(r[a-1])+c,r.splice(a-1,1),a--),/^\s+$/.test(c)?r[a]=c:r[a]=new e.Token("plain-text",c,null,c)}o.content&&"string"!=typeof o.content&&n(o.content)}};e.hooks.add("after-tokenize",function(e){"xquery"===e.language&&n(e.tokens)})}(e)}e.exports=t,t.displayName="xquery",t.aliases=[]},416:(e,t,n)=>{"use strict";n.d(t,{B:()=>a,t:()=>i});var r=console;function i(){return r}function a(e){r=e}},437:(e,t,n)=>{"use strict";var r=n(2046);e.exports=function(e,t){t=t||{};var n={},i=["url","method","data"],a=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function l(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=c(void 0,e[i])):n[i]=c(e[i],t[i])}r.forEach(i,function(e){r.isUndefined(t[e])||(n[e]=c(void 0,t[e]))}),r.forEach(a,l),r.forEach(o,function(i){r.isUndefined(t[i])?r.isUndefined(e[i])||(n[i]=c(void 0,e[i])):n[i]=c(void 0,t[i])}),r.forEach(s,function(r){r in t?n[r]=c(e[r],t[r]):r in e&&(n[r]=c(void 0,e[r]))});var u=i.concat(a).concat(o).concat(s),f=Object.keys(e).concat(Object.keys(t)).filter(function(e){return-1===u.indexOf(e)});return r.forEach(f,l),n}},452:e=>{"use strict";function t(e){!function(e){e.languages.ignore={comment:/^#.*/m,entry:{pattern:/\S(?:.*(?:(?:\\ )|\S))?/,alias:"string",inside:{operator:/^!|\*\*?|\?/,regex:{pattern:/(^|[^\\])\[[^\[\]]*\]/,lookbehind:!0},punctuation:/\//}}},e.languages.gitignore=e.languages.ignore,e.languages.hgignore=e.languages.ignore,e.languages.npmignore=e.languages.ignore}(e)}e.exports=t,t.displayName="ignore",t.aliases=["gitignore","hgignore","npmignore"]},463:e=>{"use strict";function t(e){e.languages.nasm={comment:/;.*$/m,string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,label:{pattern:/(^\s*)[A-Za-z._?$][\w.?$@~#]*:/m,lookbehind:!0,alias:"function"},keyword:[/\[?BITS (?:16|32|64)\]?/,{pattern:/(^\s*)section\s*[a-z.]+:?/im,lookbehind:!0},/(?:extern|global)[^;\r\n]*/i,/(?:CPU|DEFAULT|FLOAT).*$/m],register:{pattern:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s)\b/i,alias:"variable"},number:/(?:\b|(?=\$))(?:0[hx](?:\.[\da-f]+|[\da-f]+(?:\.[\da-f]+)?)(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-\/%<>=&|$!]/}}e.exports=t,t.displayName="nasm",t.aliases=[]},497:e=>{"use strict";function t(e){!function(e){e.languages.velocity=e.languages.extend("markup",{});var t={variable:{pattern:/(^|[^\\](?:\\\\)*)\$!?(?:[a-z][\w-]*(?:\([^)]*\))?(?:\.[a-z][\w-]*(?:\([^)]*\))?|\[[^\]]+\])*|\{[^}]+\})/i,lookbehind:!0,inside:{}},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},number:/\b\d+\b/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|[+*/%-]|&&|\|\||\.\.|\b(?:eq|g[et]|l[et]|n(?:e|ot))\b/,punctuation:/[(){}[\]:,.]/};t.variable.inside={string:t.string,function:{pattern:/([^\w-])[a-z][\w-]*(?=\()/,lookbehind:!0},number:t.number,boolean:t.boolean,punctuation:t.punctuation},e.languages.insertBefore("velocity","comment",{unparsed:{pattern:/(^|[^\\])#\[\[[\s\S]*?\]\]#/,lookbehind:!0,greedy:!0,inside:{punctuation:/^#\[\[|\]\]#$/}},"velocity-comment":[{pattern:/(^|[^\\])#\*[\s\S]*?\*#/,lookbehind:!0,greedy:!0,alias:"comment"},{pattern:/(^|[^\\])##.*/,lookbehind:!0,greedy:!0,alias:"comment"}],directive:{pattern:/(^|[^\\](?:\\\\)*)#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})(?:\s*\((?:[^()]|\([^()]*\))*\))?/i,lookbehind:!0,inside:{keyword:{pattern:/^#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})|\bin\b/,inside:{punctuation:/[{}]/}},rest:t}},variable:t.variable}),e.languages.velocity.tag.inside["attr-value"].inside.rest=e.languages.velocity}(e)}e.exports=t,t.displayName="velocity",t.aliases=[]},512:e=>{"use strict";function t(e){e.languages.cil={comment:/\/\/.*/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},directive:{pattern:/(^|\W)\.[a-z]+(?=\s)/,lookbehind:!0,alias:"class-name"},variable:/\[[\w\.]+\]/,keyword:/\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,function:/\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,boolean:/\b(?:false|true)\b/,number:/\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i,punctuation:/[{}[\];(),:=]|IL_[0-9A-Za-z]+/}}e.exports=t,t.displayName="cil",t.aliases=[]},527:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5248),i=n.n(r)()(function(e){return e[1]});i.push([e.id,'.node{cursor:pointer}.node:hover{stroke:#000;stroke-width:1.5px}.node--leaf{fill:#fff}.label{font:11px "Helvetica Neue",Helvetica,Arial,sans-serif;text-anchor:middle;text-shadow:0 1px 0 #fff,1px 0 0 #fff,-1px 0 0 #fff,0 -1px 0 #fff}.label,.node--root,.ui.button.screen-size-button{margin:0;background-color:rgba(0,0,0,0)}.circle-tooltip{box-shadow:0 2px 5px rgba(0,0,0,.2);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;max-width:300px;word-wrap:break-word}.breadcrumb-item{word-break:break-word;overflow-wrap:anywhere;display:inline;max-width:100%}.breadcrumb-container{margin-top:0 !important;margin-bottom:0 !important;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;padding:10px;background-color:#f8f8f8;border-radius:4px;box-shadow:0 1px 3px rgba(0,0,0,.1);overflow:auto;max-width:100%;line-height:1.4;white-space:normal;word-break:break-word;overflow-wrap:anywhere}',""]);const a=i},543:e=>{"use strict";function t(e){!function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},c=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(e)}e.exports=t,t.displayName="markdown",t.aliases=["md"]},571:e=>{"use strict";e.exports=n;var t=n.prototype;function n(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}t.space=null,t.normal={},t.property={}},597:(e,t,n)=>{"use strict";var r=n(8433);function i(e){e.register(r),e.languages.hlsl=e.languages.extend("c",{"class-name":[e.languages.c["class-name"],/\b(?:AppendStructuredBuffer|BlendState|Buffer|ByteAddressBuffer|CompileShader|ComputeShader|ConsumeStructuredBuffer|DepthStencilState|DepthStencilView|DomainShader|GeometryShader|Hullshader|InputPatch|LineStream|OutputPatch|PixelShader|PointStream|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture(?:1D|1DArray|2D|2DArray|3D)|RasterizerState|RenderTargetView|SamplerComparisonState|SamplerState|StructuredBuffer|Texture(?:1D|1DArray|2D|2DArray|2DMS|2DMSArray|3D|Cube|CubeArray)|TriangleStream|VertexShader)\b/],keyword:[/\b(?:asm|asm_fragment|auto|break|case|catch|cbuffer|centroid|char|class|column_major|compile|compile_fragment|const|const_cast|continue|default|delete|discard|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|fxgroup|goto|groupshared|if|in|inline|inout|interface|line|lineadj|linear|long|matrix|mutable|namespace|new|nointerpolation|noperspective|operator|out|packoffset|pass|pixelfragment|point|precise|private|protected|public|register|reinterpret_cast|return|row_major|sample|sampler|shared|short|signed|sizeof|snorm|stateblock|stateblock_state|static|static_cast|string|struct|switch|tbuffer|technique|technique10|technique11|template|texture|this|throw|triangle|triangleadj|try|typedef|typename|uniform|union|unorm|unsigned|using|vector|vertexfragment|virtual|void|volatile|while)\b/,/\b(?:bool|double|dword|float|half|int|min(?:10float|12int|16(?:float|int|uint))|uint)(?:[1-4](?:x[1-4])?)?\b/],number:/(?:(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?|\b0x[\da-fA-F]+)[fFhHlLuU]?\b/,boolean:/\b(?:false|true)\b/})}e.exports=i,i.displayName="hlsl",i.aliases=[]},604:e=>{"use strict";function t(e){e.languages.vhdl={comment:/--.+/,"vhdl-vectors":{pattern:/\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,alias:"number"},"quoted-function":{pattern:/"\S+?"(?=\()/,alias:"function"},string:/"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,constant:/\b(?:library|use)\b/i,keyword:/\b(?:'active|'ascending|'base|'delayed|'driving|'driving_value|'event|'high|'image|'instance_name|'last_active|'last_event|'last_value|'left|'leftof|'length|'low|'path_name|'pos|'pred|'quiet|'range|'reverse_range|'right|'rightof|'simple_name|'stable|'succ|'transaction|'val|'value|access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\w+(?=\()/,number:/'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,operator:/[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i,punctuation:/[{}[\];(),.:]/}}e.exports=t,t.displayName="vhdl",t.aliases=[]},613:(e,t,n)=>{e.exports=function(e){var t=n(2074),f=n(2475),h=n(5975);if(e){if(void 0!==e.springCoeff)throw new Error("springCoeff was renamed to springCoefficient");if(void 0!==e.dragCoeff)throw new Error("dragCoeff was renamed to dragCoefficient")}e=f(e,{springLength:10,springCoefficient:.8,gravity:-12,theta:.8,dragCoefficient:.9,timeStep:.5,adaptiveTimeStepWeight:0,dimensions:2,debug:!1});var d=l[e.dimensions];if(!d){var p=e.dimensions;d={Body:r(p,e.debug),createQuadTree:i(p),createBounds:a(p),createDragForce:o(p),createSpringForce:s(p),integrate:c(p)},l[p]=d}var g=d.Body,b=d.createQuadTree,m=d.createBounds,w=d.createDragForce,v=d.createSpringForce,y=d.integrate,E=n(4374).random(42),_=[],S=[],x=b(e,E),T=m(_,e,E),A=v(e,E),k=w(e),C=[],M=new Map,I=0;R("nbody",function(){if(0!==_.length){x.insertBodies(_);for(var e=_.length;e--;){var t=_[e];t.isPinned||(t.reset(),x.updateBodyForce(t),k.update(t))}}}),R("spring",function(){for(var e=S.length;e--;)A.update(S[e])});var O={bodies:_,quadTree:x,springs:S,settings:e,addForce:R,removeForce:function(e){var t=C.indexOf(M.get(e));t<0||(C.splice(t,1),M.delete(e))},getForces:function(){return M},step:function(){for(var t=0;tnew g(e))(e);return _.push(t),t},removeBody:function(e){if(e){var t=_.indexOf(e);if(!(t<0))return _.splice(t,1),0===_.length&&T.reset(),!0}},addSpring:function(e,n,r,i){if(!e||!n)throw new Error("Cannot add null spring to force simulator");"number"!=typeof r&&(r=-1);var a=new t(e,n,r,i>=0?i:-1);return S.push(a),a},getTotalMovement:function(){return 0},removeSpring:function(e){if(e){var t=S.indexOf(e);return t>-1?(S.splice(t,1),!0):void 0}},getBestNewBodyPosition:function(e){return T.getBestNewPosition(e)},getBBox:N,getBoundingBox:N,invalidateBBox:function(){console.warn("invalidateBBox() is deprecated, bounds always recomputed on `getBBox()` call")},gravity:function(t){return void 0!==t?(e.gravity=t,x.options({gravity:t}),this):e.gravity},theta:function(t){return void 0!==t?(e.theta=t,x.options({theta:t}),this):e.theta},random:E};return function(e,t){for(var n in e)u(e,t,n)}(e,O),h(O),O;function N(){return T.update(),T.box}function R(e,t){if(M.has(e))throw new Error("Force "+e+" is already added");M.set(e,t),C.push(t)}};var r=n(81),i=n(934),a=n(3599),o=n(5788),s=n(1325),c=n(680),l={};function u(e,t,n){if(e.hasOwnProperty(n)&&"function"!=typeof t[n]){var r=Number.isFinite(e[n]);t[n]=r?function(r){if(void 0!==r){if(!Number.isFinite(r))throw new Error("Value of "+n+" should be a valid number.");return e[n]=r,t}return e[n]}:function(r){return void 0!==r?(e[n]=r,t):e[n]}}}},618:e=>{"use strict";function t(e){!function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===||[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(e)}e.exports=t,t.displayName="ruby",t.aliases=["rb"]},640:e=>{"use strict";function t(e){!function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(e)}e.exports=t,t.displayName="sass",t.aliases=[]},672:function(e){e.exports=function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:r,getOwnPropertyDescriptor:i}=Object;let{freeze:a,seal:o,create:s}=Object,{apply:c,construct:l}="undefined"!=typeof Reflect&&Reflect;c||(c=function(e,t,n){return e.apply(t,n)}),a||(a=function(e){return e}),o||(o=function(e){return e}),l||(l=function(e,t){return new e(...t)});const u=_(Array.prototype.forEach),f=_(Array.prototype.pop),h=_(Array.prototype.push),d=_(String.prototype.toLowerCase),p=_(String.prototype.toString),g=_(String.prototype.match),b=_(String.prototype.replace),m=_(String.prototype.indexOf),w=_(String.prototype.trim),v=_(RegExp.prototype.test),y=(E=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),i=1;i/gm),j=o(/\${[\w\W]*}/gm),B=o(/^data-[\-\w.\u00B7-\uFFFF]/),z=o(/^aria-[\-\w]+$/),$=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=o(/^(?:\w+script|data):/i),G=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V=o(/^html$/i);var W=Object.freeze({__proto__:null,MUSTACHE_EXPR:F,ERB_EXPR:U,TMPLIT_EXPR:j,DATA_ATTR:B,ARIA_ATTR:z,IS_ALLOWED_URI:$,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:G,DOCTYPE_NAME:V});const q=()=>"undefined"==typeof window?null:window;return function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:q();const r=e=>t(e);if(r.version="3.0.5",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;const i=n.document,o=i.currentScript;let{document:s}=n;const{DocumentFragment:c,HTMLTemplateElement:l,Node:E,Element:_,NodeFilter:F,NamedNodeMap:U=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:j,DOMParser:B,trustedTypes:z}=n,H=_.prototype,G=T(H,"cloneNode"),X=T(H,"nextSibling"),Y=T(H,"childNodes"),K=T(H,"parentNode");if("function"==typeof l){const e=s.createElement("template");e.content&&e.content.ownerDocument&&(s=e.content.ownerDocument)}let Z,Q="";const{implementation:J,createNodeIterator:ee,createDocumentFragment:te,getElementsByTagName:ne}=s,{importNode:re}=i;let ie={};r.isSupported="function"==typeof e&&"function"==typeof K&&J&&void 0!==J.createHTMLDocument;const{MUSTACHE_EXPR:ae,ERB_EXPR:oe,TMPLIT_EXPR:se,DATA_ATTR:ce,ARIA_ATTR:le,IS_SCRIPT_OR_DATA:ue,ATTR_WHITESPACE:fe}=W;let{IS_ALLOWED_URI:he}=W,de=null;const pe=S({},[...A,...k,...C,...I,...N]);let ge=null;const be=S({},[...R,...P,...L,...D]);let me=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),we=null,ve=null,ye=!0,Ee=!0,_e=!1,Se=!0,xe=!1,Te=!1,Ae=!1,ke=!1,Ce=!1,Me=!1,Ie=!1,Oe=!0,Ne=!1,Re=!0,Pe=!1,Le={},De=null;const Fe=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ue=null;const je=S({},["audio","video","img","source","image","track"]);let Be=null;const ze=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",He="http://www.w3.org/2000/svg",Ge="http://www.w3.org/1999/xhtml";let Ve=Ge,We=!1,qe=null;const Xe=S({},[$e,He,Ge],p);let Ye;const Ke=["application/xhtml+xml","text/html"];let Ze,Qe=null;const Je=s.createElement("form"),et=function(e){return e instanceof RegExp||e instanceof Function},tt=function(e){if(!Qe||Qe!==e){if(e&&"object"==typeof e||(e={}),e=x(e),Ye=Ye=-1===Ke.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,Ze="application/xhtml+xml"===Ye?p:d,de="ALLOWED_TAGS"in e?S({},e.ALLOWED_TAGS,Ze):pe,ge="ALLOWED_ATTR"in e?S({},e.ALLOWED_ATTR,Ze):be,qe="ALLOWED_NAMESPACES"in e?S({},e.ALLOWED_NAMESPACES,p):Xe,Be="ADD_URI_SAFE_ATTR"in e?S(x(ze),e.ADD_URI_SAFE_ATTR,Ze):ze,Ue="ADD_DATA_URI_TAGS"in e?S(x(je),e.ADD_DATA_URI_TAGS,Ze):je,De="FORBID_CONTENTS"in e?S({},e.FORBID_CONTENTS,Ze):Fe,we="FORBID_TAGS"in e?S({},e.FORBID_TAGS,Ze):{},ve="FORBID_ATTR"in e?S({},e.FORBID_ATTR,Ze):{},Le="USE_PROFILES"in e&&e.USE_PROFILES,ye=!1!==e.ALLOW_ARIA_ATTR,Ee=!1!==e.ALLOW_DATA_ATTR,_e=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Se=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,xe=e.SAFE_FOR_TEMPLATES||!1,Te=e.WHOLE_DOCUMENT||!1,Ce=e.RETURN_DOM||!1,Me=e.RETURN_DOM_FRAGMENT||!1,Ie=e.RETURN_TRUSTED_TYPE||!1,ke=e.FORCE_BODY||!1,Oe=!1!==e.SANITIZE_DOM,Ne=e.SANITIZE_NAMED_PROPS||!1,Re=!1!==e.KEEP_CONTENT,Pe=e.IN_PLACE||!1,he=e.ALLOWED_URI_REGEXP||$,Ve=e.NAMESPACE||Ge,me=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(me.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&et(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(me.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(me.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),xe&&(Ee=!1),Me&&(Ce=!0),Le&&(de=S({},[...N]),ge=[],!0===Le.html&&(S(de,A),S(ge,R)),!0===Le.svg&&(S(de,k),S(ge,P),S(ge,D)),!0===Le.svgFilters&&(S(de,C),S(ge,P),S(ge,D)),!0===Le.mathMl&&(S(de,I),S(ge,L),S(ge,D))),e.ADD_TAGS&&(de===pe&&(de=x(de)),S(de,e.ADD_TAGS,Ze)),e.ADD_ATTR&&(ge===be&&(ge=x(ge)),S(ge,e.ADD_ATTR,Ze)),e.ADD_URI_SAFE_ATTR&&S(Be,e.ADD_URI_SAFE_ATTR,Ze),e.FORBID_CONTENTS&&(De===Fe&&(De=x(De)),S(De,e.FORBID_CONTENTS,Ze)),Re&&(de["#text"]=!0),Te&&S(de,["html","head","body"]),de.table&&(S(de,["tbody"]),delete we.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw y('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw y('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');Z=e.TRUSTED_TYPES_POLICY,Q=Z.createHTML("")}else void 0===Z&&(Z=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(z,o)),null!==Z&&"string"==typeof Q&&(Q=Z.createHTML(""));a&&a(e),Qe=e}},nt=S({},["mi","mo","mn","ms","mtext"]),rt=S({},["foreignobject","desc","title","annotation-xml"]),it=S({},["title","style","font","a","script"]),at=S({},k);S(at,C),S(at,M);const ot=S({},I);S(ot,O);const st=function(e){h(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.remove()}},ct=function(e,t){try{h(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){h(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!ge[e])if(Ce||Me)try{st(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},lt=function(e){let t,n;if(ke)e=""+e;else{const t=g(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===Ye&&Ve===Ge&&(e=''+e+"");const r=Z?Z.createHTML(e):e;if(Ve===Ge)try{t=(new B).parseFromString(r,Ye)}catch(e){}if(!t||!t.documentElement){t=J.createDocument(Ve,"template",null);try{t.documentElement.innerHTML=We?Q:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(s.createTextNode(n),i.childNodes[0]||null),Ve===Ge?ne.call(t,Te?"html":"body")[0]:Te?t.documentElement:i},ut=function(e){return ee.call(e.ownerDocument||e,e,F.SHOW_ELEMENT|F.SHOW_COMMENT|F.SHOW_TEXT,null,!1)},ft=function(e){return"object"==typeof E?e instanceof E:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ht=function(e,t,n){ie[e]&&u(ie[e],e=>{e.call(r,t,n,Qe)})},dt=function(e){let t;if(ht("beforeSanitizeElements",e,null),(n=e)instanceof j&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof U)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes))return st(e),!0;var n;const i=Ze(e.nodeName);if(ht("uponSanitizeElement",e,{tagName:i,allowedTags:de}),e.hasChildNodes()&&!ft(e.firstElementChild)&&(!ft(e.content)||!ft(e.content.firstElementChild))&&v(/<[/\w]/g,e.innerHTML)&&v(/<[/\w]/g,e.textContent))return st(e),!0;if(!de[i]||we[i]){if(!we[i]&>(i)){if(me.tagNameCheck instanceof RegExp&&v(me.tagNameCheck,i))return!1;if(me.tagNameCheck instanceof Function&&me.tagNameCheck(i))return!1}if(Re&&!De[i]){const t=K(e)||e.parentNode,n=Y(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r)t.insertBefore(G(n[r],!0),X(e))}return st(e),!0}return e instanceof _&&!function(e){let t=K(e);t&&t.tagName||(t={namespaceURI:Ve,tagName:"template"});const n=d(e.tagName),r=d(t.tagName);return!!qe[e.namespaceURI]&&(e.namespaceURI===He?t.namespaceURI===Ge?"svg"===n:t.namespaceURI===$e?"svg"===n&&("annotation-xml"===r||nt[r]):Boolean(at[n]):e.namespaceURI===$e?t.namespaceURI===Ge?"math"===n:t.namespaceURI===He?"math"===n&&rt[r]:Boolean(ot[n]):e.namespaceURI===Ge?!(t.namespaceURI===He&&!rt[r])&&!(t.namespaceURI===$e&&!nt[r])&&!ot[n]&&(it[n]||!at[n]):!("application/xhtml+xml"!==Ye||!qe[e.namespaceURI]))}(e)?(st(e),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!v(/<\/no(script|embed|frames)/i,e.innerHTML)?(xe&&3===e.nodeType&&(t=e.textContent,t=b(t,ae," "),t=b(t,oe," "),t=b(t,se," "),e.textContent!==t&&(h(r.removed,{element:e.cloneNode()}),e.textContent=t)),ht("afterSanitizeElements",e,null),!1):(st(e),!0)},pt=function(e,t,n){if(Oe&&("id"===t||"name"===t)&&(n in s||n in Je))return!1;if(Ee&&!ve[t]&&v(ce,t));else if(ye&&v(le,t));else if(!ge[t]||ve[t]){if(!(gt(e)&&(me.tagNameCheck instanceof RegExp&&v(me.tagNameCheck,e)||me.tagNameCheck instanceof Function&&me.tagNameCheck(e))&&(me.attributeNameCheck instanceof RegExp&&v(me.attributeNameCheck,t)||me.attributeNameCheck instanceof Function&&me.attributeNameCheck(t))||"is"===t&&me.allowCustomizedBuiltInElements&&(me.tagNameCheck instanceof RegExp&&v(me.tagNameCheck,n)||me.tagNameCheck instanceof Function&&me.tagNameCheck(n))))return!1}else if(Be[t]);else if(v(he,b(n,fe,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==m(n,"data:")||!Ue[e])if(_e&&!v(ue,b(n,fe,"")));else if(n)return!1;return!0},gt=function(e){return e.indexOf("-")>0},bt=function(e){let t,n,i,a;ht("beforeSanitizeAttributes",e,null);const{attributes:o}=e;if(!o)return;const s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge};for(a=o.length;a--;){t=o[a];const{name:c,namespaceURI:l}=t;if(n="value"===c?t.value:w(t.value),i=Ze(c),s.attrName=i,s.attrValue=n,s.keepAttr=!0,s.forceKeepAttr=void 0,ht("uponSanitizeAttribute",e,s),n=s.attrValue,s.forceKeepAttr)continue;if(ct(c,e),!s.keepAttr)continue;if(!Se&&v(/\/>/i,n)){ct(c,e);continue}xe&&(n=b(n,ae," "),n=b(n,oe," "),n=b(n,se," "));const u=Ze(e.nodeName);if(pt(u,i,n)){if(!Ne||"id"!==i&&"name"!==i||(ct(c,e),n="user-content-"+n),Z&&"object"==typeof z&&"function"==typeof z.getAttributeType)if(l);else switch(z.getAttributeType(u,i)){case"TrustedHTML":n=Z.createHTML(n);break;case"TrustedScriptURL":n=Z.createScriptURL(n)}try{l?e.setAttributeNS(l,c,n):e.setAttribute(c,n),f(r.removed)}catch(e){}}}ht("afterSanitizeAttributes",e,null)},mt=function e(t){let n;const r=ut(t);for(ht("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)ht("uponSanitizeShadowNode",n,null),dt(n)||(n.content instanceof c&&e(n.content),bt(n));ht("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(e){let t,n,a,o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(We=!e,We&&(e="\x3c!--\x3e"),"string"!=typeof e&&!ft(e)){if("function"!=typeof e.toString)throw y("toString is not a function");if("string"!=typeof(e=e.toString()))throw y("dirty is not a string, aborting")}if(!r.isSupported)return e;if(Ae||tt(s),r.removed=[],"string"==typeof e&&(Pe=!1),Pe){if(e.nodeName){const t=Ze(e.nodeName);if(!de[t]||we[t])throw y("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof E)t=lt("\x3c!----\x3e"),n=t.ownerDocument.importNode(e,!0),1===n.nodeType&&"BODY"===n.nodeName||"HTML"===n.nodeName?t=n:t.appendChild(n);else{if(!Ce&&!xe&&!Te&&-1===e.indexOf("<"))return Z&&Ie?Z.createHTML(e):e;if(t=lt(e),!t)return Ce?null:Ie?Q:""}t&&ke&&st(t.firstChild);const l=ut(Pe?e:t);for(;a=l.nextNode();)dt(a)||(a.content instanceof c&&mt(a.content),bt(a));if(Pe)return e;if(Ce){if(Me)for(o=te.call(t.ownerDocument);t.firstChild;)o.appendChild(t.firstChild);else o=t;return(ge.shadowroot||ge.shadowrootmode)&&(o=re.call(i,o,!0)),o}let u=Te?t.outerHTML:t.innerHTML;return Te&&de["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&v(V,t.ownerDocument.doctype.name)&&(u="\n"+u),xe&&(u=b(u,ae," "),u=b(u,oe," "),u=b(u,se," ")),Z&&Ie?Z.createHTML(u):u},r.setConfig=function(e){tt(e),Ae=!0},r.clearConfig=function(){Qe=null,Ae=!1},r.isValidAttribute=function(e,t,n){Qe||tt({});const r=Ze(e),i=Ze(t);return pt(r,i,n)},r.addHook=function(e,t){"function"==typeof t&&(ie[e]=ie[e]||[],h(ie[e],t))},r.removeHook=function(e){if(ie[e])return f(ie[e])},r.removeHooks=function(e){ie[e]&&(ie[e]=[])},r.removeAllHooks=function(){ie={}},r}()}()},680:(e,t,n)=>{const r=n(3103);function i(e){let t=r(e);return`\n var length = bodies.length;\n if (length === 0) return 0;\n\n ${t("var d{var} = 0, t{var} = 0;",{indent:2})}\n\n for (var i = 0; i < length; ++i) {\n var body = bodies[i];\n if (body.isPinned) continue;\n\n if (adaptiveTimeStepWeight && body.springCount) {\n timeStep = (adaptiveTimeStepWeight * body.springLength/body.springCount);\n }\n\n var coeff = timeStep / body.mass;\n\n ${t("body.velocity.{var} += coeff * body.force.{var};",{indent:4})}\n ${t("var v{var} = body.velocity.{var};",{indent:4})}\n var v = Math.sqrt(${t("v{var} * v{var}",{join:" + "})});\n\n if (v > 1) {\n // We normalize it so that we move within timeStep range. \n // for the case when v <= 1 - we let velocity to fade out.\n ${t("body.velocity.{var} = v{var} / v;",{indent:6})}\n }\n\n ${t("d{var} = timeStep * body.velocity.{var};",{indent:4})}\n\n ${t("body.pos.{var} += d{var};",{indent:4})}\n\n ${t("t{var} += Math.abs(d{var});",{indent:4})}\n }\n\n return (${t("t{var} * t{var}",{join:" + "})})/length;\n`}e.exports=function(e){let t=i(e);return new Function("bodies","timeStep","adaptiveTimeStepWeight",t)},e.exports.generateIntegratorFunctionBody=i},706:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},712:e=>{"use strict";function t(e){!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var i=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,o=0;o{"use strict";function t(e){e.languages.bicep={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],property:[{pattern:/([\r\n][ \t]*)[a-z_]\w*(?=[ \t]*:)/i,lookbehind:!0},{pattern:/([\r\n][ \t]*)'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'(?=[ \t]*:)/,lookbehind:!0,greedy:!0}],string:[{pattern:/'''[^'][\s\S]*?'''/,greedy:!0},{pattern:/(^|[^\\'])'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0}],"interpolated-string":{pattern:/(^|[^\\'])'(?:\\.|\$(?:(?!\{)|\{[^{}\r\n]*\})|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}\r\n]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0},punctuation:/^\$\{|\}$/}},string:/[\s\S]+/}},datatype:{pattern:/(\b(?:output|param)\b[ \t]+\w+[ \t]+)\w+\b/,lookbehind:!0,alias:"class-name"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:existing|for|if|in|module|null|output|param|resource|targetScope|var)\b/,decorator:/@\w+\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,punctuation:/[{}[\];(),.:]/},e.languages.bicep["interpolated-string"].inside.interpolation.inside.expression.inside=e.languages.bicep}e.exports=t,t.displayName="bicep",t.aliases=[]},740:(e,t,n)=>{"use strict";var r=n(618);function i(e){e.register(r),function(e){e.languages.haml={"multiline-comment":{pattern:/((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*(?:(?:\r?\n|\r)\2[\t ].+)*/,lookbehind:!0,alias:"comment"},"multiline-code":[{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*(?:(?:\r?\n|\r)\2[\t ].*,[\t ]*)*(?:(?:\r?\n|\r)\2[\t ].+)/,lookbehind:!0,inside:e.languages.ruby},{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*(?:(?:\r?\n|\r)\2[\t ].*\|[\t ]*)*/,lookbehind:!0,inside:e.languages.ruby}],filter:{pattern:/((?:^|\r?\n|\r)([\t ]*)):[\w-]+(?:(?:\r?\n|\r)(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"symbol"}}},markup:{pattern:/((?:^|\r?\n|\r)[\t ]*)<.+/,lookbehind:!0,inside:e.languages.markup},doctype:{pattern:/((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/,lookbehind:!0},tag:{pattern:/((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^{}])+\}|\[[^\]]+\])*[\/<>]*/,lookbehind:!0,inside:{attributes:[{pattern:/(^|[^#])\{(?:\{[^}]+\}|[^{}])+\}/,lookbehind:!0,inside:e.languages.ruby},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/,lookbehind:!0},"attr-name":/[\w:-]+(?=\s*!?=|\s*[,)])/,punctuation:/[=(),]/}},{pattern:/\[[^\]]+\]/,inside:e.languages.ruby}],punctuation:/[<>]/}},code:{pattern:/((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,lookbehind:!0,inside:e.languages.ruby},interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},ruby:{pattern:/[\s\S]+/,inside:e.languages.ruby}}},punctuation:{pattern:/((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,lookbehind:!0}};for(var t=["css",{filter:"coffee",language:"coffeescript"},"erb","javascript","less","markdown","ruby","scss","textile"],n={},r=0,i=t.length;r{"use strict";function t(e){!function(e){var t=/(?:\B-|\b_|\b)[A-Za-z][\w-]*(?![\w-])/.source,n="(?:"+/\b(?:unsigned\s+)?long\s+long(?![\w-])/.source+"|"+/\b(?:unrestricted|unsigned)\s+[a-z]+(?![\w-])/.source+"|"+/(?!(?:unrestricted|unsigned)\b)/.source+t+/(?:\s*<(?:[^<>]|<[^<>]*>)*>)?/.source+")"+/(?:\s*\?)?/.source,r={};for(var i in e.languages["web-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"[^"]*"/,greedy:!0},namespace:{pattern:RegExp(/(\bnamespace\s+)/.source+t),lookbehind:!0},"class-name":[{pattern:/(^|[^\w-])(?:iterable|maplike|setlike)\s*<(?:[^<>]|<[^<>]*>)*>/,lookbehind:!0,inside:r},{pattern:RegExp(/(\b(?:attribute|const|deleter|getter|optional|setter)\s+)/.source+n),lookbehind:!0,inside:r},{pattern:RegExp("("+/\bcallback\s+/.source+t+/\s*=\s*/.source+")"+n),lookbehind:!0,inside:r},{pattern:RegExp(/(\btypedef\b\s*)/.source+n),lookbehind:!0,inside:r},{pattern:RegExp(/(\b(?:callback|dictionary|enum|interface(?:\s+mixin)?)\s+)(?!(?:interface|mixin)\b)/.source+t),lookbehind:!0},{pattern:RegExp(/(:\s*)/.source+t),lookbehind:!0},RegExp(t+/(?=\s+(?:implements|includes)\b)/.source),{pattern:RegExp(/(\b(?:implements|includes)\s+)/.source+t),lookbehind:!0},{pattern:RegExp(n+"(?="+/\s*(?:\.{3}\s*)?/.source+t+/\s*[(),;=]/.source+")"),inside:r}],builtin:/\b(?:ArrayBuffer|BigInt64Array|BigUint64Array|ByteString|DOMString|DataView|Float32Array|Float64Array|FrozenArray|Int16Array|Int32Array|Int8Array|ObservableArray|Promise|USVString|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray)\b/,keyword:[/\b(?:async|attribute|callback|const|constructor|deleter|dictionary|enum|getter|implements|includes|inherit|interface|mixin|namespace|null|optional|or|partial|readonly|required|setter|static|stringifier|typedef|unrestricted)\b/,/\b(?:any|bigint|boolean|byte|double|float|iterable|long|maplike|object|octet|record|sequence|setlike|short|symbol|undefined|unsigned|void)\b/],boolean:/\b(?:false|true)\b/,number:{pattern:/(^|[^\w-])-?(?:0x[0-9a-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|NaN|Infinity)(?![\w-])/i,lookbehind:!0},operator:/\.{3}|[=:?<>-]/,punctuation:/[(){}[\].,;]/},e.languages["web-idl"])"class-name"!==i&&(r[i]=e.languages["web-idl"][i]);e.languages.webidl=e.languages["web-idl"]}(e)}e.exports=t,t.displayName="webIdl",t.aliases=[]},745:e=>{"use strict";function t(e){!function(e){var t=e.languages.parser=e.languages.extend("markup",{keyword:{pattern:/(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,lookbehind:!0},variable:{pattern:/(^|[^^])\B\$(?:\w+|(?=[.{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{punctuation:/\.|:+/}},function:{pattern:/(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{keyword:{pattern:/(^@)(?:GET_|SET_)/,lookbehind:!0},punctuation:/\.|:+/}},escape:{pattern:/\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,alias:"builtin"},punctuation:/[\[\](){};]/});t=e.languages.insertBefore("parser","keyword",{"parser-comment":{pattern:/(\s)#.*/,lookbehind:!0,alias:"comment"},expression:{pattern:/(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,greedy:!0,lookbehind:!0,inside:{string:{pattern:/(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,lookbehind:!0},keyword:t.keyword,variable:t.variable,function:t.function,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[a-f\d]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?)\b/i,escape:t.escape,operator:/[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,punctuation:t.punctuation}}}),e.languages.insertBefore("inside","punctuation",{expression:t.expression,keyword:t.keyword,variable:t.variable,function:t.function,escape:t.escape,"parser-punctuation":{pattern:t.punctuation,alias:"punctuation"}},t.tag.inside["attr-value"])}(e)}e.exports=t,t.displayName="parser",t.aliases=[]},768:e=>{"use strict";function t(e){e.languages.asm6502={comment:/;.*/,directive:{pattern:/\.\w+(?= )/,alias:"property"},string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,"op-code":{pattern:/\b(?:ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA|adc|and|asl|bcc|bcs|beq|bit|bmi|bne|bpl|brk|bvc|bvs|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|jmp|jsr|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|rti|rts|sbc|sec|sed|sei|sta|stx|sty|tax|tay|tsx|txa|txs|tya)\b/,alias:"keyword"},"hex-number":{pattern:/#?\$[\da-f]{1,4}\b/i,alias:"number"},"binary-number":{pattern:/#?%[01]+\b/,alias:"number"},"decimal-number":{pattern:/#?\b\d+\b/,alias:"number"},register:{pattern:/\b[xya]\b/i,alias:"variable"},punctuation:/[(),:]/}}e.exports=t,t.displayName="asm6502",t.aliases=[]},816:(e,t,n)=>{"use strict";var r=n(1535),i=n(2208),a=r.booleanish,o=r.number,s=r.spaceSeparated;e.exports=i({transform:function(e,t){return"role"===t?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:a,ariaAutoComplete:null,ariaBusy:a,ariaChecked:a,ariaColCount:o,ariaColIndex:o,ariaColSpan:o,ariaControls:s,ariaCurrent:null,ariaDescribedBy:s,ariaDetails:null,ariaDisabled:a,ariaDropEffect:s,ariaErrorMessage:null,ariaExpanded:a,ariaFlowTo:s,ariaGrabbed:a,ariaHasPopup:null,ariaHidden:a,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:s,ariaLevel:o,ariaLive:null,ariaModal:a,ariaMultiLine:a,ariaMultiSelectable:a,ariaOrientation:null,ariaOwns:s,ariaPlaceholder:null,ariaPosInSet:o,ariaPressed:a,ariaReadOnly:a,ariaRelevant:null,ariaRequired:a,ariaRoleDescription:s,ariaRowCount:o,ariaRowIndex:o,ariaRowSpan:o,ariaSelected:a,ariaSetSize:o,ariaSort:null,ariaValueMax:o,ariaValueMin:o,ariaValueNow:o,ariaValueText:null,role:null}})},851:(e,t,n)=>{e.exports=function(e){if("uniqueLinkId"in(e=e||{})&&(console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n","\n","Note: there is also change in default behavior: From now on each graph\nis considered to be not a multigraph by default (each edge is unique)."),e.multigraph=e.uniqueLinkId),void 0===e.multigraph&&(e.multigraph=!1),"function"!=typeof Map)throw new Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");var t,n=new Map,c=new Map,l={},u=0,f=e.multigraph?function(e,t,n){var r=s(e,t),i=l.hasOwnProperty(r);if(i||A(e,t)){i||(l[r]=0);var a="@"+ ++l[r];r=s(e+a,t+a)}return new o(e,t,n,r)}:function(e,t,n){var r=s(e,t),i=c.get(r);return i?(i.data=n,i):new o(e,t,n,r)},h=[],d=k,p=k,g=k,b=k,m={version:20,addNode:y,addLink:function(e,t,n){g();var r=E(e)||y(e),i=E(t)||y(t),o=f(e,t,n),s=c.has(o.id);return c.set(o.id,o),a(r,o),e!==t&&a(i,o),d(o,s?"update":"add"),b(),o},removeLink:function(e,t){return void 0!==t&&(e=A(e,t)),T(e)},removeNode:_,getNode:E,getNodeCount:S,getLinkCount:x,getEdgeCount:x,getLinksCount:x,getNodesCount:S,getLinks:function(e){var t=E(e);return t?t.links:null},forEachNode:I,forEachLinkedNode:function(e,t,r){var i=E(e);if(i&&i.links&&"function"==typeof t)return r?function(e,t,r){for(var i=e.values(),a=i.next();!a.done;){var o=a.value;if(o.fromId===t&&r(n.get(o.toId),o))return!0;a=i.next()}}(i.links,e,t):function(e,t,r){for(var i=e.values(),a=i.next();!a.done;){var o=a.value,s=o.fromId===t?o.toId:o.fromId;if(r(n.get(s),o))return!0;a=i.next()}}(i.links,e,t)},forEachLink:function(e){if("function"==typeof e)for(var t=c.values(),n=t.next();!n.done;){if(e(n.value))return!0;n=t.next()}},beginUpdate:g,endUpdate:b,clear:function(){g(),I(function(e){_(e.id)}),b()},hasLink:A,hasNode:E,getLink:A};return r(m),t=m.on,m.on=function(){return m.beginUpdate=g=C,m.endUpdate=b=M,d=w,p=v,m.on=t,t.apply(m,arguments)},m;function w(e,t){h.push({link:e,changeType:t})}function v(e,t){h.push({node:e,changeType:t})}function y(e,t){if(void 0===e)throw new Error("Invalid node identifier");g();var r=E(e);return r?(r.data=t,p(r,"update")):(r=new i(e,t),p(r,"add")),n.set(e,r),b(),r}function E(e){return n.get(e)}function _(e){var t=E(e);if(!t)return!1;g();var r=t.links;return r&&(r.forEach(T),t.links=null),n.delete(e),p(t,"remove"),b(),!0}function S(){return n.size}function x(){return c.size}function T(e){if(!e)return!1;if(!c.get(e.id))return!1;g(),c.delete(e.id);var t=E(e.fromId),n=E(e.toId);return t&&t.links.delete(e),n&&n.links.delete(e),d(e,"remove"),b(),!0}function A(e,t){if(void 0!==e&&void 0!==t)return c.get(s(e,t))}function k(){}function C(){u+=1}function M(){0==(u-=1)&&h.length>0&&(m.fire("changed",h),h.length=0)}function I(e){if("function"!=typeof e)throw new Error("Function is expected to iterate over graph nodes. You passed "+e);for(var t=n.values(),r=t.next();!r.done;){if(e(r.value))return!0;r=t.next()}}};var r=n(5975);function i(e,t){this.id=e,this.links=null,this.data=t}function a(e,t){e.links?e.links.add(t):e.links=new Set([t])}function o(e,t,n,r){this.fromId=e,this.toId=t,this.data=n,this.id=r}function s(e,t){return e.toString()+"👉 "+t.toString()}},856:(e,t,n)=>{"use strict";var r=n(7183);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},872:(e,t,n)=>{"use strict";n.d(t,{QueryClient:()=>r.QueryClient,QueryClientProvider:()=>i.QueryClientProvider});var r=n(4746);n.o(r,"QueryClientProvider")&&n.d(t,{QueryClientProvider:function(){return r.QueryClientProvider}});var i=n(9882)},889:(e,t,n)=>{"use strict";var r=n(4336);function i(e){e.register(r),e.languages.idris=e.languages.extend("haskell",{comment:{pattern:/(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m},keyword:/\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/,builtin:void 0}),e.languages.insertBefore("idris","keyword",{"import-statement":{pattern:/(^\s*import\s+)(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m,lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.idr=e.languages.idris}e.exports=i,i.displayName="idris",i.aliases=["idr"]},892:e=>{"use strict";function t(e){e.languages.gcode={comment:/;.*|\B\(.*?\)\B/,string:{pattern:/"(?:""|[^"])*"/,greedy:!0},keyword:/\b[GM]\d+(?:\.\d+)?\b/,property:/\b[A-Z]/,checksum:{pattern:/(\*)\d+/,lookbehind:!0,alias:"number"},punctuation:/[:*]/}}e.exports=t,t.displayName="gcode",t.aliases=[]},905:e=>{"use strict";function t(e){e.languages.cypher={comment:/\/\/.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,greedy:!0},"class-name":{pattern:/(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,lookbehind:!0,greedy:!0},relationship:{pattern:/(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,lookbehind:!0,greedy:!0,alias:"property"},identifier:{pattern:/`(?:[^`\\\r\n])*`/,greedy:!0},variable:/\$\w+/,keyword:/\b(?:ADD|ALL|AND|AS|ASC|ASCENDING|ASSERT|BY|CALL|CASE|COMMIT|CONSTRAINT|CONTAINS|CREATE|CSV|DELETE|DESC|DESCENDING|DETACH|DISTINCT|DO|DROP|ELSE|END|ENDS|EXISTS|FOR|FOREACH|IN|INDEX|IS|JOIN|KEY|LIMIT|LOAD|MANDATORY|MATCH|MERGE|NODE|NOT|OF|ON|OPTIONAL|OR|ORDER(?=\s+BY)|PERIODIC|REMOVE|REQUIRE|RETURN|SCALAR|SCAN|SET|SKIP|START|STARTS|THEN|UNION|UNIQUE|UNWIND|USING|WHEN|WHERE|WITH|XOR|YIELD)\b/i,function:/\b\w+\b(?=\s*\()/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,operator:/:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,punctuation:/[()[\]{},;.]/}}e.exports=t,t.displayName="cypher",t.aliases=[]},913:e=>{"use strict";function t(e){!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(e)}e.exports=t,t.displayName="typescript",t.aliases=["ts"]},914:e=>{"use strict";function t(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}e.exports=t,t.displayName="ini",t.aliases=[]},923:(e,t,n)=>{"use strict";var r=n(8692);e.exports=r,r.register(n(2884)),r.register(n(7797)),r.register(n(6995)),r.register(n(5916)),r.register(n(5369)),r.register(n(5083)),r.register(n(3659)),r.register(n(2858)),r.register(n(5926)),r.register(n(4595)),r.register(n(323)),r.register(n(310)),r.register(n(5996)),r.register(n(6285)),r.register(n(9253)),r.register(n(768)),r.register(n(5766)),r.register(n(6969)),r.register(n(3907)),r.register(n(4972)),r.register(n(3678)),r.register(n(5656)),r.register(n(712)),r.register(n(9738)),r.register(n(6652)),r.register(n(5095)),r.register(n(731)),r.register(n(1275)),r.register(n(7659)),r.register(n(7650)),r.register(n(7751)),r.register(n(2601)),r.register(n(5445)),r.register(n(7465)),r.register(n(8433)),r.register(n(3776)),r.register(n(3088)),r.register(n(512)),r.register(n(6804)),r.register(n(3251)),r.register(n(6391)),r.register(n(3029)),r.register(n(9752)),r.register(n(33)),r.register(n(1377)),r.register(n(94)),r.register(n(8241)),r.register(n(5781)),r.register(n(5470)),r.register(n(2819)),r.register(n(9048)),r.register(n(905)),r.register(n(8356)),r.register(n(6627)),r.register(n(1322)),r.register(n(5945)),r.register(n(5875)),r.register(n(153)),r.register(n(2277)),r.register(n(9065)),r.register(n(5770)),r.register(n(1739)),r.register(n(1337)),r.register(n(1421)),r.register(n(377)),r.register(n(2432)),r.register(n(8473)),r.register(n(2668)),r.register(n(5183)),r.register(n(4473)),r.register(n(4761)),r.register(n(8160)),r.register(n(7949)),r.register(n(4003)),r.register(n(3770)),r.register(n(9122)),r.register(n(7322)),r.register(n(4052)),r.register(n(9846)),r.register(n(4584)),r.register(n(892)),r.register(n(8738)),r.register(n(4319)),r.register(n(58)),r.register(n(4652)),r.register(n(4838)),r.register(n(7600)),r.register(n(9443)),r.register(n(6325)),r.register(n(4508)),r.register(n(7849)),r.register(n(8072)),r.register(n(740)),r.register(n(6954)),r.register(n(4336)),r.register(n(2038)),r.register(n(9387)),r.register(n(597)),r.register(n(5174)),r.register(n(6853)),r.register(n(5686)),r.register(n(8194)),r.register(n(7107)),r.register(n(5467)),r.register(n(1525)),r.register(n(889)),r.register(n(6096)),r.register(n(452)),r.register(n(9338)),r.register(n(914)),r.register(n(4278)),r.register(n(3210)),r.register(n(4498)),r.register(n(3298)),r.register(n(2573)),r.register(n(7231)),r.register(n(3191)),r.register(n(187)),r.register(n(4215)),r.register(n(2293)),r.register(n(7603)),r.register(n(6647)),r.register(n(8148)),r.register(n(5729)),r.register(n(5166)),r.register(n(1328)),r.register(n(9229)),r.register(n(2809)),r.register(n(6656)),r.register(n(7427)),r.register(n(335)),r.register(n(5308)),r.register(n(5912)),r.register(n(2620)),r.register(n(1558)),r.register(n(4547)),r.register(n(2905)),r.register(n(5706)),r.register(n(1402)),r.register(n(4099)),r.register(n(8175)),r.register(n(1718)),r.register(n(8306)),r.register(n(8038)),r.register(n(6485)),r.register(n(5878)),r.register(n(543)),r.register(n(5562)),r.register(n(7007)),r.register(n(1997)),r.register(n(6966)),r.register(n(3019)),r.register(n(23)),r.register(n(3910)),r.register(n(3763)),r.register(n(2964)),r.register(n(5002)),r.register(n(4791)),r.register(n(2763)),r.register(n(1117)),r.register(n(463)),r.register(n(1698)),r.register(n(6146)),r.register(n(2408)),r.register(n(1464)),r.register(n(971)),r.register(n(4713)),r.register(n(70)),r.register(n(5268)),r.register(n(4797)),r.register(n(9128)),r.register(n(1471)),r.register(n(4983)),r.register(n(745)),r.register(n(9058)),r.register(n(2289)),r.register(n(5970)),r.register(n(1092)),r.register(n(6227)),r.register(n(5578)),r.register(n(1496)),r.register(n(6956)),r.register(n(164)),r.register(n(6393)),r.register(n(1459)),r.register(n(7309)),r.register(n(8985)),r.register(n(8545)),r.register(n(3935)),r.register(n(4493)),r.register(n(3171)),r.register(n(6220)),r.register(n(1288)),r.register(n(4340)),r.register(n(5508)),r.register(n(4727)),r.register(n(5456)),r.register(n(4591)),r.register(n(5306)),r.register(n(4559)),r.register(n(2563)),r.register(n(7794)),r.register(n(2132)),r.register(n(8622)),r.register(n(3123)),r.register(n(6181)),r.register(n(4210)),r.register(n(9984)),r.register(n(3791)),r.register(n(2252)),r.register(n(6358)),r.register(n(618)),r.register(n(7680)),r.register(n(5477)),r.register(n(640)),r.register(n(6042)),r.register(n(7473)),r.register(n(4478)),r.register(n(5147)),r.register(n(6580)),r.register(n(7993)),r.register(n(5670)),r.register(n(1972)),r.register(n(6923)),r.register(n(7656)),r.register(n(7881)),r.register(n(267)),r.register(n(61)),r.register(n(9530)),r.register(n(5880)),r.register(n(1269)),r.register(n(5394)),r.register(n(56)),r.register(n(9459)),r.register(n(7459)),r.register(n(5229)),r.register(n(6402)),r.register(n(4867)),r.register(n(4689)),r.register(n(7639)),r.register(n(8297)),r.register(n(6770)),r.register(n(1359)),r.register(n(9683)),r.register(n(1570)),r.register(n(4696)),r.register(n(3571)),r.register(n(913)),r.register(n(6499)),r.register(n(358)),r.register(n(5776)),r.register(n(1242)),r.register(n(2286)),r.register(n(7872)),r.register(n(8004)),r.register(n(497)),r.register(n(3802)),r.register(n(604)),r.register(n(4624)),r.register(n(7545)),r.register(n(1283)),r.register(n(2810)),r.register(n(744)),r.register(n(1126)),r.register(n(8400)),r.register(n(9144)),r.register(n(4485)),r.register(n(4686)),r.register(n(60)),r.register(n(394)),r.register(n(2837)),r.register(n(2831)),r.register(n(5542))},934:(e,t,n)=>{const r=n(3103),i=n(5987);function a(e){let t=r(e),n=Math.pow(2,e);return`\n\n/**\n * Our implementation of QuadTree is non-recursive to avoid GC hit\n * This data structure represent stack of elements\n * which we are trying to insert into quad tree.\n */\nfunction InsertStack () {\n this.stack = [];\n this.popIdx = 0;\n}\n\nInsertStack.prototype = {\n isEmpty: function() {\n return this.popIdx === 0;\n },\n push: function (node, body) {\n var item = this.stack[this.popIdx];\n if (!item) {\n // we are trying to avoid memory pressure: create new element\n // only when absolutely necessary\n this.stack[this.popIdx] = new InsertStackElement(node, body);\n } else {\n item.node = node;\n item.body = body;\n }\n ++this.popIdx;\n },\n pop: function () {\n if (this.popIdx > 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n\n${l(e)}\n${o(e)}\n${c(e)}\n${s(e)}\n\nfunction createQuadTree(options, random) {\n options = options || {};\n options.gravity = typeof options.gravity === 'number' ? options.gravity : -1;\n options.theta = typeof options.theta === 'number' ? options.theta : 0.8;\n\n var gravity = options.gravity;\n var updateQueue = [];\n var insertStack = new InsertStack();\n var theta = options.theta;\n\n var nodesCache = [];\n var currentInCache = 0;\n var root = newNode();\n\n return {\n insertBodies: insertBodies,\n\n /**\n * Gets root node if it is present\n */\n getRoot: function() {\n return root;\n },\n\n updateBodyForce: update,\n\n options: function(newOptions) {\n if (newOptions) {\n if (typeof newOptions.gravity === 'number') {\n gravity = newOptions.gravity;\n }\n if (typeof newOptions.theta === 'number') {\n theta = newOptions.theta;\n }\n\n return this;\n }\n\n return {\n gravity: gravity,\n theta: theta\n };\n }\n };\n\n function newNode() {\n // To avoid pressure on GC we reuse nodes.\n var node = nodesCache[currentInCache];\n if (node) {\n${function(){let e=[];for(let t=0;t {var}max) {var}max = pos.{var};",{indent:6})}\n }\n\n // Makes the bounds square.\n var maxSideLength = -Infinity;\n ${t("if ({var}max - {var}min > maxSideLength) maxSideLength = {var}max - {var}min ;",{indent:4})}\n\n currentInCache = 0;\n root = newNode();\n ${t("root.min_{var} = {var}min;",{indent:4})}\n ${t("root.max_{var} = {var}min + maxSideLength;",{indent:4})}\n\n i = bodies.length - 1;\n if (i >= 0) {\n root.body = bodies[i];\n }\n while (i--) {\n insert(bodies[i], root);\n }\n }\n\n function insert(newBody) {\n insertStack.reset();\n insertStack.push(root, newBody);\n\n while (!insertStack.isEmpty()) {\n var stackItem = insertStack.pop();\n var node = stackItem.node;\n var body = stackItem.body;\n\n if (!node.body) {\n // This is internal node. Update the total mass of the node and center-of-mass.\n ${t("var {var} = body.pos.{var};",{indent:8})}\n node.mass += body.mass;\n ${t("node.mass_{var} += body.mass * {var};",{indent:8})}\n\n // Recursively insert the body in the appropriate quadrant.\n // But first find the appropriate quadrant.\n var quadIdx = 0; // Assume we are in the 0's quad.\n ${t("var min_{var} = node.min_{var};",{indent:8})}\n ${t("var max_{var} = (min_{var} + node.max_{var}) / 2;",{indent:8})}\n\n${function(){let t=[],n=Array(9).join(" ");for(let r=0;r max_${i(r)}) {`),t.push(n+` quadIdx = quadIdx + ${Math.pow(2,r)};`),t.push(n+` min_${i(r)} = max_${i(r)};`),t.push(n+` max_${i(r)} = node.max_${i(r)};`),t.push(n+"}");return t.join("\n")}()}\n\n var child = getChild(node, quadIdx);\n\n if (!child) {\n // The node is internal but this quadrant is not taken. Add\n // subnode to it.\n child = newNode();\n ${t("child.min_{var} = min_{var};",{indent:10})}\n ${t("child.max_{var} = max_{var};",{indent:10})}\n child.body = body;\n\n setChild(node, quadIdx, child);\n } else {\n // continue searching in this quadrant.\n insertStack.push(child, body);\n }\n } else {\n // We are trying to add to the leaf node.\n // We have to convert current leaf into internal node\n // and continue adding two nodes.\n var oldBody = node.body;\n node.body = null; // internal nodes do not cary bodies\n\n if (isSamePosition(oldBody.pos, body.pos)) {\n // Prevent infinite subdivision by bumping one node\n // anywhere in this quadrant\n var retriesCount = 3;\n do {\n var offset = random.nextDouble();\n ${t("var d{var} = (node.max_{var} - node.min_{var}) * offset;",{indent:12})}\n\n ${t("oldBody.pos.{var} = node.min_{var} + d{var};",{indent:12})}\n retriesCount -= 1;\n // Make sure we don't bump it out of the box. If we do, next iteration should fix it\n } while (retriesCount > 0 && isSamePosition(oldBody.pos, body.pos));\n\n if (retriesCount === 0 && isSamePosition(oldBody.pos, body.pos)) {\n // This is very bad, we ran out of precision.\n // if we do not return from the method we'll get into\n // infinite loop here. So we sacrifice correctness of layout, and keep the app running\n // Next layout iteration should get larger bounding box in the first step and fix this\n return;\n }\n }\n // Next iteration should subdivide node further.\n insertStack.push(node, oldBody);\n insertStack.push(node, body);\n }\n }\n }\n}\nreturn createQuadTree;\n\n`}function o(e){let t=r(e);return`\n function isSamePosition(point1, point2) {\n ${t("var d{var} = Math.abs(point1.{var} - point2.{var});",{indent:2})}\n \n return ${t("d{var} < 1e-8",{join:" && "})};\n } \n`}function s(e){var t=Math.pow(2,e);return`\nfunction setChild(node, idx, child) {\n ${function(){let e=[];for(let n=0;n 0) {\n return this.stack[--this.popIdx];\n }\n },\n reset: function () {\n this.popIdx = 0;\n }\n};\n\nfunction InsertStackElement(node, body) {\n this.node = node; // QuadTree node\n this.body = body; // physical body which needs to be inserted to node\n}\n"}e.exports=function(e){let t=a(e);return new Function(t)()},e.exports.generateQuadTreeFunctionBody=a,e.exports.getInsertStackCode=u,e.exports.getQuadNodeCode=l,e.exports.isSamePosition=o,e.exports.getChildBodyCode=c,e.exports.setChildBodyCode=s},971:e=>{"use strict";function t(e){e.languages.nix={comment:{pattern:/\/\*[\s\S]*?\*\/|#.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/,greedy:!0,inside:{interpolation:{pattern:/(^|(?:^|(?!'').)[^\\])\$\{(?:[^{}]|\{[^}]*\})*\}/,lookbehind:!0,inside:null}}},url:[/\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/,{pattern:/([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/,lookbehind:!0}],antiquotation:{pattern:/\$(?=\{)/,alias:"important"},number:/\b\d+\b/,keyword:/\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/,function:/\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:Tarball|url)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/,punctuation:/[{}()[\].,:;]/},e.languages.nix.string.inside.interpolation.inside=e.languages.nix}e.exports=t,t.displayName="nix",t.aliases=[]},993:(e,t,n)=>{"use strict";var r=n(6326),i=n(334),a=n(9828);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n
",i}image(e,t,n){const r=Av(e);if(null===r)return n;let i=`${n}0&&"paragraph"===n.tokens[0].type?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&"text"===n.tokens[0].tokens[0].type&&(n.tokens[0].tokens[0].text=e+" "+n.tokens[0].tokens[0].text)):n.tokens.unshift({type:"text",text:e+" "}):s+=e+" "}s+=this.parse(n.tokens,a),o+=this.renderer.listitem(s,i,!!r)}n+=this.renderer.list(o,t,r);continue}case"html":{const e=i;n+=this.renderer.html(e.text,e.block);continue}case"paragraph":{const e=i;n+=this.renderer.paragraph(this.parseInline(e.tokens));continue}case"text":{let a=i,o=a.tokens?this.parseInline(a.tokens):a.text;for(;r+1{n=n.concat(this.walkTokens(e[r],t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){const t=this.defaults.renderer||new Lv(this.defaults);for(const n in e.renderer){const r=e.renderer[n],i=n,a=t[i];t[i]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=a.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new Ov(this.defaults);for(const n in e.tokenizer){const r=e.tokenizer[n],i=n,a=t[i];t[i]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new Uv;for(const n in e.hooks){const r=e.hooks[n],i=n,a=t[i];Uv.passThroughHooks.has(n)?t[i]=e=>{if(this.defaults.async)return Promise.resolve(r.call(t,e)).then(e=>a.call(t,e));const n=r.call(t,e);return a.call(t,n)}:t[i]=(...e)=>{let n=r.apply(t,e);return!1===n&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}#e(e,t){return(n,r)=>{const i={...r},a={...this.defaults,...i};!0===this.defaults.async&&!1===i.async&&(a.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),a.async=!0);const o=this.#t(!!a.silent,!!a.async);if(null==n)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof n)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(a.hooks&&(a.hooks.options=a),a.async)return Promise.resolve(a.hooks?a.hooks.preprocess(n):n).then(t=>e(t,a)).then(e=>a.walkTokens?Promise.all(this.walkTokens(e,a.walkTokens)).then(()=>e):e).then(e=>t(e,a)).then(e=>a.hooks?a.hooks.postprocess(e):e).catch(o);try{a.hooks&&(n=a.hooks.preprocess(n));const r=e(n,a);a.walkTokens&&this.walkTokens(r,a.walkTokens);let i=t(r,a);return a.hooks&&(i=a.hooks.postprocess(i)),i}catch(e){return o(e)}}}#t(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="

An error occurred:

"+Ev(n.message+"",!0)+"
";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Bv(e,t){return jv.parse(e,t)}function zv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return function(e){if(0===e.length||1===e.length)return e;var t,n,r=e.join(".");return Wv[r]||(Wv[r]=0===(n=(t=e).length)||1===n?t:2===n?[t[0],t[1],"".concat(t[0],".").concat(t[1]),"".concat(t[1],".").concat(t[0])]:3===n?[t[0],t[1],t[2],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0])]:n>=4?[t[0],t[1],t[2],t[3],"".concat(t[0],".").concat(t[1]),"".concat(t[0],".").concat(t[2]),"".concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[0]),"".concat(t[1],".").concat(t[2]),"".concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[1]),"".concat(t[2],".").concat(t[3]),"".concat(t[3],".").concat(t[0]),"".concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[0]),"".concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[0],".").concat(t[1],".").concat(t[2],".").concat(t[3]),"".concat(t[0],".").concat(t[1],".").concat(t[3],".").concat(t[2]),"".concat(t[0],".").concat(t[2],".").concat(t[1],".").concat(t[3]),"".concat(t[0],".").concat(t[2],".").concat(t[3],".").concat(t[1]),"".concat(t[0],".").concat(t[3],".").concat(t[1],".").concat(t[2]),"".concat(t[0],".").concat(t[3],".").concat(t[2],".").concat(t[1]),"".concat(t[1],".").concat(t[0],".").concat(t[2],".").concat(t[3]),"".concat(t[1],".").concat(t[0],".").concat(t[3],".").concat(t[2]),"".concat(t[1],".").concat(t[2],".").concat(t[0],".").concat(t[3]),"".concat(t[1],".").concat(t[2],".").concat(t[3],".").concat(t[0]),"".concat(t[1],".").concat(t[3],".").concat(t[0],".").concat(t[2]),"".concat(t[1],".").concat(t[3],".").concat(t[2],".").concat(t[0]),"".concat(t[2],".").concat(t[0],".").concat(t[1],".").concat(t[3]),"".concat(t[2],".").concat(t[0],".").concat(t[3],".").concat(t[1]),"".concat(t[2],".").concat(t[1],".").concat(t[0],".").concat(t[3]),"".concat(t[2],".").concat(t[1],".").concat(t[3],".").concat(t[0]),"".concat(t[2],".").concat(t[3],".").concat(t[0],".").concat(t[1]),"".concat(t[2],".").concat(t[3],".").concat(t[1],".").concat(t[0]),"".concat(t[3],".").concat(t[0],".").concat(t[1],".").concat(t[2]),"".concat(t[3],".").concat(t[0],".").concat(t[2],".").concat(t[1]),"".concat(t[3],".").concat(t[1],".").concat(t[0],".").concat(t[2]),"".concat(t[3],".").concat(t[1],".").concat(t[2],".").concat(t[0]),"".concat(t[3],".").concat(t[2],".").concat(t[0],".").concat(t[1]),"".concat(t[3],".").concat(t[2],".").concat(t[1],".").concat(t[0])]:void 0),Wv[r]}(e.filter(function(e){return"token"!==e})).reduce(function(e,t){return Vv(Vv({},e),n[t])},t)}function Xv(e){return e.join(" ")}function Yv(t){var n=t.node,r=t.stylesheet,i=t.style,a=void 0===i?{}:i,o=t.useInlineStyles,s=t.key,c=n.properties,l=n.type,u=n.tagName,f=n.value;if("text"===l)return f;if(u){var h,d=function(e,t){var n=0;return function(r){return n+=1,r.map(function(r,i){return Yv({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(i)})})}}(r,o);if(o){var p=Object.keys(r).reduce(function(e,t){return t.split(".").forEach(function(t){e.includes(t)||e.push(t)}),e},[]),g=c.className&&c.className.includes("token")?["token"]:[],b=c.className&&g.concat(c.className.filter(function(e){return!p.includes(e)}));h=Vv(Vv({},c),{},{className:Xv(b)||void 0,style:qv(c.className,Object.assign({},c.style,a),r)})}else h=Vv(Vv({},c),{},{className:Xv(c.className)});var m=d(n.children);return e.createElement(u,(0,we.A)({key:s},h),m)}}var Kv=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function Zv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qv(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r2&&void 0!==arguments[2]?arguments[2]:[];return t||l.length>0?function(e,t){return ry({children:e,lineNumber:t,lineNumberStyle:s,largestLineNumber:o,showInlineLineNumbers:i,lineProps:n,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:r,wrapLongLines:c})}(e,a,l):function(e,t){if(r&&t&&i){var n=ny(s,t,o);e.unshift(ty(t,n))}return e}(e,a)}for(var g=function(){var e=u[d],t=e.children[0].value;if(t.match(Jv)){var n=t.split("\n");n.forEach(function(t,i){var o=r&&f.length+a,s={type:"text",value:"".concat(t,"\n")};if(0===i){var c=p(u.slice(h+1,d).concat(ry({children:[s],className:e.properties.className})),o);f.push(c)}else if(i===n.length-1){var l=u[d+1]&&u[d+1].children&&u[d+1].children[0],g={type:"text",value:"".concat(t)};if(l){var b=ry({children:[g],className:e.properties.className});u.splice(d+1,0,b)}else{var m=p([g],o,e.properties.className);f.push(m)}}else{var w=p([s],o,e.properties.className);f.push(w)}}),h=d}d++};d code[class*="language-"]':{background:"#f5f2f0",padding:".1em",borderRadius:".3em",whiteSpace:"normal"},comment:{color:"slategray"},prolog:{color:"slategray"},doctype:{color:"slategray"},cdata:{color:"slategray"},punctuation:{color:"#999"},namespace:{Opacity:".7"},property:{color:"#905"},tag:{color:"#905"},boolean:{color:"#905"},number:{color:"#905"},constant:{color:"#905"},symbol:{color:"#905"},deleted:{color:"#905"},selector:{color:"#690"},"attr-name":{color:"#690"},string:{color:"#690"},char:{color:"#690"},builtin:{color:"#690"},inserted:{color:"#690"},operator:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},entity:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)",cursor:"help"},url:{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".language-css .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},".style .token.string":{color:"#9a6e3a",background:"hsla(0, 0%, 100%, .5)"},atrule:{color:"#07a"},"attr-value":{color:"#07a"},keyword:{color:"#07a"},function:{color:"#DD4A68"},"class-name":{color:"#DD4A68"},regex:{color:"#e90"},important:{color:"#e90",fontWeight:"bold"},variable:{color:"#e90"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"}},function(t){var n=t.language,r=t.children,i=t.style,a=void 0===i?ly:i,o=t.customStyle,s=void 0===o?{}:o,c=t.codeTagProps,l=void 0===c?{className:n?"language-".concat(n):void 0,style:Qv(Qv({},a['code[class*="language-"]']),a['code[class*="language-'.concat(n,'"]')])}:c,u=t.useInlineStyles,f=void 0===u||u,h=t.showLineNumbers,d=void 0!==h&&h,p=t.showInlineLineNumbers,g=void 0===p||p,b=t.startingLineNumber,m=void 0===b?1:b,w=t.lineNumberContainerStyle,v=t.lineNumberStyle,y=void 0===v?{}:v,E=t.wrapLines,_=t.wrapLongLines,S=void 0!==_&&_,x=t.lineProps,T=void 0===x?{}:x,A=t.renderer,k=t.PreTag,C=void 0===k?"pre":k,M=t.CodeTag,I=void 0===M?"code":M,O=t.code,N=void 0===O?(Array.isArray(r)?r[0]:r)||"":O,R=t.astGenerator,P=function(e,t){if(null==e)return{};var n,r,i=$e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,Kv);R=R||cy;var L=d?e.createElement(ey,{containerStyle:w,codeStyle:l.style||{},numberStyle:y,startingLineNumber:m,codeString:N}):null,D=a.hljs||a['pre[class*="language-"]']||{backgroundColor:"#fff"},F=sy(R)?"hljs":"prismjs",U=f?Object.assign({},P,{style:Object.assign({},D,s)}):Object.assign({},P,{className:P.className?"".concat(F," ").concat(P.className):F,style:Object.assign({},s)});if(l.style=Qv(Qv({},l.style),{},S?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"}),!R)return e.createElement(C,U,L,e.createElement(I,l,N));(void 0===E&&A||S)&&(E=!0),A=A||oy;var j=[{type:"text",value:N}],B=function(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(sy(t)){var a=function(e,t){return-1!==e.listLanguages().indexOf(t)}(t,n);return"text"===n?{value:i,language:"text"}:a?t.highlight(n,r):t.highlightAuto(r)}try{return n&&"text"!==n?{value:t.highlight(r,n)}:{value:i}}catch(e){return{value:i}}}({astGenerator:R,language:n,code:N,defaultCodeValue:j});null===B.language&&(B.value=j);var z=ay(B,E,T,d,g,m,B.value.length+m,y,S);return e.createElement(C,U,e.createElement(I,l,!g&&L,A({rows:z,stylesheet:a,useInlineStyles:f})))});fy.supportedLanguages=["abap","abnf","actionscript","ada","agda","al","antlr4","apacheconf","apex","apl","applescript","aql","arduino","arff","asciidoc","asm6502","asmatmel","aspnet","autohotkey","autoit","avisynth","avro-idl","bash","basic","batch","bbcode","bicep","birb","bison","bnf","brainfuck","brightscript","bro","bsl","c","cfscript","chaiscript","cil","clike","clojure","cmake","cobol","coffeescript","concurnas","coq","cpp","crystal","csharp","cshtml","csp","css-extras","css","csv","cypher","d","dart","dataweave","dax","dhall","diff","django","dns-zone-file","docker","dot","ebnf","editorconfig","eiffel","ejs","elixir","elm","erb","erlang","etlua","excel-formula","factor","false","firestore-security-rules","flow","fortran","fsharp","ftl","gap","gcode","gdscript","gedcom","gherkin","git","glsl","gml","gn","go-module","go","graphql","groovy","haml","handlebars","haskell","haxe","hcl","hlsl","hoon","hpkp","hsts","http","ichigojam","icon","icu-message-format","idris","iecst","ignore","inform7","ini","io","j","java","javadoc","javadoclike","javascript","javastacktrace","jexl","jolie","jq","js-extras","js-templates","jsdoc","json","json5","jsonp","jsstacktrace","jsx","julia","keepalived","keyman","kotlin","kumir","kusto","latex","latte","less","lilypond","liquid","lisp","livescript","llvm","log","lolcode","lua","magma","makefile","markdown","markup-templating","markup","matlab","maxscript","mel","mermaid","mizar","mongodb","monkey","moonscript","n1ql","n4js","nand2tetris-hdl","naniscript","nasm","neon","nevod","nginx","nim","nix","nsis","objectivec","ocaml","opencl","openqasm","oz","parigp","parser","pascal","pascaligo","pcaxis","peoplecode","perl","php-extras","php","phpdoc","plsql","powerquery","powershell","processing","prolog","promql","properties","protobuf","psl","pug","puppet","pure","purebasic","purescript","python","q","qml","qore","qsharp","r","racket","reason","regex","rego","renpy","rest","rip","roboconf","robotframework","ruby","rust","sas","sass","scala","scheme","scss","shell-session","smali","smalltalk","smarty","sml","solidity","solution-file","soy","sparql","splunk-spl","sqf","sql","squirrel","stan","stylus","swift","systemd","t4-cs","t4-templating","t4-vb","tap","tcl","textile","toml","tremor","tsx","tt2","turtle","twig","typescript","typoscript","unrealscript","uorazor","uri","v","vala","vbnet","velocity","verilog","vhdl","vim","visual-basic","warpscript","wasm","web-idl","wiki","wolfram","wren","xeora","xml-doc","xojo","xquery","yaml","yang","zig"];const hy=fy,dy={'code[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]':{background:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)",fontFamily:'"Fira Code", "Fira Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"2",OTabSize:"2",tabSize:"2",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:"0.5em 0",overflow:"auto",borderRadius:"0.3em"},'code[class*="language-"]::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::-moz-selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"]::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'code[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},'pre[class*="language-"] *::selection':{background:"hsl(230, 1%, 90%)",color:"inherit"},':not(pre) > code[class*="language-"]':{padding:"0.2em 0.3em",borderRadius:"0.3em",whiteSpace:"normal"},comment:{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},prolog:{color:"hsl(230, 4%, 64%)"},cdata:{color:"hsl(230, 4%, 64%)"},doctype:{color:"hsl(230, 8%, 24%)"},punctuation:{color:"hsl(230, 8%, 24%)"},entity:{color:"hsl(230, 8%, 24%)",cursor:"help"},"attr-name":{color:"hsl(35, 99%, 36%)"},"class-name":{color:"hsl(35, 99%, 36%)"},boolean:{color:"hsl(35, 99%, 36%)"},constant:{color:"hsl(35, 99%, 36%)"},number:{color:"hsl(35, 99%, 36%)"},atrule:{color:"hsl(35, 99%, 36%)"},keyword:{color:"hsl(301, 63%, 40%)"},property:{color:"hsl(5, 74%, 59%)"},tag:{color:"hsl(5, 74%, 59%)"},symbol:{color:"hsl(5, 74%, 59%)"},deleted:{color:"hsl(5, 74%, 59%)"},important:{color:"hsl(5, 74%, 59%)"},selector:{color:"hsl(119, 34%, 47%)"},string:{color:"hsl(119, 34%, 47%)"},char:{color:"hsl(119, 34%, 47%)"},builtin:{color:"hsl(119, 34%, 47%)"},inserted:{color:"hsl(119, 34%, 47%)"},regex:{color:"hsl(119, 34%, 47%)"},"attr-value":{color:"hsl(119, 34%, 47%)"},"attr-value > .token.punctuation":{color:"hsl(119, 34%, 47%)"},variable:{color:"hsl(221, 87%, 60%)"},operator:{color:"hsl(221, 87%, 60%)"},function:{color:"hsl(221, 87%, 60%)"},url:{color:"hsl(198, 99%, 37%)"},"attr-value > .token.punctuation.attr-equals":{color:"hsl(230, 8%, 24%)"},"special-attr > .token.attr-value > .token.value.css":{color:"hsl(230, 8%, 24%)"},".language-css .token.selector":{color:"hsl(5, 74%, 59%)"},".language-css .token.property":{color:"hsl(230, 8%, 24%)"},".language-css .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.function":{color:"hsl(198, 99%, 37%)"},".language-css .token.url > .token.string.url":{color:"hsl(119, 34%, 47%)"},".language-css .token.important":{color:"hsl(301, 63%, 40%)"},".language-css .token.atrule .token.rule":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.operator":{color:"hsl(301, 63%, 40%)"},".language-javascript .token.template-string > .token.interpolation > .token.interpolation-punctuation.punctuation":{color:"hsl(344, 84%, 43%)"},".language-json .token.operator":{color:"hsl(230, 8%, 24%)"},".language-json .token.null.keyword":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.url":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.operator":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url-reference.url > .token.string":{color:"hsl(230, 8%, 24%)"},".language-markdown .token.url > .token.content":{color:"hsl(221, 87%, 60%)"},".language-markdown .token.url > .token.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.url-reference.url":{color:"hsl(198, 99%, 37%)"},".language-markdown .token.blockquote.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.hr.punctuation":{color:"hsl(230, 4%, 64%)",fontStyle:"italic"},".language-markdown .token.code-snippet":{color:"hsl(119, 34%, 47%)"},".language-markdown .token.bold .token.content":{color:"hsl(35, 99%, 36%)"},".language-markdown .token.italic .token.content":{color:"hsl(301, 63%, 40%)"},".language-markdown .token.strike .token.content":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.strike .token.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.list.punctuation":{color:"hsl(5, 74%, 59%)"},".language-markdown .token.title.important > .token.punctuation":{color:"hsl(5, 74%, 59%)"},bold:{fontWeight:"bold"},italic:{fontStyle:"italic"},namespace:{Opacity:"0.8"},"token.tab:not(:empty):before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.cr:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.lf:before":{color:"hsla(230, 8%, 24%, 0.2)"},"token.space:before":{color:"hsla(230, 8%, 24%, 0.2)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item":{marginRight:"0.4em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 6%, 44%)",padding:"0.1em 0.4em",borderRadius:"0.3em"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > button:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > a:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:hover":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},"div.code-toolbar > .toolbar.toolbar > .toolbar-item > span:focus":{background:"hsl(230, 1%, 78%)",color:"hsl(230, 8%, 24%)"},".line-highlight.line-highlight":{background:"hsla(230, 8%, 24%, 0.05)"},".line-highlight.line-highlight:before":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},".line-highlight.line-highlight[data-end]:after":{background:"hsl(230, 1%, 90%)",color:"hsl(230, 8%, 24%)",padding:"0.1em 0.6em",borderRadius:"0.3em",boxShadow:"0 2px 0 0 rgba(0, 0, 0, 0.2)"},"pre[id].linkable-line-numbers.linkable-line-numbers span.line-numbers-rows > span:hover:before":{backgroundColor:"hsla(230, 8%, 24%, 0.05)"},".line-numbers.line-numbers .line-numbers-rows":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".command-line .command-line-prompt":{borderRightColor:"hsla(230, 8%, 24%, 0.2)"},".line-numbers .line-numbers-rows > span:before":{color:"hsl(230, 1%, 62%)"},".command-line .command-line-prompt > span:before":{color:"hsl(230, 1%, 62%)"},".rainbow-braces .token.token.punctuation.brace-level-1":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-5":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-9":{color:"hsl(5, 74%, 59%)"},".rainbow-braces .token.token.punctuation.brace-level-2":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-6":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-10":{color:"hsl(119, 34%, 47%)"},".rainbow-braces .token.token.punctuation.brace-level-3":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-7":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-11":{color:"hsl(221, 87%, 60%)"},".rainbow-braces .token.token.punctuation.brace-level-4":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-8":{color:"hsl(301, 63%, 40%)"},".rainbow-braces .token.token.punctuation.brace-level-12":{color:"hsl(301, 63%, 40%)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)":{backgroundColor:"hsla(353, 100%, 66%, 0.15)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix)::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre > code.diff-highlight .token.token.deleted:not(.prefix) *::selection":{backgroundColor:"hsla(353, 95%, 66%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)":{backgroundColor:"hsla(137, 100%, 55%, 0.15)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::-moz-selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre.diff-highlight > code .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix)::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},"pre > code.diff-highlight .token.token.inserted:not(.prefix) *::selection":{backgroundColor:"hsla(135, 73%, 55%, 0.25)"},".prism-previewer.prism-previewer:before":{borderColor:"hsl(0, 0, 95%)"},".prism-previewer-gradient.prism-previewer-gradient div":{borderColor:"hsl(0, 0, 95%)",borderRadius:"0.3em"},".prism-previewer-color.prism-previewer-color:before":{borderRadius:"0.3em"},".prism-previewer-easing.prism-previewer-easing:before":{borderRadius:"0.3em"},".prism-previewer.prism-previewer:after":{borderTopColor:"hsl(0, 0, 95%)"},".prism-previewer-flipped.prism-previewer-flipped.after":{borderBottomColor:"hsl(0, 0, 95%)"},".prism-previewer-angle.prism-previewer-angle:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-time.prism-previewer-time:before":{background:"hsl(0, 0%, 100%)"},".prism-previewer-easing.prism-previewer-easing":{background:"hsl(0, 0%, 100%)"},".prism-previewer-angle.prism-previewer-angle circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-time.prism-previewer-time circle":{stroke:"hsl(230, 8%, 24%)",strokeOpacity:"1"},".prism-previewer-easing.prism-previewer-easing circle":{stroke:"hsl(230, 8%, 24%)",fill:"transparent"},".prism-previewer-easing.prism-previewer-easing path":{stroke:"hsl(230, 8%, 24%)"},".prism-previewer-easing.prism-previewer-easing line":{stroke:"hsl(230, 8%, 24%)"}};function py(t){var n=t.children,r=t.className,i=t.content,a=Pf("sub header",r),o=Gf(py,t),s=Vf(py,t);return e.createElement(s,(0,we.A)({},o,{className:a}),Fp(n)?i:n)}py.handledProps=["as","children","className","content"],py.propTypes={},py.create=ig(py,function(e){return{content:e}});const gy=py;function by(t){var n=t.children,r=t.className,i=t.content,a=Pf("content",r),o=Gf(by,t),s=Vf(by,t);return e.createElement(s,(0,we.A)({},o,{className:a}),Fp(n)?i:n)}by.handledProps=["as","children","className","content"],by.propTypes={};const my=by;function wy(t){var n=t.attached,r=t.block,i=t.children,a=t.className,o=t.color,s=t.content,c=t.disabled,l=t.dividing,u=t.floated,f=t.icon,h=t.image,d=t.inverted,p=t.size,g=t.sub,b=t.subheader,m=t.textAlign,w=Pf("ui",o,p,Ff(r,"block"),Ff(c,"disabled"),Ff(l,"dividing"),Uf(u,"floated"),Ff(!0===f,"icon"),Ff(!0===h,"image"),Ff(d,"inverted"),Ff(g,"sub"),jf(n,"attached"),zf(m),"header",a),v=Gf(wy,t),y=Vf(wy,t);if(!Fp(i))return e.createElement(y,(0,we.A)({},v,{className:w}),i);var E=xg.create(f,{autoGenerateKey:!1}),_=Uw.create(h,{autoGenerateKey:!1}),S=gy.create(b,{autoGenerateKey:!1});return E||_?e.createElement(y,(0,we.A)({},v,{className:w}),E||_,(s||S)&&e.createElement(my,null,s,S)):e.createElement(y,(0,we.A)({},v,{className:w}),s,S)}wy.handledProps=["as","attached","block","children","className","color","content","disabled","dividing","floated","icon","image","inverted","size","sub","subheader","textAlign"],wy.propTypes={},wy.Content=my,wy.Subheader=gy;const vy=wy;function yy(t){var n=t.children,r=t.className,i=t.content,a=t.fluid,o=t.text,s=t.textAlign,c=Pf("ui",Ff(o,"text"),Ff(a,"fluid"),zf(s),"container",r),l=Gf(yy,t),u=Vf(yy,t);return e.createElement(u,(0,we.A)({},l,{className:c}),Fp(n)?i:n)}yy.handledProps=["as","children","className","content","fluid","text","textAlign"],yy.propTypes={};const Ey=yy;var _y=Object.prototype.hasOwnProperty;const Sy=function(e,t,n){var r=e[t];_y.call(e,t)&&qf(r,n)&&(void 0!==n||t in e)||function(e,t,n){"__proto__"==t&&pg?pg(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}(e,t,n)},xy=function(e,t,n,r){if(!lh(e))return e;for(var i=-1,a=(t=yp(t,e)).length,o=a-1,s=e;null!=s&&++i=200&&(a=Fh,o=!1,t=new Dh(t));e:for(;++i-1?r[i?e[a]:a]:void 0});var $y;var Hy=Object.prototype.hasOwnProperty;const Gy=function(e){if(null==e)return!0;if(kd(e)&&(Vh(e)||"string"==typeof e||"function"==typeof e.splice||sd(e)||wd(e)||rd(e)))return!e.length;var t=Wd(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(_d(e))return!Ad(e).length;for(var n in e)if(Hy.call(e,n))return!1;return!0},Vy=kp("length");var Wy="\\ud800-\\udfff",qy="["+Wy+"]",Xy="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Yy="\\ud83c[\\udffb-\\udfff]",Ky="[^"+Wy+"]",Zy="(?:\\ud83c[\\udde6-\\uddff]){2}",Qy="[\\ud800-\\udbff][\\udc00-\\udfff]",Jy="(?:"+Xy+"|"+Yy+")?",eE="[\\ufe0e\\ufe0f]?",tE=eE+Jy+"(?:\\u200d(?:"+[Ky,Zy,Qy].join("|")+")"+eE+Jy+")*",nE="(?:"+[Ky+Xy+"?",Xy,Zy,Qy,qy].join("|")+")",rE=RegExp(Yy+"(?="+Yy+")|"+nE+tE,"g");const iE=function(e){return Xb(e)?function(e){for(var t=rE.lastIndex=0;rE.test(e);)++t;return t}(e):Vy(e)};var aE=th?th.isConcatSpreadable:void 0;const oE=function(e){return Vh(e)||rd(e)||!!(aE&&e&&e[aE])},sE=function e(t,n,r,i,a){var o=-1,s=t.length;for(r||(r=oE),a||(a=[]);++o0&&r(c)?n>1?e(c,n-1,r,i,a):Gh(a,c):i||(a[a.length]=c)}return a};const cE=vg(function(e,t){return Fy(e)?Dy(e,sE(t,1,Fy,!0)):[]}),lE=vg(function(e){return Xp(sE(e,1,Fy,!0))}),uE=function(e,t){return function(e,t,n){for(var r=-1,i=t.length,a={};++r=u}),u>=h.length-1&&(t=d[d.length-1]);else{var g=By(h,["value",f]);t=fw(d,g)?g:void 0}return(!t||t<0)&&(t=d[0]),t}var UE=function(e,t){return Bp(e)?t:e},jE=function(e){return e?e.map(function(e){return dE(e,["key","value"])}):e};function BE(t){var n=t.flag,r=t.image,i=t.text;return uh(i)?i:{content:e.createElement(e.Fragment,null,mE.create(n),Uw.create(r),i)}}var zE=function(t){function n(){for(var n,r=arguments.length,i=new Array(r),a=0;a=r||1===r?n.open(e):yg(n.searchRef.current,"focus")},n.handleIconClick=function(e){var t=n.props.clearable,r=n.hasValue();yg(n.props,"onClick",e,n.props),e.stopPropagation(),t&&r?n.clearValue(e):n.toggle(e)},n.handleItemClick=function(e,t){var r=n.props,i=r.multiple,a=r.search,o=n.state.value,s=t.value;if(e.stopPropagation(),(i||t.disabled)&&e.nativeEvent.stopImmediatePropagation(),!t.disabled){var c=t["data-additional"],l=i?lE(n.state.value,[s]):s;(i?!!cE(l,o).length:l!==o)&&(n.setState({value:l}),n.handleChange(e,l)),n.clearSearchQuery(),yg(a?n.searchRef.current:n.ref.current,"focus"),n.closeOnChange(e),c&&yg(n.props,"onAddItem",e,(0,we.A)({},n.props,{value:s}))}},n.handleFocus=function(e){n.state.focus||(yg(n.props,"onFocus",e,n.props),n.setState({focus:!0}))},n.handleBlur=function(e){var t=Sp(e,"currentTarget");if(!t||!t.contains(document.activeElement)){var r=n.props,i=r.closeOnBlur,a=r.multiple,o=r.selectOnBlur;n.isMouseDown||(yg(n.props,"onBlur",e,n.props),o&&!a&&(n.makeSelectedItemActive(e,n.state.selectedIndex),i&&n.close()),n.setState({focus:!1}),n.clearSearchQuery())}},n.handleSearchChange=function(e,t){var r=t.value;e.stopPropagation();var i=n.props.minCharacters,a=n.state.open,o=r;yg(n.props,"onSearchChange",e,(0,we.A)({},n.props,{searchQuery:o})),n.setState({searchQuery:o,selectedIndex:0}),!a&&o.length>=i?n.open():a&&1!==i&&o.lengthi||a<0)?a=t:a>i?a=0:a<0&&(a=i),r[a].disabled?n.getSelectedIndexAfterMove(e,a):a}},n.handleIconOverrides=function(e){var t=n.props.clearable;return{className:Pf(t&&n.hasValue()&&"clear",e.className),onClick:function(t){yg(e,"onClick",t,e),n.handleIconClick(t)}}},n.clearValue=function(e){var t=n.props.multiple?[]:"";n.setState({value:t}),n.handleChange(e,t)},n.computeSearchInputTabIndex=function(){var e=n.props,t=e.disabled,r=e.tabIndex;return Bp(r)?t?-1:0:r},n.computeSearchInputWidth=function(){var e=n.state.searchQuery;if(n.sizerRef.current&&e){n.sizerRef.current.style.display="inline",n.sizerRef.current.textContent=e;var t=Math.ceil(n.sizerRef.current.getBoundingClientRect().width);return n.sizerRef.current.style.removeProperty("display"),t}},n.computeTabIndex=function(){var e=n.props,t=e.disabled,r=e.search,i=e.tabIndex;if(!r)return t?-1:Bp(i)?0:i},n.handleSearchInputOverrides=function(e){return{onChange:function(t,r){yg(e,"onChange",t,r),n.handleSearchChange(t,r)}}},n.hasValue=function(){var e=n.props.multiple,t=n.state.value;return e?!Gy(t):!Bp(t)&&""!==t},n.scrollSelectedItemIntoView=function(){if(n.ref.current){var e=n.ref.current.querySelector(".menu.visible");if(e){var t=e.querySelector(".item.selected");if(t){var r=t.offsetTope.scrollTop+e.clientHeight;r?e.scrollTop=t.offsetTop:i&&(e.scrollTop=t.offsetTop+t.clientHeight-e.clientHeight)}}}},n.setOpenDirection=function(){if(n.ref.current){var e=n.ref.current.querySelector(".menu.visible");if(e){var t=n.ref.current.getBoundingClientRect(),r=e.clientHeight,i=document.documentElement.clientHeight-t.top-t.height-r,a=t.top-r,o=i<0&&a>i;!o!=!n.state.upward&&n.setState({upward:o})}}},n.open=function(e,t){void 0===e&&(e=null),void 0===t&&(t=!0);var r=n.props,i=r.disabled,a=r.search;i||(a&&yg(n.searchRef.current,"focus"),yg(n.props,"onOpen",e,n.props),t&&n.setState({open:!0}),n.scrollSelectedItemIntoView())},n.close=function(e,t){void 0===t&&(t=n.handleClose),n.state.open&&(yg(n.props,"onClose",e,n.props),n.setState({open:!1},t))},n.handleClose=function(){var e=document.activeElement===n.searchRef.current;!e&&n.ref.current&&n.ref.current.blur();var t=document.activeElement===n.ref.current,r=e||t;n.setState({focus:r})},n.toggle=function(e){return n.state.open?n.close(e):n.open(e)},n.renderText=function(){var e,t=n.props,r=t.multiple,i=t.placeholder,a=t.search,o=t.text,s=n.state,c=s.searchQuery,l=s.selectedIndex,u=s.value,f=s.open,h=n.hasValue(),d=Pf(i&&!h&&"default","text",a&&c&&"filtered"),p=i;return o?p=o:f&&!r?e=n.getSelectedItem(l):h&&(e=n.getItemByValue(u)),ME.create(e?BE(e):p,{defaultProps:{className:d}})},n.renderSearchInput=function(){var t=n.props,r=t.search,i=t.searchInput,a=n.state.searchQuery;return r&&e.createElement(sw,{innerRef:n.searchRef},kE.create(i,{defaultProps:{style:{width:n.computeSearchInputWidth()},tabIndex:n.computeSearchInputTabIndex(),value:a},overrideProps:n.handleSearchInputOverrides}))},n.renderSearchSizer=function(){var t=n.props,r=t.search,i=t.multiple;return r&&i&&e.createElement("span",{className:"sizer",ref:n.sizerRef})},n.renderLabels=function(){var e=n.props,t=e.multiple,r=e.renderLabel,i=n.state,a=i.selectedLabel,o=i.value;if(t&&!Gy(o)){var s=Ig(o,n.getItemByValue);return Ig(function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t1?n-1:0),i=1;i{const{apiUrl:t}=jg(),[n,r]=(0,e.useState)(!1),[i,a]=(0,e.useState)([]),[o,s]=(0,e.useState)(""),[c,l]=(0,e.useState)({term:"",error:""}),[u,f]=(0,e.useState)(""),[h,d]=(0,e.useState)(""),p=i.length>0,g=(0,e.useRef)(null),b=(0,e.useRef)(null),[m,w]=(0,e.useState)(!1),v=(0,e.useRef)(!1);return(0,e.useEffect)(()=>{const e=b.current;if(!e)return;const t=()=>{const t=e.scrollHeight-e.scrollTop-e.clientHeight<64;w(!t)};return e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)},[]),(0,e.useEffect)(()=>{const e=b.current;if(!e)return;const t=e.scrollHeight-e.scrollTop-e.clientHeight<120;(v.current||t)&&(e.scrollTop=e.scrollHeight,v.current=!1)},[i]),(0,e.useEffect)(()=>{""===u&&fetch(`${t}/user`,{method:"GET"}).then(e=>{200===e.status?e.text().then(e=>f(e)):window.location.href=`${t}/login`}).catch(e=>{console.error("Error checking if user is logged in:",e),s(e instanceof Error?e.message:"Network error checking login status"),r(!1)})},[]),e.createElement(e.Fragment,null,e.createElement(d_,{textAlign:"center",verticalAlign:"middle",className:"chatbot-layout"},e.createElement(d_.Column,null,e.createElement(vy,{as:"h1",className:"chatbot-title"},"OWASP OpenCRE Chat"),e.createElement(Ey,null,e.createElement("div",{className:"chat-container "+(p?"chat-active":"chat-landing")},e.createElement("div",{className:"chat-surface"}," ",o&&e.createElement("div",{className:"ui negative message"},e.createElement("div",{className:"header"},"Error"),e.createElement("p",null,o)),e.createElement("div",{className:"chat-messages",ref:b},i.map((t,n)=>e.createElement("div",{key:n,className:`chat-message ${t.role}`},e.createElement("div",{className:"message-card"},e.createElement("div",{className:"message-header"},e.createElement("span",{className:"message-role"},t.role),e.createElement("span",{className:"message-timestamp"},t.timestamp)),e.createElement("div",{className:"message-body"},function(t){const n=t.split("```"),r=[];return n.forEach((t,n)=>{n%2==0?r.push(e.createElement("p",{key:n,dangerouslySetInnerHTML:{__html:(0,hv.sanitize)(Bv(t),{USE_PROFILES:{html:!0}})}})):r.push(e.createElement(hy,{key:n,style:dy},t))}),r}(t.message)),t.data&&t.data.length>0&&e.createElement("div",{className:"references"},e.createElement("div",{className:"references-title"},"References"),t.data.map((t,n)=>e.createElement(e.Fragment,{key:n},function(t){var n;if(!t||!t.doctype)return null;let r=`/node/${t.doctype.toLowerCase()}/${t.name}`;return r+=t.section?`/section/${t.section}`:`/sectionid/${t.sectionID}`,e.createElement("div",{className:"reference-card"},e.createElement("a",{href:t.hyperlink,target:"_blank",rel:"noopener noreferrer"},e.createElement("strong",null,t.name)," — section ",null!==(n=t.section)&&void 0!==n?n:t.sectionID),t.embeddingsUrl?e.createElement("div",{className:"reference-link"},e.createElement("a",{href:t.embeddingsUrl,target:"_blank",rel:"noopener noreferrer"},"Scoped source (embedding URL)")):null,e.createElement("div",{className:"reference-link"},e.createElement("a",{href:r},"View in OpenCRE")))}(t)))),!t.accurate&&e.createElement("div",{className:"accuracy-warning"},"This answer could not be fully verified against OpenCRE sources. Please validate independently.")))),n&&e.createElement("div",{className:"chat-message assistant"},e.createElement("div",{className:"message-card typing-indicator"},e.createElement("span",{className:"dot"}),e.createElement("span",{className:"dot"}),e.createElement("span",{className:"dot"}))),e.createElement("div",{ref:g})),m&&e.createElement("button",{className:"scroll-to-bottom",onClick:()=>{const e=b.current;e&&(v.current=!0,e.scrollTop=e.scrollHeight,w(!1))},"aria-label":"Scroll to latest message"},e.createElement(xg,{name:"arrow down",className:"scroll-icon"})),e.createElement(s_,{className:"chat-input",size:"large",onSubmit:function(){return p_(this,void 0,void 0,function*(){if(!c.term.trim())return;v.current=!0;const e=c.term;l(Object.assign(Object.assign({},c),{term:""})),r(!0),a(t=>[...t,{timestamp:(new Date).toLocaleTimeString(),role:"user",message:e,data:[],accurate:!0}]),fetch(`${t}/completion`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:e})}).then(e=>p_(this,void 0,void 0,function*(){if(!e.ok){const t=yield e.text();let n=e.statusText;try{const e=JSON.parse(t);e.error?n=e.error:e.message&&(n=e.message)}catch(e){t&&(n=t)}throw new Error(n||`Error ${e.status}`)}return e.json()})).then(e=>{r(!1),s(""),e.model_name&&d(e.model_name),a(t=>[...t,{timestamp:(new Date).toLocaleTimeString(),role:"assistant",message:e.response,data:e.table,accurate:e.accurate}])}).catch(e=>{console.error("Error fetching answer:",e),s(e instanceof Error?e.message:"An unexpected network error occurred"),r(!1)})})}},e.createElement(s_.Input,{fluid:!0,value:c.term,onChange:e=>l(Object.assign(Object.assign({},c),{term:e.target.value})),placeholder:"Type your infosec question here…"}),e.createElement(Zw,{primary:!0,fluid:!0,size:"small"},e.createElement(xg,{name:"send"})," Ask")))),e.createElement("div",{className:"chatbot-disclaimer"},e.createElement("i",null,"Answers are generated by ",function(e){return e?e.startsWith("gemini")?`Google ${e.replace("gemini-","Gemini ").replace(/-/g," ")}`:e.startsWith("gpt")?`OpenAI ${e.toUpperCase()}`:e:"a Large Language Model"}(h)," Large Language Model, which uses the internet as training data, plus collected key cybersecurity standards from"," ",e.createElement("a",{href:"https://opencre.org"},"OpenCRE")," as the preferred source. This leads to more reliable answers and adds references, but note: it is still generative AI which is never guaranteed correct.",e.createElement("br",null),e.createElement("br",null),"Model operation is generously sponsored by"," ",e.createElement("a",{href:"https://www.softwareimprovementgroup.com"},"Software Improvement Group"),".",e.createElement("br",null),e.createElement("br",null),"Privacy & Security: Your question is sent to Heroku, the hosting provider for OpenCRE, and then to GCP, all via protected connections. Your data isn't stored on OpenCRE servers. The OpenCRE team employed extensive measures to ensure privacy and security. To review the code: https://github.com/owasp/OpenCRE"))))))};var b_=n(309);function m_(t){var n=t.children,r=t.className,i=t.content,a=Pf(r,"description"),o=Gf(m_,t),s=Vf(m_,t);return e.createElement(s,(0,we.A)({},o,{className:a}),Fp(n)?i:n)}i()(b_.A,{insert:"head",singleton:!1}),b_.A.locals,m_.handledProps=["as","children","className","content"],m_.propTypes={},m_.create=ig(m_,function(e){return{content:e}});const w_=m_;function v_(t){var n=t.children,r=t.className,i=t.content,a=Pf("header",r),o=Gf(v_,t),s=Vf(v_,t);return e.createElement(s,(0,we.A)({},o,{className:a}),Fp(n)?i:n)}v_.handledProps=["as","children","className","content"],v_.propTypes={},v_.create=ig(v_,function(e){return{content:e}});const y_=v_;function E_(t){var n=t.children,r=t.className,i=t.content,a=t.description,o=t.floated,s=t.header,c=t.verticalAlign,l=Pf(Uf(o,"floated"),$f(c),"content",r),u=Gf(E_,t),f=Vf(E_,t);return Fp(n)?e.createElement(f,(0,we.A)({},u,{className:l}),y_.create(s),w_.create(a),i):e.createElement(f,(0,we.A)({},u,{className:l}),n)}E_.handledProps=["as","children","className","content","description","floated","header","verticalAlign"],E_.propTypes={},E_.create=ig(E_,function(e){return{content:e}});const __=E_;function S_(t){var n=t.className,r=t.verticalAlign,i=Pf($f(r),n),a=Gf(S_,t);return e.createElement(xg,(0,we.A)({},a,{className:i}))}S_.handledProps=["className","verticalAlign"],S_.propTypes={},S_.create=ig(S_,function(e){return{name:e}});const x_=S_;var T_=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),i=0;i0&&B_(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&B_(r.height)/e.offsetHeight||1);var o=(L_(e)?P_(e):window).visualViewport,s=!$_()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,f=r.height/a;return{width:u,height:f,top:l,right:c+u,bottom:l+f,left:c,x:c,y:l}}function G_(e){var t=P_(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function V_(e){return e?(e.nodeName||"").toLowerCase():null}function W_(e){return((L_(e)?e.ownerDocument:e.document)||window.document).documentElement}function q_(e){return H_(W_(e)).left+G_(e).scrollLeft}function X_(e){return P_(e).getComputedStyle(e)}function Y_(e){var t=X_(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function K_(e,t,n){void 0===n&&(n=!1);var r,i,a=D_(t),o=D_(t)&&function(e){var t=e.getBoundingClientRect(),n=B_(t.width)/e.offsetWidth||1,r=B_(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),s=W_(t),c=H_(e,o,n),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(a||!a&&!n)&&(("body"!==V_(t)||Y_(s))&&(l=(r=t)!==P_(r)&&D_(r)?{scrollLeft:(i=r).scrollLeft,scrollTop:i.scrollTop}:G_(r)),D_(t)?((u=H_(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):s&&(u.x=q_(s))),{x:c.left+l.scrollLeft-u.x,y:c.top+l.scrollTop-u.y,width:c.width,height:c.height}}function Z_(e){var t=H_(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Q_(e){return"html"===V_(e)?e:e.assignedSlot||e.parentNode||(F_(e)?e.host:null)||W_(e)}function J_(e){return["html","body","#document"].indexOf(V_(e))>=0?e.ownerDocument.body:D_(e)&&Y_(e)?e:J_(Q_(e))}function eS(e,t){var n;void 0===t&&(t=[]);var r=J_(e),i=r===(null==(n=e.ownerDocument)?void 0:n.body),a=P_(r),o=i?[a].concat(a.visualViewport||[],Y_(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(eS(Q_(o)))}function tS(e){return["table","td","th"].indexOf(V_(e))>=0}function nS(e){return D_(e)&&"fixed"!==X_(e).position?e.offsetParent:null}function rS(e){for(var t=P_(e),n=nS(e);n&&tS(n)&&"static"===X_(n).position;)n=nS(n);return n&&("html"===V_(n)||"body"===V_(n)&&"static"===X_(n).position)?t:n||function(e){var t=/firefox/i.test(z_());if(/Trident/i.test(z_())&&D_(e)&&"fixed"===X_(e).position)return null;var n=Q_(e);for(F_(n)&&(n=n.host);D_(n)&&["html","body"].indexOf(V_(n))<0;){var r=X_(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var iS="top",aS="bottom",oS="right",sS="left",cS="auto",lS=[iS,aS,oS,sS],uS="start",fS="end",hS="viewport",dS="popper",pS=lS.reduce(function(e,t){return e.concat([t+"-"+uS,t+"-"+fS])},[]),gS=[].concat(lS,[cS]).reduce(function(e,t){return e.concat([t,t+"-"+uS,t+"-"+fS])},[]),bS=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function mS(e){var t=new Map,n=new Set,r=[];function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||i(e)}),r}var wS={placement:"bottom",modifiers:[],strategy:"absolute"};function vS(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function AS(e){var t,n=e.reference,r=e.element,i=e.placement,a=i?SS(i):null,o=i?xS(i):null,s=n.x+n.width/2-r.width/2,c=n.y+n.height/2-r.height/2;switch(a){case iS:t={x:s,y:n.y-r.height};break;case aS:t={x:s,y:n.y+n.height};break;case oS:t={x:n.x+n.width,y:c};break;case sS:t={x:n.x-r.width,y:c};break;default:t={x:n.x,y:n.y}}var l=a?TS(a):null;if(null!=l){var u="y"===l?"height":"width";switch(o){case uS:t[l]=t[l]-(n[u]/2-r[u]/2);break;case fS:t[l]=t[l]+(n[u]/2-r[u]/2)}}return t}var kS={top:"auto",right:"auto",bottom:"auto",left:"auto"};function CS(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,f=e.isFixed,h=o.x,d=void 0===h?0:h,p=o.y,g=void 0===p?0:p,b="function"==typeof u?u({x:d,y:g}):{x:d,y:g};d=b.x,g=b.y;var m=o.hasOwnProperty("x"),w=o.hasOwnProperty("y"),v=sS,y=iS,E=window;if(l){var _=rS(n),S="clientHeight",x="clientWidth";_===P_(n)&&"static"!==X_(_=W_(n)).position&&"absolute"===s&&(S="scrollHeight",x="scrollWidth"),(i===iS||(i===sS||i===oS)&&a===fS)&&(y=aS,g-=(f&&_===E&&E.visualViewport?E.visualViewport.height:_[S])-r.height,g*=c?1:-1),i!==sS&&(i!==iS&&i!==aS||a!==fS)||(v=oS,d-=(f&&_===E&&E.visualViewport?E.visualViewport.width:_[x])-r.width,d*=c?1:-1)}var T,A=Object.assign({position:s},l&&kS),k=!0===u?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:B_(t*r)/r||0,y:B_(n*r)/r||0}}({x:d,y:g}):{x:d,y:g};return d=k.x,g=k.y,c?Object.assign({},A,((T={})[y]=w?"0":"",T[v]=m?"0":"",T.transform=(E.devicePixelRatio||1)<=1?"translate("+d+"px, "+g+"px)":"translate3d("+d+"px, "+g+"px, 0)",T)):Object.assign({},A,((t={})[y]=w?g+"px":"",t[v]=m?d+"px":"",t.transform="",t))}const MS={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=void 0===r||r,a=n.adaptive,o=void 0===a||a,s=n.roundOffsets,c=void 0===s||s,l={placement:SS(t.placement),variation:xS(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,CS(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,CS(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},IS={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];D_(i)&&V_(i)&&(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?i.removeAttribute(e):i.setAttribute(e,!0===t?"":t)}))})},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});D_(r)&&V_(r)&&(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}},requires:["computeStyles"]},OS={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=void 0===i?[0,0]:i,o=gS.reduce(function(e,n){return e[n]=function(e,t,n){var r=SS(e),i=[sS,iS].indexOf(r)>=0?-1:1,a="function"==typeof n?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[sS,oS].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}};var NS={left:"right",right:"left",bottom:"top",top:"bottom"};function RS(e){return e.replace(/left|right|bottom|top/g,function(e){return NS[e]})}var PS={start:"end",end:"start"};function LS(e){return e.replace(/start|end/g,function(e){return PS[e]})}function DS(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&F_(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function FS(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function US(e,t,n){return t===hS?FS(function(e,t){var n=P_(e),r=W_(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=$_();(l||!l&&"fixed"===t)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+q_(e),y:c}}(e,n)):L_(t)?function(e,t){var n=H_(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):FS(function(e){var t,n=W_(e),r=G_(e),i=null==(t=e.ownerDocument)?void 0:t.body,a=U_(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=U_(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+q_(e),c=-r.scrollTop;return"rtl"===X_(i||n).direction&&(s+=U_(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:c}}(W_(e)))}function jS(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function BS(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function zS(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=void 0===r?e.placement:r,a=n.strategy,o=void 0===a?e.strategy:a,s=n.boundary,c=void 0===s?"clippingParents":s,l=n.rootBoundary,u=void 0===l?hS:l,f=n.elementContext,h=void 0===f?dS:f,d=n.altBoundary,p=void 0!==d&&d,g=n.padding,b=void 0===g?0:g,m=jS("number"!=typeof b?b:BS(b,lS)),w=h===dS?"reference":dS,v=e.rects.popper,y=e.elements[p?w:h],E=function(e,t,n,r){var i="clippingParents"===t?function(e){var t=eS(Q_(e)),n=["absolute","fixed"].indexOf(X_(e).position)>=0&&D_(e)?rS(e):e;return L_(n)?t.filter(function(e){return L_(e)&&DS(e,n)&&"body"!==V_(e)}):[]}(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=US(e,n,r);return t.top=U_(i.top,t.top),t.right=j_(i.right,t.right),t.bottom=j_(i.bottom,t.bottom),t.left=U_(i.left,t.left),t},US(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}(L_(y)?y:y.contextElement||W_(e.elements.popper),c,u,o),_=H_(e.elements.reference),S=AS({reference:_,element:v,strategy:"absolute",placement:i}),x=FS(Object.assign({},v,S)),T=h===dS?x:_,A={top:E.top-T.top+m.top,bottom:T.bottom-E.bottom+m.bottom,left:E.left-T.left+m.left,right:T.right-E.right+m.right},k=e.modifiersData.offset;if(h===dS&&k){var C=k[i];Object.keys(A).forEach(function(e){var t=[oS,aS].indexOf(e)>=0?1:-1,n=[iS,aS].indexOf(e)>=0?"y":"x";A[e]+=C[n]*t})}return A}const $S={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=void 0===i||i,o=n.altAxis,s=void 0===o||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,f=n.rootBoundary,h=n.altBoundary,d=n.flipVariations,p=void 0===d||d,g=n.allowedAutoPlacements,b=t.options.placement,m=SS(b),w=c||(m!==b&&p?function(e){if(SS(e)===cS)return[];var t=RS(e);return[LS(e),t,LS(t)]}(b):[RS(b)]),v=[b].concat(w).reduce(function(e,n){return e.concat(SS(n)===cS?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=void 0===c?gS:c,u=xS(r),f=u?s?pS:pS.filter(function(e){return xS(e)===u}):lS,h=f.filter(function(e){return l.indexOf(e)>=0});0===h.length&&(h=f);var d=h.reduce(function(t,n){return t[n]=zS(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[SS(n)],t},{});return Object.keys(d).sort(function(e,t){return d[e]-d[t]})}(t,{placement:n,boundary:u,rootBoundary:f,padding:l,flipVariations:p,allowedAutoPlacements:g}):n)},[]),y=t.rects.reference,E=t.rects.popper,_=new Map,S=!0,x=v[0],T=0;T=0,I=M?"width":"height",O=zS(t,{placement:A,boundary:u,rootBoundary:f,altBoundary:h,padding:l}),N=M?C?oS:sS:C?aS:iS;y[I]>E[I]&&(N=RS(N));var R=RS(N),P=[];if(a&&P.push(O[k]<=0),s&&P.push(O[N]<=0,O[R]<=0),P.every(function(e){return e})){x=A,S=!1;break}_.set(A,P)}if(S)for(var L=function(e){var t=v.find(function(t){var n=_.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return x=t,"break"},D=p?3:1;D>0&&"break"!==L(D);D--);t.placement!==x&&(t.modifiersData[r]._skip=!0,t.placement=x,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function HS(e,t,n){return U_(e,j_(t,n))}const GS={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=void 0===i||i,o=n.altAxis,s=void 0!==o&&o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,f=n.padding,h=n.tether,d=void 0===h||h,p=n.tetherOffset,g=void 0===p?0:p,b=zS(t,{boundary:c,rootBoundary:l,padding:f,altBoundary:u}),m=SS(t.placement),w=xS(t.placement),v=!w,y=TS(m),E="x"===y?"y":"x",_=t.modifiersData.popperOffsets,S=t.rects.reference,x=t.rects.popper,T="function"==typeof g?g(Object.assign({},t.rects,{placement:t.placement})):g,A="number"==typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,C={x:0,y:0};if(_){if(a){var M,I="y"===y?iS:sS,O="y"===y?aS:oS,N="y"===y?"height":"width",R=_[y],P=R+b[I],L=R-b[O],D=d?-x[N]/2:0,F=w===uS?S[N]:x[N],U=w===uS?-x[N]:-S[N],j=t.elements.arrow,B=d&&j?Z_(j):{width:0,height:0},z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},$=z[I],H=z[O],G=HS(0,S[N],B[N]),V=v?S[N]/2-D-G-$-A.mainAxis:F-G-$-A.mainAxis,W=v?-S[N]/2+D+G+H+A.mainAxis:U+G+H+A.mainAxis,q=t.elements.arrow&&rS(t.elements.arrow),X=q?"y"===y?q.clientTop||0:q.clientLeft||0:0,Y=null!=(M=null==k?void 0:k[y])?M:0,K=R+W-Y,Z=HS(d?j_(P,R+V-Y-X):P,R,d?U_(L,K):L);_[y]=Z,C[y]=Z-R}if(s){var Q,J="x"===y?iS:sS,ee="x"===y?aS:oS,te=_[E],ne="y"===E?"height":"width",re=te+b[J],ie=te-b[ee],ae=-1!==[iS,sS].indexOf(m),oe=null!=(Q=null==k?void 0:k[E])?Q:0,se=ae?re:te-S[ne]-x[ne]-oe+A.altAxis,ce=ae?te+S[ne]+x[ne]-oe-A.altAxis:ie,le=d&&ae?function(e,t,n){var r=HS(e,t,n);return r>n?n:r}(se,te,ce):HS(d?se:re,te,d?ce:ie);_[E]=le,C[E]=le-te}t.modifiersData[r]=C}},requiresIfExists:["offset"]},VS={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=SS(n.placement),c=TS(s),l=[sS,oS].indexOf(s)>=0?"height":"width";if(a&&o){var u=function(e,t){return jS("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:BS(e,lS))}(i.padding,n),f=Z_(a),h="y"===c?iS:sS,d="y"===c?aS:oS,p=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],g=o[c]-n.rects.reference[c],b=rS(a),m=b?"y"===c?b.clientHeight||0:b.clientWidth||0:0,w=p/2-g/2,v=u[h],y=m-f[l]-u[d],E=m/2-f[l]/2+w,_=HS(v,E,y),S=c;n.modifiersData[r]=((t={})[S]=_,t.centerOffset=_-E,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&DS(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function WS(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function qS(e){return[iS,oS,aS,sS].some(function(t){return e[t]>=0})}var XS=yS({defaultModifiers:[_S,{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=AS({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},MS,IS,OS,$S,GS,VS,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=zS(t,{elementContext:"reference"}),s=zS(t,{altBoundary:!0}),c=WS(o,r),l=WS(s,i,a),u=qS(c),f=qS(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}}]}),YS=n(9325),KS=n.n(YS),ZS=[],QS=function(){},JS=function(){return Promise.resolve(null)},ex=[];function tx(n){var r=n.placement,i=void 0===r?"bottom":r,a=n.strategy,o=void 0===a?"absolute":a,s=n.modifiers,c=void 0===s?ex:s,l=n.referenceElement,u=n.onFirstUpdate,f=n.innerRef,h=n.children,d=e.useContext(O_),p=e.useState(null),g=p[0],b=p[1],m=e.useState(null),w=m[0],v=m[1];e.useEffect(function(){!function(e,t){if("function"==typeof e)return function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r!(!e||"object"!=typeof e)&&("store"in e&&"loadedPages"in e&&"totalPages"in e),yx=(0,e.createContext)(null),Ex=({children:t})=>{const{apiUrl:n}=jg(),[r,i]=(0,e.useState)(!0),[a,o]=(0,e.useState)({}),[s,c]=(0,e.useState)([]),[l,u]=(0,e.useState)(!1),[f,h]=(0,e.useState)(0),[d,p]=(0,e.useState)(0),[g,b]=(0,e.useState)(!1),[m,w]=(0,e.useState)(!1),[v,y]=(0,e.useState)(null),[E,_]=(0,e.useState)(null),S=(0,e.useRef)(a),x=(0,e.useRef)(f),T=(0,e.useRef)(d),A=(0,e.useRef)(m),k=(0,e.useRef)(!1),C=(0,e.useRef)(Promise.resolve({})),M=(0,e.useRef)(null),I=(0,e.useRef)(!1);(0,e.useEffect)(()=>{S.current=a},[a]),(0,e.useEffect)(()=>{x.current=f},[f]),(0,e.useEffect)(()=>{T.current=d},[d]),(0,e.useEffect)(()=>{A.current=m},[m]);const O=(0,e.useCallback)(e=>"CRE"===e.doctype?e.id:"Standard"===e.doctype?e.name:`${e.name}-${e.sectionID}-${e.section}`,[]),N=(0,e.useCallback)((e,t,n=[])=>{var r;const i=O(e),a=[...n,i],o=structuredClone(null!==(r=t[i])&&void 0!==r?r:e),s=o.links||[];let c=s.filter(e=>!!e.document&&!a.includes(O(e.document))&&O(e.document)in t);c=c.filter(e=>"Contains"===e.ltype),c=c.map(e=>({ltype:e.ltype,document:N(e.document,t,a)})),o.links=[...c];const l=s.filter(e=>e.document&&"Standard"===e.document.doctype&&!a.includes(O(e.document)));return o.links=[...c,...l],o},[O]),R=(0,e.useCallback)((e,t,n,r,i)=>bx(void 0,void 0,void 0,function*(){const a={store:e,loadedPages:t,totalPages:n,isFullStoreLoaded:r};yield nw(mx,a,dt),i&&(yield nw(wx,i,dt))}),[]),P=(0,e.useCallback)(e=>bx(void 0,void 0,void 0,function*(){if(!Object.keys(e).length)return c([]),[];try{const t=(yield rn().get(`${n}/root_cres`)).data.data.map(t=>N(t,e));return c(t),t}catch(e){const t=e instanceof Error?e:new Error("Failed to load explorer tree");throw _(t),t}}),[n,N]),L=(0,e.useCallback)(e=>bx(void 0,void 0,void 0,function*(){const t=C.current.then(()=>bx(void 0,void 0,void 0,function*(){if(A.current||x.current>=e&&x.current>0)return S.current;k.current=!0,b(!0);try{const t=yield rn().get(`${n}/all_cres`,{params:{page:e,per_page:20}}),r=t.data.data||[],i=Number(t.data.total_pages)||1,a=((e,t,n)=>{const r=Object.assign({},t);return e.forEach(e=>{r[n(e)]=(e=>{var t;return Object.assign({links:null!==(t=e.links)&&void 0!==t?t:[],displayName:Km(e),url:Ym(e)},e)})(e)}),r})(r,S.current,O),s=e;S.current=a,o(a),h(s),p(i),x.current=s,T.current=i,_(null);const c=s>=i;c&&(A.current=!0,w(!0));const l=yield P(a);return yield R(a,s,i,c,l),a}catch(e){const t=e instanceof Error?e:new Error("Failed to load CRE data");throw _(t),t}finally{k.current=!1,b(!1)}}));return C.current=t.catch(()=>S.current),t}),[n,O,R,P]),D=(0,e.useCallback)(()=>bx(void 0,void 0,void 0,function*(){if(A.current)return;const e=x.current+1;e>T.current&&T.current>0||(yield L(e))}),[L]),F=(0,e.useCallback)(()=>bx(void 0,void 0,void 0,function*(){if(M.current)return M.current;M.current=bx(void 0,void 0,void 0,function*(){for(y(null),x.current||(yield L(1));x.current{bx(void 0,void 0,void 0,function*(){const e=yield tw(mx),t=yield tw(wx);if(vx(e)&&Object.keys(e.store).length>0)S.current=e.store,o(e.store),h(e.loadedPages),p(e.totalPages),x.current=e.loadedPages,T.current=e.totalPages,A.current=e.isFullStoreLoaded,w(e.isFullStoreLoaded),(null==t?void 0:t.length)&&c(t);else if(e&&"object"==typeof e&&!vx(e)){const n=e;S.current=n,o(n),A.current=!0,w(!0),(null==t?void 0:t.length)&&c(t)}u(!0)})},[]),(0,e.useEffect)(()=>{l&&!I.current&&(I.current=!0,bx(void 0,void 0,void 0,function*(){i(!0);try{0!==x.current||A.current?Object.keys(S.current).length&&(yield P(S.current)):yield L(1)}catch(e){}finally{i(!1)}}))},[l,L,P]),(0,e.useEffect)(()=>{if(!l||m||0===f)return;const e=window.requestIdleCallback,t=window.cancelIdleCallback,n=()=>{!A.current&&x.currentnull==t?void 0:t(r)}const r=window.setTimeout(n,2e3);return()=>window.clearTimeout(r)},[l,m,f,d,D]);const U=!m&&f>0&&f{const t=(0,e.useContext)(yx);if(!t)throw new Error("useDataStore must be used within a DataProvider");return t};var Sx=n(7025);function xx(t){var n=t.children,r=t.className,i=Pf(r),a=Gf(xx,t),o=Vf(xx,t);return e.createElement(o,(0,we.A)({},a,{className:i}),n)}i()(Sx.A,{insert:"head",singleton:!1}),Sx.A.locals,xx.handledProps=["as","children","className"],xx.defaultProps={as:"tbody"},xx.propTypes={};const Tx=xx;function Ax(t){var n=t.active,r=t.children,i=t.className,a=t.collapsing,o=t.content,s=t.disabled,c=t.error,l=t.icon,u=t.negative,f=t.positive,h=t.selectable,d=t.singleLine,p=t.textAlign,g=t.verticalAlign,b=t.warning,m=t.width,w=Pf(Ff(n,"active"),Ff(a,"collapsing"),Ff(s,"disabled"),Ff(c,"error"),Ff(u,"negative"),Ff(f,"positive"),Ff(h,"selectable"),Ff(d,"single line"),Ff(b,"warning"),zf(p),$f(g),Hf(m,"wide"),i),v=Gf(Ax,t),y=Vf(Ax,t);return Fp(r)?e.createElement(y,(0,we.A)({},v,{className:w}),xg.create(l),o):e.createElement(y,(0,we.A)({},v,{className:w}),r)}Ax.handledProps=["active","as","children","className","collapsing","content","disabled","error","icon","negative","positive","selectable","singleLine","textAlign","verticalAlign","warning","width"],Ax.defaultProps={as:"td"},Ax.propTypes={},Ax.create=ig(Ax,function(e){return{content:e}});const kx=Ax;function Cx(t){var n=t.children,r=t.className,i=t.content,a=t.fullWidth,o=Pf(Ff(a,"full-width"),r),s=Gf(Cx,t),c=Vf(Cx,t);return e.createElement(c,(0,we.A)({},s,{className:o}),Fp(n)?i:n)}Cx.handledProps=["as","children","className","content","fullWidth"],Cx.defaultProps={as:"thead"},Cx.propTypes={};const Mx=Cx;function Ix(t){var n=t.as,r=Gf(Ix,t);return e.createElement(Mx,(0,we.A)({},r,{as:n}))}Ix.handledProps=["as"],Ix.propTypes={},Ix.defaultProps={as:"tfoot"};const Ox=Ix;function Nx(t){var n=t.as,r=t.className,i=t.sorted,a=Pf(Uf(i,"sorted"),r),o=Gf(Nx,t);return e.createElement(kx,(0,we.A)({},o,{as:n,className:a}))}Nx.handledProps=["as","className","sorted"],Nx.propTypes={},Nx.defaultProps={as:"th"};const Rx=Nx;function Px(t){var n=t.active,r=t.cellAs,i=t.cells,a=t.children,o=t.className,s=t.disabled,c=t.error,l=t.negative,u=t.positive,f=t.textAlign,h=t.verticalAlign,d=t.warning,p=Pf(Ff(n,"active"),Ff(s,"disabled"),Ff(c,"error"),Ff(l,"negative"),Ff(u,"positive"),Ff(d,"warning"),zf(f),$f(h),o),g=Gf(Px,t),b=Vf(Px,t);return Fp(a)?e.createElement(b,(0,we.A)({},g,{className:p}),Ig(i,function(e){return kx.create(e,{defaultProps:{as:r}})})):e.createElement(b,(0,we.A)({},g,{className:p}),a)}Px.handledProps=["active","as","cellAs","cells","children","className","disabled","error","negative","positive","textAlign","verticalAlign","warning"],Px.defaultProps={as:"tr",cellAs:"td"},Px.propTypes={},Px.create=ig(Px,function(e){return{cells:e}});const Lx=Px;function Dx(t){var n=t.attached,r=t.basic,i=t.celled,a=t.children,o=t.className,s=t.collapsing,c=t.color,l=t.columns,u=t.compact,f=t.definition,h=t.fixed,d=t.footerRow,p=t.headerRow,g=t.headerRows,b=t.inverted,m=t.padded,w=t.renderBodyRow,v=t.selectable,y=t.singleLine,E=t.size,_=t.sortable,S=t.stackable,x=t.striped,T=t.structured,A=t.tableData,k=t.textAlign,C=t.unstackable,M=t.verticalAlign,I=Pf("ui",c,E,Ff(i,"celled"),Ff(s,"collapsing"),Ff(f,"definition"),Ff(h,"fixed"),Ff(b,"inverted"),Ff(v,"selectable"),Ff(y,"single line"),Ff(_,"sortable"),Ff(S,"stackable"),Ff(x,"striped"),Ff(T,"structured"),Ff(C,"unstackable"),jf(n,"attached"),jf(r,"basic"),jf(u,"compact"),jf(m,"padded"),zf(k),$f(M),Hf(l,"column"),"table",o),O=Gf(Dx,t),N=Vf(Dx,t);if(!Fp(a))return e.createElement(N,(0,we.A)({},O,{className:I}),a);var R={defaultProps:{cellAs:"th"}},P=(p||g)&&e.createElement(Mx,null,Lx.create(p,R),Ig(g,function(e){return Lx.create(e,R)}));return e.createElement(N,(0,we.A)({},O,{className:I}),P,e.createElement(Tx,null,w&&Ig(A,function(e,t){return Lx.create(w(e,t))})),d&&e.createElement(Ox,null,Lx.create(d)))}Dx.handledProps=["as","attached","basic","celled","children","className","collapsing","color","columns","compact","definition","fixed","footerRow","headerRow","headerRows","inverted","padded","renderBodyRow","selectable","singleLine","size","sortable","stackable","striped","structured","tableData","textAlign","unstackable","verticalAlign"],Dx.defaultProps={as:"table"},Dx.propTypes={},Dx.Body=Tx,Dx.Cell=kx,Dx.Footer=Ox,Dx.Header=Mx,Dx.HeaderCell=Rx,Dx.Row=Lx;const Fx=Dx,Ux=({dataStore:t})=>{const n=(e=>{const t={},n={};return Object.values(e).forEach(e=>{t[e.id]||(t[e.id]=0),n[e.id]||(n[e.id]={}),e.links&&e.links.forEach(r=>{if(!r.document)return;const i=r.document.id;t[i]||(t[i]=0),"Contains"===r.ltype&&(t[i]=(t[i]||0)+1),n[e.id][r.ltype]=(n[e.id][r.ltype]||0)+1})}),Object.values(e).filter(e=>"CRE"===e.doctype).map(e=>({id:e.id,displayName:e.displayName,doctype:e.doctype,inDegree:t[e.id]||0,outDegree:e.links?e.links.length:0,isRoot:0===(t[e.id]||0),linkTypes:n[e.id]||{}})).sort((e,t)=>(t.isRoot?1:0)-(e.isRoot?1:0))})(t),r=n.filter(e=>e.isRoot).length,i=n.length;return e.createElement("div",{className:"graph-debug-panel"},e.createElement("div",{className:"graph-debug-panel__header"},e.createElement(xg,{name:"bug"}),e.createElement("strong",null,"Graph Debug Info"),e.createElement("span",{className:"graph-debug-panel__summary"},i," CRE nodes — ",r," roots")),e.createElement("div",{className:"graph-debug-panel__legend"},e.createElement(Hw,{size:"tiny",color:"green"},"Root"),e.createElement("span",null," = no incoming Contains links")),e.createElement("div",{className:"graph-debug-panel__table-wrap"},e.createElement(Fx,{compact:!0,size:"small",celled:!0,unstackable:!0,className:"graph-debug-panel__table"},e.createElement(Fx.Header,null,e.createElement(Fx.Row,null,e.createElement(Fx.HeaderCell,null,"Node"),e.createElement(Fx.HeaderCell,null,"Root?"),e.createElement(Fx.HeaderCell,null,"In"),e.createElement(Fx.HeaderCell,null,"Out"),e.createElement(Fx.HeaderCell,null,"Link Types"))),e.createElement(Fx.Body,null,n.map(t=>e.createElement(Fx.Row,{key:t.id,positive:t.isRoot},e.createElement(Fx.Cell,null,e.createElement("span",{className:"graph-debug-panel__node-name",title:t.displayName},t.id)),e.createElement(Fx.Cell,{textAlign:"center"},t.isRoot&&e.createElement(Hw,{size:"tiny",color:"green"},"Root")),e.createElement(Fx.Cell,{textAlign:"center"},t.inDegree),e.createElement(Fx.Cell,{textAlign:"center"},t.outDegree),e.createElement(Fx.Cell,null,e.createElement(I_,{horizontal:!0,size:"mini"},Object.entries(t.linkTypes).map(([t,n])=>e.createElement(I_.Item,{key:t},e.createElement(Hw,{size:"mini"},t,e.createElement(Hw.Detail,null,n))))))))))))};var jx=n(4743);i()(jx.A,{insert:"head",singleton:!1}),jx.A.locals;const Bx=({creCode:t,linkedTo:n,applyHighlight:r,filter:i})=>{function a(e,t){return`/cre/${t}?applyFilters=true&filters=${e.document.name}&filters=sources`}function o(e,t){if(!e.document.hyperlink)return!1;const n=t.reduce((t,n)=>t+(n.document.name!==e.document.name?0:1),0);return n<=1}const s=function(e){const t=new Set;return e.filter(e=>{const n=t.has(e.document.name);return t.add(e.document.name),!n})}(n);return e.createElement(I_.Description,null,e.createElement(Hw.Group,{size:"small",className:"tags"},s.map(s=>e.createElement(e.Fragment,{key:s.document.name},o(s,n)&&e.createElement("a",{href:s.document.hyperlink,target:"_blank",rel:"noopener noreferrer"},e.createElement(Hw,null,e.createElement(xg,{name:"external"}),r(s.document.name,i))),!o(s,n)&&e.createElement(lt,{to:a(s,t)},e.createElement(Hw,null,r(s.document.name,i)))))))},zx=({children:t})=>e.createElement(Ex,null,t);function $x(t){const n=n=>e.createElement(zx,null,e.createElement(t,Object.assign({},n)));return n.displayName=`ExplorerLayout(${t.displayName||t.name||"Component"})`,n}var Hx=n(527);function Gx(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}function Vx(){}function Wx(e){return null==e?Vx:function(){return this.querySelector(e)}}function qx(){return[]}function Xx(e){return null==e?qx:function(){return this.querySelectorAll(e)}}function Yx(e){return function(){return this.matches(e)}}function Kx(e){return function(t){return t.matches(e)}}i()(Hx.A,{insert:"head",singleton:!1}),Hx.A.locals;var Zx=Array.prototype.find;function Qx(){return this.firstElementChild}var Jx=Array.prototype.filter;function eT(){return Array.from(this.children)}function tT(e){return new Array(e.length)}function nT(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function rT(e,t,n,r,i,a){for(var o,s=0,c=t.length,l=a.length;st?1:e>=t?0:NaN}nT.prototype={constructor:nT,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var cT="http://www.w3.org/1999/xhtml";const lT={svg:"http://www.w3.org/2000/svg",xhtml:cT,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function uT(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),lT.hasOwnProperty(t)?{space:lT[t],local:e}:e}function fT(e){return function(){this.removeAttribute(e)}}function hT(e){return function(){this.removeAttributeNS(e.space,e.local)}}function dT(e,t){return function(){this.setAttribute(e,t)}}function pT(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function gT(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function bT(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function mT(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function wT(e){return function(){this.style.removeProperty(e)}}function vT(e,t,n){return function(){this.style.setProperty(e,t,n)}}function yT(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function ET(e,t){return e.style.getPropertyValue(t)||mT(e).getComputedStyle(e,null).getPropertyValue(t)}function _T(e){return function(){delete this[e]}}function ST(e,t){return function(){this[e]=t}}function xT(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function TT(e){return e.trim().split(/^|\s+/)}function AT(e){return e.classList||new kT(e)}function kT(e){this._node=e,this._names=TT(e.getAttribute("class")||"")}function CT(e,t){for(var n=AT(e),r=-1,i=t.length;++r=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var JT=[null];function eA(e,t){this._groups=e,this._parents=t}function tA(){return new eA([[document.documentElement]],JT)}eA.prototype=tA.prototype={constructor:eA,select:function(e){"function"!=typeof e&&(e=Wx(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=y&&(y=v+1);!(w=b[y])&&++y=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=sT);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==t?wT:"function"==typeof t?yT:vT)(e,t,null==n?"":n)):ET(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?_T:"function"==typeof t?xT:ST)(e,t)):this.node()[e]},classed:function(e,t){var n=TT(e+"");if(arguments.length<2){for(var r=AT(this.node()),i=-1,a=n.length;++i=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}(e+""),o=a.length;if(!(arguments.length<2)){for(s=t?YT:XT,r=0;r{}};function iA(){for(var e,t=0,n=arguments.length,r={};t=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o0)for(var n,r,i=new Array(n),a=0;a=0&&t._call.call(void 0,e),t=t._next;--fA}()}finally{fA=0,function(){for(var e,t,n=lA,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:lA=t);uA=e,TA(r)}(),gA=0}}function xA(){var e=mA.now(),t=e-pA;t>1e3&&(bA-=t,pA=e)}function TA(e){fA||(hA&&(hA=clearTimeout(hA)),e-gA>24?(e<1/0&&(hA=setTimeout(SA,e-mA.now()-bA)),dA&&(dA=clearInterval(dA))):(dA||(pA=mA.now(),dA=setInterval(xA,1e3)),fA=1,wA(SA)))}function AA(e,t,n){var r=new EA;return t=null==t?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}EA.prototype=_A.prototype={constructor:EA,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?vA():+n)+(null==t?0:+t),this._next||uA===this||(uA?uA._next=this:lA=this,uA=this),this._call=e,this._time=n,TA()},stop:function(){this._call&&(this._call=null,this._time=1/0,TA())}};var kA=cA("start","end","cancel","interrupt"),CA=[];function MA(e,t,n,r,i,a){var o=e.__transition;if(o){if(n in o)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function a(c){var l,u,f,h;if(1!==n.state)return s();for(l in i)if((h=i[l]).name===n.name){if(3===h.state)return AA(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete i[l]):+l0)throw new Error("too late; already scheduled");return n}function OA(e,t){var n=NA(e,t);if(n.state>3)throw new Error("too late; already running");return n}function NA(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function RA(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var PA,LA=180/Math.PI,DA={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function FA(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:RA(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(a.rotate,o.rotate,s,c),function(e,t,n,a){e!==t?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:RA(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(a.skewX,o.skewX,s,c),function(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:RA(e,n)},{i:s-2,x:RA(t,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(e){for(var t,n=-1,r=c.length;++n>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?uk(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?uk(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=JA.exec(e))?new dk(t[1],t[2],t[3],1):(t=ek.exec(e))?new dk(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=tk.exec(e))?uk(t[1],t[2],t[3],t[4]):(t=nk.exec(e))?uk(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=rk.exec(e))?vk(t[1],t[2]/100,t[3]/100,1):(t=ik.exec(e))?vk(t[1],t[2]/100,t[3]/100,t[4]):ak.hasOwnProperty(e)?lk(ak[e]):"transparent"===e?new dk(NaN,NaN,NaN,0):null}function lk(e){return new dk(e>>16&255,e>>8&255,255&e,1)}function uk(e,t,n,r){return r<=0&&(e=t=n=NaN),new dk(e,t,n,r)}function fk(e){return e instanceof WA||(e=ck(e)),e?new dk((e=e.rgb()).r,e.g,e.b,e.opacity):new dk}function hk(e,t,n,r){return 1===arguments.length?fk(e):new dk(e,t,n,null==r?1:r)}function dk(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function pk(){return`#${wk(this.r)}${wk(this.g)}${wk(this.b)}`}function gk(){const e=bk(this.opacity);return`${1===e?"rgb(":"rgba("}${mk(this.r)}, ${mk(this.g)}, ${mk(this.b)}${1===e?")":`, ${e})`}`}function bk(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function mk(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function wk(e){return((e=mk(e))<16?"0":"")+e.toString(16)}function vk(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ek(e,t,n,r)}function yk(e){if(e instanceof Ek)return new Ek(e.h,e.s,e.l,e.opacity);if(e instanceof WA||(e=ck(e)),!e)return new Ek;if(e instanceof Ek)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+6*(n0&&c<1?0:o,new Ek(o,s,c,e.opacity)}function Ek(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function _k(e){return(e=(e||0)%360)<0?e+360:e}function Sk(e){return Math.max(0,Math.min(1,e||0))}function xk(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function Tk(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}GA(WA,ck,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ok,formatHex:ok,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return yk(this).formatHsl()},formatRgb:sk,toString:sk}),GA(dk,hk,VA(WA,{brighter(e){return e=null==e?XA:Math.pow(XA,e),new dk(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?qA:Math.pow(qA,e),new dk(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new dk(mk(this.r),mk(this.g),mk(this.b),bk(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:pk,formatHex:pk,formatHex8:function(){return`#${wk(this.r)}${wk(this.g)}${wk(this.b)}${wk(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:gk,toString:gk})),GA(Ek,function(e,t,n,r){return 1===arguments.length?yk(e):new Ek(e,t,n,null==r?1:r)},VA(WA,{brighter(e){return e=null==e?XA:Math.pow(XA,e),new Ek(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?qA:Math.pow(qA,e),new Ek(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new dk(xk(e>=240?e-240:e+120,i,r),xk(e,i,r),xk(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ek(_k(this.h),Sk(this.s),Sk(this.l),bk(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=bk(this.opacity);return`${1===e?"hsl(":"hsla("}${_k(this.h)}, ${100*Sk(this.s)}%, ${100*Sk(this.l)}%${1===e?")":`, ${e})`}`}}));const Ak=e=>()=>e;function kk(e,t){return function(n){return e+n*t}}function Ck(e,t){var n=t-e;return n?kk(e,n):Ak(isNaN(e)?t:e)}const Mk=function e(t){var n=function(e){return 1===(e=+e)?Ck:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Ak(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=hk(e)).r,(t=hk(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=Ck(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+""}}return r.gamma=e,r}(1);function Ik(e){return function(t){var n,r,i=t.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=ra&&(i=t.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:RA(n,r)})),a=Nk.lastIndex;return a=0&&(e=e.slice(0,t)),!e||"start"===e})}(t)?IA:OA;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}(n,e,t))},attr:function(e,t){var n=uT(e),r="transform"===n?BA:Pk;return this.attrTween(e,"function"==typeof t?(n.local?Bk:jk)(n,r,HA(this,"attr."+e,t)):null==t?(n.local?Dk:Lk)(n):(n.local?Uk:Fk)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=uT(e);return this.tween(n,(r.local?zk:$k)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?jA:Pk;return null==t?this.styleTween(e,function(e,t){var n,r,i;return function(){var a=ET(this,e),o=(this.style.removeProperty(e),ET(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}(e,r)).on("end.style."+e,Xk(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,i,a;return function(){var o=ET(this,e),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(e),c=s=ET(this,e)),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}(e,r,HA(this,"style."+e,t))).each(function(e,t){var n,r,i,a,o="style."+t,s="end."+o;return function(){var c=OA(this,e),l=c.on,u=null==c.value[o]?a||(a=Xk(t)):void 0;l===n&&i===u||(r=(n=l).copy()).on(s,i=u),c.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,i,a=n+"";return function(){var o=ET(this,e);return o===a?null:o===r?i:i=t(r=o,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,a,n)),r}return a._value=t,a}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(HA(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,i=NA(this.node(),n).tween,a=0,o=i.length;a2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete e.__transition}}(this,e)})},nA.prototype.transition=function(e){var t,n;e instanceof Kk?(t=e._id,e=e._name):(t=Qk(),(n=eC).time=vA(),e=null==e?null:e+"");for(var r=this._groups,i=r.length,a=0;a=0;)t+=n[r].value;else t=1;e.value=t}function sC(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=lC)):void 0===t&&(t=cC);for(var n,r,i,a,o,s=new hC(e),c=[s];n=c.pop();)if((i=t(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;a>=0;--a)c.push(r=i[a]=new hC(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(fC)}function cC(e){return e.children}function lC(e){return Array.isArray(e)?e[1]:null}function uC(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function fC(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function hC(e){this.data=e,this.depth=this.height=0,this.parent=null}function dC(){return 0}["w","e"].map(aC),["n","s"].map(aC),["n","w","e","s","nw","ne","sw","se"].map(aC),hC.prototype=sC.prototype={constructor:hC,count:function(){return this.eachAfter(oC)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,i,a=this,o=[a],s=[],c=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r=0;--r)a.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return sC(this).eachBefore(uC)},[Symbol.iterator]:function*(){var e,t,n,r,i=this,a=[i];do{for(e=a.reverse(),a=[];i=e.pop();)if(yield i,t=i.children)for(n=0,r=t.length;n0&&n*n>r*r+i*i}function wC(e,t){for(var n=0;n1e-6?(k+Math.sqrt(k*k-4*A*C))/(2*A):C/k);return{x:r+_+S*M,y:i+x+T*M,r:M}}function _C(e,t,n){var r,i,a,o,s=e.x-t.x,c=e.y-t.y,l=s*s+c*c;l?(i=t.r+n.r,i*=i,o=e.r+n.r,i>(o*=o)?(r=(l+o-i)/(2*l),a=Math.sqrt(Math.max(0,o/l-r*r)),n.x=e.x-r*s-a*c,n.y=e.y-r*c+a*s):(r=(l+i-o)/(2*l),a=Math.sqrt(Math.max(0,i/l-r*r)),n.x=t.x+r*s-a*c,n.y=t.y+r*c+a*s)):(n.x=t.x+n.r,n.y=t.y)}function SC(e,t){var n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function xC(e){var t=e._,n=e.next._,r=t.r+n.r,i=(t.x*n.r+n.x*t.r)/r,a=(t.y*n.r+n.y*t.r)/r;return i*i+a*a}function TC(e){this._=e,this.next=null,this.previous=null}function AC(e,t){if(!(a=(e=function(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}(e)).length))return 0;var n,r,i,a,o,s,c,l,u,f,h;if((n=e[0]).x=0,n.y=0,!(a>1))return n.r;if(r=e[1],n.x=-r.r,r.x=n.r,r.y=0,!(a>2))return n.r+r.r;_C(r,n,i=e[2]),n=new TC(n),r=new TC(r),i=new TC(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;e:for(c=3;c(e=(1664525*e+1013904223)%pC)/pC}();return i.x=t/2,i.y=n/2,e?i.eachBefore(MC(e)).eachAfter(IC(r,.5,a)).eachBefore(OC(1)):i.eachBefore(MC(kC)).eachAfter(IC(dC,1,a)).eachAfter(IC(r,i.r/Math.min(t,n),a)).eachBefore(OC(Math.min(t,n)/(2*i.r))),i}return i.radius=function(t){return arguments.length?(e=function(e){return null==e?null:function(e){if("function"!=typeof e)throw new Error;return e}(e)}(t),i):e},i.size=function(e){return arguments.length?(t=+e[0],n=+e[1],i):[t,n]},i.padding=function(e){return arguments.length?(r="function"==typeof e?e:function(e){return function(){return e}}(+e),i):r},i}function MC(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function IC(e,t,n){return function(r){if(i=r.children){var i,a,o,s=i.length,c=e(r)*t||0;if(c)for(a=0;azC?Math.pow(e,1/3):e/BC+UC}function VC(e){return e>jC?e*e*e:BC*(e-UC)}function WC(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function qC(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function XC(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof YC)return new YC(e.h,e.c,e.l,e.opacity);if(e instanceof HC||(e=$C(e)),0===e.a&&0===e.b)return new YC(NaN,0180||n<-180?n-360*Math.round(n/360):n):Ak(isNaN(e)?t:e)});ZC(Ck);var JC=Math.sqrt(50),eM=Math.sqrt(10),tM=Math.sqrt(2);function nM(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=JC?10:a>=eM?5:a>=tM?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=JC?10:a>=eM?5:a>=tM?2:1)}function rM(e,t){return null==e||null==t?NaN:et?1:e>=t?0:NaN}function iM(e,t){return null==e||null==t?NaN:te?1:t>=e?0:NaN}function aM(e){let t,n,r;function i(e,r,i=0,a=e.length){if(i>>1;n(e[t],r)<0?i=t+1:a=t}while(irM(e(t),n),r=(t,n)=>e(t)-n):(t=e===rM||e===iM?e:oM,n=e,r=e),{left:i,center:function(e,t,n=0,a=e.length){const o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o},right:function(e,r,i=0,a=e.length){if(i>>1;n(e[t],r)<=0?i=t+1:a=t}while(i=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function TM(e){if(!(t=xM.exec(e)))throw new Error("invalid format: "+e);var t;return new AM({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function AM(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function kM(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function CM(e){return(e=kM(Math.abs(e)))?e[1]:NaN}function MM(e,t){var n=kM(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}TM.prototype=AM.prototype,AM.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const IM={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>MM(100*e,t),r:MM,s:function(e,t){var n=kM(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(SM=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+kM(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function OM(e){return e}var NM,RM,PM,LM=Array.prototype.map,DM=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function FM(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){var r,i,a,o,s=-1;if(n=+n,(e=+e)===(t=+t)&&n>0)return[e];if((r=t0){let n=Math.round(e/o),r=Math.round(t/o);for(n*ot&&--r,a=new Array(i=r-n+1);++st&&--r,a=new Array(i=r-n+1);++s=JC?i*=10:a>=eM?i*=5:a>=tM&&(i*=2),t0;){if((i=nM(c,l,n))===r)return a[o]=c,a[s]=l,t(a);if(i>0)c=Math.floor(c/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,l=Math.floor(l*i)/i}r=i}return e},e}function UM(){var e=function(){var e,t,n,r,i,a,o=mM,s=mM,c=pM,l=wM;function u(){var e=Math.min(o.length,s.length);return l!==wM&&(l=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(o[0],o[e-1])),r=e>2?EM:yM,i=a=null,f}function f(t){return null==t||isNaN(t=+t)?n:(i||(i=r(o.map(e),s,c)))(e(l(t)))}return f.invert=function(n){return l(t((a||(a=r(s,o.map(e),RA)))(n)))},f.domain=function(e){return arguments.length?(o=Array.from(e,bM),u()):o.slice()},f.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},f.rangeRound=function(e){return s=Array.from(e),c=gM,u()},f.clamp=function(e){return arguments.length?(l=!!e||wM,u()):l!==wM},f.interpolate=function(e){return arguments.length?(c=e,u()):c},f.unknown=function(e){return arguments.length?(n=e,f):n},function(n,r){return e=n,t=r,u()}}()(wM,wM);return e.copy=function(){return t=e,UM().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},_M.apply(e,arguments),FM(e)}function jM(e){return"string"==typeof e?new eA([[document.querySelector(e)]],[document.documentElement]):new eA([[e]],JT)}function BM(e,t,n){this.k=e,this.x=t,this.y=n}NM=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?OM:(t=LM.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,a=[],o=0,s=t[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(e.substring(i-=s,i+s)),!((c+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",a=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?OM:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(LM.call(e.numerals,String)),c=void 0===e.percent?"%":e.percent+"",l=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function f(e){var t=(e=TM(e)).fill,n=e.align,f=e.sign,h=e.symbol,d=e.zero,p=e.width,g=e.comma,b=e.precision,m=e.trim,w=e.type;"n"===w?(g=!0,w="g"):IM[w]||(void 0===b&&(b=12),m=!0,w="g"),(d||"0"===t&&"="===n)&&(d=!0,t="0",n="=");var v="$"===h?i:"#"===h&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",y="$"===h?a:/[%p]/.test(w)?c:"",E=IM[w],_=/[defgprs%]/.test(w);function S(e){var i,a,c,h=v,S=y;if("c"===w)S=E(e)+S,e="";else{var x=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:E(Math.abs(e),b),m&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),x&&0===+e&&"+"!==f&&(x=!1),h=(x?"("===f?f:l:"-"===f||"("===f?"":f)+h,S=("s"===w?DM[8+SM/3]:"")+S+(x&&"("===f?")":""),_)for(i=-1,a=e.length;++i(c=e.charCodeAt(i))||c>57){S=(46===c?o+e.slice(i+1):e.slice(i))+S,e=e.slice(0,i);break}}g&&!d&&(e=r(e,1/0));var T=h.length+e.length+S.length,A=T>1)+h+e+S+A.slice(T);break;default:e=A+h+e+S}return s(e)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return e+""},S}return{format:f,formatPrefix:function(e,t){var n=f(((e=TM(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(CM(t)/3))),i=Math.pow(10,-r),a=DM[8+r/3];return function(e){return n(i*e)+a}}}}({thousands:",",grouping:[3],currency:["$",""]}),RM=NM.format,PM=NM.formatPrefix,BM.prototype={constructor:BM,scale:function(e){return 1===e?this:new BM(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new BM(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new BM(1,0,0),BM.prototype;var zM=n(8006);function $M(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||HM(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function HM(e,t){if(e){if("string"==typeof e)return GM(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?GM(e,t):void 0}}function GM(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n>8&255]+vO[e>>16&255]+vO[e>>24&255]+"-"+vO[255&t]+vO[t>>8&255]+"-"+vO[t>>16&15|64]+vO[t>>24&255]+"-"+vO[63&n|128]+vO[n>>8&255]+"-"+vO[n>>16&255]+vO[n>>24&255]+vO[255&r]+vO[r>>8&255]+vO[r>>16&255]+vO[r>>24&255]).toLowerCase()}function xO(e,t,n){return Math.max(t,Math.min(n,e))}function TO(e,t){return(e%t+t)%t}function AO(e,t,n){return(1-n)*e+n*t}function kO(e){return!(e&e-1)&&0!==e}function CO(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function MO(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function IO(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(4294967295*e);case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int32Array:return Math.round(2147483647*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}const OO={DEG2RAD:EO,RAD2DEG:_O,generateUUID:SO,clamp:xO,euclideanModulo:TO,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:AO,damp:function(e,t,n,r){return AO(e,t,1-Math.exp(-n*r))},pingpong:function(e,t=1){return t-Math.abs(TO(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(yO=e);let t=yO+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function(e){return e*EO},radToDeg:function(e){return e*_O},isPowerOfTwo:kO,ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:CO,setQuaternionFromProperEuler:function(e,t,n,r,i){const a=Math.cos,o=Math.sin,s=a(n/2),c=o(n/2),l=a((t+r)/2),u=o((t+r)/2),f=a((t-r)/2),h=o((t-r)/2),d=a((r-t)/2),p=o((r-t)/2);switch(i){case"XYX":e.set(s*u,c*f,c*h,s*l);break;case"YZY":e.set(c*h,s*u,c*f,s*l);break;case"ZXZ":e.set(c*f,c*h,s*u,s*l);break;case"XZX":e.set(s*u,c*p,c*d,s*l);break;case"YXY":e.set(c*d,s*u,c*p,s*l);break;case"ZYZ":e.set(c*p,c*d,s*u,s*l);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:IO,denormalize:MO};class NO{constructor(e=0,t=0){NO.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,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,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;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,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,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,t){return this.x=e.x-t.x,this.y=e.y-t.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 t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[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,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}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 t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(xO(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class RO{constructor(e,t,n,r,i,a,o,s,c){RO.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,o,s,c)}set(e,t,n,r,i,a,o,s,c){const l=this.elements;return l[0]=e,l[1]=r,l[2]=o,l[3]=t,l[4]=i,l[5]=s,l[6]=n,l[7]=a,l[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[3],s=n[6],c=n[1],l=n[4],u=n[7],f=n[2],h=n[5],d=n[8],p=r[0],g=r[3],b=r[6],m=r[1],w=r[4],v=r[7],y=r[2],E=r[5],_=r[8];return i[0]=a*p+o*m+s*y,i[3]=a*g+o*w+s*E,i[6]=a*b+o*v+s*_,i[1]=c*p+l*m+u*y,i[4]=c*g+l*w+u*E,i[7]=c*b+l*v+u*_,i[2]=f*p+h*m+d*y,i[5]=f*g+h*w+d*E,i[8]=f*b+h*v+d*_,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8];return t*a*l-t*o*c-n*i*l+n*o*s+r*i*c-r*a*s}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=l*a-o*c,f=o*s-l*i,h=c*i-a*s,d=t*u+n*f+r*h;if(0===d)return this.set(0,0,0,0,0,0,0,0,0);const p=1/d;return e[0]=u*p,e[1]=(r*c-l*n)*p,e[2]=(o*n-r*a)*p,e[3]=f*p,e[4]=(l*t-r*s)*p,e[5]=(r*i-o*t)*p,e[6]=h*p,e[7]=(n*s-c*t)*p,e[8]=(a*t-n*i)*p,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,a,o){const s=Math.cos(i),c=Math.sin(i);return this.set(n*s,n*c,-n*(s*a+c*o)+a+e,-r*c,r*s,-r*(-c*a+s*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(PO.makeScale(e,t)),this}rotate(e){return this.premultiply(PO.makeRotation(-e)),this}translate(e,t){return this.premultiply(PO.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}const PO=new RO;function LO(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}function DO(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function FO(){const e=DO("canvas");return e.style.display="block",e}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;const UO={};function jO(e){e in UO||(UO[e]=!0,console.warn(e))}const BO=(new RO).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),zO=(new RO).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),$O={[QI]:{transfer:tO,primaries:rO,toReference:e=>e,fromReference:e=>e},[ZI]:{transfer:nO,primaries:rO,toReference:e=>e.convertSRGBToLinear(),fromReference:e=>e.convertLinearToSRGB()},[eO]:{transfer:tO,primaries:iO,toReference:e=>e.applyMatrix3(zO),fromReference:e=>e.applyMatrix3(BO)},[JI]:{transfer:nO,primaries:iO,toReference:e=>e.convertSRGBToLinear().applyMatrix3(zO),fromReference:e=>e.applyMatrix3(BO).convertLinearToSRGB()}},HO=new Set([QI,eO]),GO={enabled:!0,_workingColorSpace:QI,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(e){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!e},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(e){if(!HO.has(e))throw new Error(`Unsupported working color space, "${e}".`);this._workingColorSpace=e},convert:function(e,t,n){if(!1===this.enabled||t===n||!t||!n)return e;const r=$O[t].toReference;return(0,$O[n].fromReference)(r(e))},fromWorkingColorSpace:function(e,t){return this.convert(e,this._workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this._workingColorSpace)},getPrimaries:function(e){return $O[e].primaries},getTransfer:function(e){return e===KI?tO:$O[e].transfer}};function VO(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function WO(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}let qO;class XO{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===qO&&(qO=DO("canvas")),qO.width=e.width,qO.height=e.height;const n=qO.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=qO}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=DO("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(300!==this.mapping)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case SI:e.x=e.x-Math.floor(e.x);break;case xI:e.x=e.x<0?0:1;break;case TI:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case SI:e.y=e.y-Math.floor(e.y);break;case xI:e.y=e.y<0?0:1;break;case TI:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return jO("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===ZI?YI:3e3}set encoding(e){jO("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===YI?ZI:KI}}JO.DEFAULT_IMAGE=null,JO.DEFAULT_MAPPING=300,JO.DEFAULT_ANISOTROPY=1;class eN{constructor(e=0,t=0,n=0,r=1){eN.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,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,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;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=void 0!==e.w?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,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,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,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.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 t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i;const a=.01,o=.1,s=e.elements,c=s[0],l=s[4],u=s[8],f=s[1],h=s[5],d=s[9],p=s[2],g=s[6],b=s[10];if(Math.abs(l-f)s&&e>m?em?s=0?1:-1,r=1-t*t;if(r>Number.EPSILON){const i=Math.sqrt(r),a=Math.atan2(i,t*n);e=Math.sin(e*a)/i,o=Math.sin(o*a)/i}const i=o*n;if(s=s*e+f*i,c=c*e+h*i,l=l*e+d*i,u=u*e+p*i,e===1-o){const e=1/Math.sqrt(s*s+c*c+l*l+u*u);s*=e,c*=e,l*=e,u*=e}}e[t]=s,e[t+1]=c,e[t+2]=l,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,a){const o=n[r],s=n[r+1],c=n[r+2],l=n[r+3],u=i[a],f=i[a+1],h=i[a+2],d=i[a+3];return e[t]=o*d+l*u+s*h-c*f,e[t+1]=s*d+l*f+c*u-o*h,e[t+2]=c*d+l*h+o*f-s*u,e[t+3]=l*d-o*u-s*f-c*h,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,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,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,t){const n=e._x,r=e._y,i=e._z,a=e._order,o=Math.cos,s=Math.sin,c=o(n/2),l=o(r/2),u=o(i/2),f=s(n/2),h=s(r/2),d=s(i/2);switch(a){case"XYZ":this._x=f*l*u+c*h*d,this._y=c*h*u-f*l*d,this._z=c*l*d+f*h*u,this._w=c*l*u-f*h*d;break;case"YXZ":this._x=f*l*u+c*h*d,this._y=c*h*u-f*l*d,this._z=c*l*d-f*h*u,this._w=c*l*u+f*h*d;break;case"ZXY":this._x=f*l*u-c*h*d,this._y=c*h*u+f*l*d,this._z=c*l*d+f*h*u,this._w=c*l*u-f*h*d;break;case"ZYX":this._x=f*l*u-c*h*d,this._y=c*h*u+f*l*d,this._z=c*l*d-f*h*u,this._w=c*l*u+f*h*d;break;case"YZX":this._x=f*l*u+c*h*d,this._y=c*h*u+f*l*d,this._z=c*l*d-f*h*u,this._w=c*l*u-f*h*d;break;case"XZY":this._x=f*l*u-c*h*d,this._y=c*h*u-f*l*d,this._z=c*l*d+f*h*u,this._w=c*l*u+f*h*d;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],o=t[5],s=t[9],c=t[2],l=t[6],u=t[10],f=n+o+u;if(f>0){const e=.5/Math.sqrt(f+1);this._w=.25/e,this._x=(l-s)*e,this._y=(i-c)*e,this._z=(a-r)*e}else if(n>o&&n>u){const e=2*Math.sqrt(1+n-o-u);this._w=(l-s)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+c)/e}else if(o>u){const e=2*Math.sqrt(1+o-n-u);this._w=(i-c)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(s+l)/e}else{const e=2*Math.sqrt(1+u-n-o);this._w=(a-r)/e,this._x=(i+c)/e,this._y=(s+l)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return nMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(xO(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),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 0===e?(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,t){const n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,c=t._z,l=t._w;return this._x=n*l+a*o+r*c-i*s,this._y=r*l+a*s+i*o-n*c,this._z=i*l+a*c+n*s-r*o,this._w=a*l-n*o-r*s-i*c,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,r=this._y,i=this._z,a=this._w;let o=a*e._w+n*e._x+r*e._y+i*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=n,this._y=r,this._z=i,this;const s=1-o*o;if(s<=Number.EPSILON){const e=1-t;return this._w=e*a+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this._onChangeCallback(),this}const c=Math.sqrt(s),l=Math.atan2(c,o),u=Math.sin((1-t)*l)/c,f=Math.sin(t*l)/c;return this._w=a*u+this._w*f,this._x=n*u+this._x*f,this._y=r*u+this._y*f,this._z=i*u+this._z*f,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),r=2*Math.PI*Math.random(),i=2*Math.PI*Math.random();return this.set(t*Math.cos(r),n*Math.sin(i),n*Math.cos(i),t*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),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 oN{constructor(e=0,t=0,n=0){oN.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,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,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;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,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,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,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.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,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(cN.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(cN.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,c=2*(a*r-o*n),l=2*(o*t-i*r),u=2*(i*n-a*t);return this.x=t+s*c+a*u-o*l,this.y=n+s*l+o*c-i*u,this.z=r+s*u+i*l-a*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 t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,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,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}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,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return sN.copy(this).projectOnVector(e),this.sub(sN)}reflect(e){return this.sub(sN.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(xO(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}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,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}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,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const sN=new oN,cN=new aN;class lN{constructor(e=new oN(1/0,1/0,1/0),t=new oN(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;tthis.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,t){return t.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,fN),fN.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(vN),yN.subVectors(this.max,vN),dN.subVectors(e.a,vN),pN.subVectors(e.b,vN),gN.subVectors(e.c,vN),bN.subVectors(pN,dN),mN.subVectors(gN,pN),wN.subVectors(dN,gN);let t=[0,-bN.z,bN.y,0,-mN.z,mN.y,0,-wN.z,wN.y,bN.z,0,-bN.x,mN.z,0,-mN.x,wN.z,0,-wN.x,-bN.y,bN.x,0,-mN.y,mN.x,0,-wN.y,wN.x,0];return!!SN(t,dN,pN,gN,yN)&&(t=[1,0,0,0,1,0,0,0,1],!!SN(t,dN,pN,gN,yN)&&(EN.crossVectors(bN,mN),t=[EN.x,EN.y,EN.z],SN(t,dN,pN,gN,yN)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,fN).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(fN).length()),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()||(uN[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),uN[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),uN[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),uN[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),uN[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),uN[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),uN[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),uN[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(uN)),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 uN=[new oN,new oN,new oN,new oN,new oN,new oN,new oN,new oN],fN=new oN,hN=new lN,dN=new oN,pN=new oN,gN=new oN,bN=new oN,mN=new oN,wN=new oN,vN=new oN,yN=new oN,EN=new oN,_N=new oN;function SN(e,t,n,r,i){for(let a=0,o=e.length-3;a<=o;a+=3){_N.fromArray(e,a);const o=i.x*Math.abs(_N.x)+i.y*Math.abs(_N.y)+i.z*Math.abs(_N.z),s=t.dot(_N),c=n.dot(_N),l=r.dot(_N);if(Math.max(-Math.max(s,c,l),Math.min(s,c,l))>o)return!1}return!0}const xN=new lN,TN=new oN,AN=new oN;class kN{constructor(e=new oN,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):xN.setFromPoints(e).getCenter(n);let r=0;for(let t=0,i=e.length;tthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}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;TN.subVectors(e,this.center);const t=TN.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.addScaledVector(TN,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(AN.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(TN.copy(e.center).add(AN)),this.expandByPoint(TN.copy(e.center).sub(AN))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const CN=new oN,MN=new oN,IN=new oN,ON=new oN,NN=new oN,RN=new oN,PN=new oN;class LN{constructor(e=new oN,t=new oN(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.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,CN)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=CN.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(CN.copy(this.origin).addScaledVector(this.direction,t),CN.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){MN.copy(e).add(t).multiplyScalar(.5),IN.copy(t).sub(e).normalize(),ON.copy(this.origin).sub(MN);const i=.5*e.distanceTo(t),a=-this.direction.dot(IN),o=ON.dot(this.direction),s=-ON.dot(IN),c=ON.lengthSq(),l=Math.abs(1-a*a);let u,f,h,d;if(l>0)if(u=a*s-o,f=a*o-s,d=i*l,u>=0)if(f>=-d)if(f<=d){const e=1/l;u*=e,f*=e,h=u*(u+a*f+2*o)+f*(a*u+f+2*s)+c}else f=i,u=Math.max(0,-(a*f+o)),h=-u*u+f*(f+2*s)+c;else f=-i,u=Math.max(0,-(a*f+o)),h=-u*u+f*(f+2*s)+c;else f<=-d?(u=Math.max(0,-(-a*i+o)),f=u>0?-i:Math.min(Math.max(-i,-s),i),h=-u*u+f*(f+2*s)+c):f<=d?(u=0,f=Math.min(Math.max(-i,-s),i),h=f*(f+2*s)+c):(u=Math.max(0,-(a*i+o)),f=u>0?i:Math.min(Math.max(-i,-s),i),h=-u*u+f*(f+2*s)+c);else f=a>0?-i:i,u=Math.max(0,-(a*f+o)),h=-u*u+f*(f+2*s)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(MN).addScaledVector(IN,f),h}intersectSphere(e,t){CN.subVectors(e.center,this.origin);const n=CN.dot(this.direction),r=CN.dot(CN)-n*n,i=e.radius*e.radius;if(r>i)return null;const a=Math.sqrt(i-r),o=n-a,s=n+a;return s<0?null:o<0?this.at(s,t):this.at(o,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,a,o,s;const c=1/this.direction.x,l=1/this.direction.y,u=1/this.direction.z,f=this.origin;return c>=0?(n=(e.min.x-f.x)*c,r=(e.max.x-f.x)*c):(n=(e.max.x-f.x)*c,r=(e.min.x-f.x)*c),l>=0?(i=(e.min.y-f.y)*l,a=(e.max.y-f.y)*l):(i=(e.max.y-f.y)*l,a=(e.min.y-f.y)*l),n>a||i>r?null:((i>n||isNaN(n))&&(n=i),(a=0?(o=(e.min.z-f.z)*u,s=(e.max.z-f.z)*u):(o=(e.max.z-f.z)*u,s=(e.min.z-f.z)*u),n>s||o>r?null:((o>n||n!=n)&&(n=o),(s=0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,CN)}intersectTriangle(e,t,n,r,i){NN.subVectors(t,e),RN.subVectors(n,e),PN.crossVectors(NN,RN);let a,o=this.direction.dot(PN);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}ON.subVectors(this.origin,e);const s=a*this.direction.dot(RN.crossVectors(ON,RN));if(s<0)return null;const c=a*this.direction.dot(NN.cross(ON));if(c<0)return null;if(s+c>o)return null;const l=-a*ON.dot(PN);return l<0?null:this.at(l/o,i)}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 DN{constructor(e,t,n,r,i,a,o,s,c,l,u,f,h,d,p,g){DN.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,o,s,c,l,u,f,h,d,p,g)}set(e,t,n,r,i,a,o,s,c,l,u,f,h,d,p,g){const b=this.elements;return b[0]=e,b[4]=t,b[8]=n,b[12]=r,b[1]=i,b[5]=a,b[9]=o,b[13]=s,b[2]=c,b[6]=l,b[10]=u,b[14]=f,b[3]=h,b[7]=d,b[11]=p,b[15]=g,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 DN).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,r=1/FN.setFromMatrixColumn(e,0).length(),i=1/FN.setFromMatrixColumn(e,1).length(),a=1/FN.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),o=Math.sin(n),s=Math.cos(r),c=Math.sin(r),l=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){const e=a*l,n=a*u,r=o*l,i=o*u;t[0]=s*l,t[4]=-s*u,t[8]=c,t[1]=n+r*c,t[5]=e-i*c,t[9]=-o*s,t[2]=i-e*c,t[6]=r+n*c,t[10]=a*s}else if("YXZ"===e.order){const e=s*l,n=s*u,r=c*l,i=c*u;t[0]=e+i*o,t[4]=r*o-n,t[8]=a*c,t[1]=a*u,t[5]=a*l,t[9]=-o,t[2]=n*o-r,t[6]=i+e*o,t[10]=a*s}else if("ZXY"===e.order){const e=s*l,n=s*u,r=c*l,i=c*u;t[0]=e-i*o,t[4]=-a*u,t[8]=r+n*o,t[1]=n+r*o,t[5]=a*l,t[9]=i-e*o,t[2]=-a*c,t[6]=o,t[10]=a*s}else if("ZYX"===e.order){const e=a*l,n=a*u,r=o*l,i=o*u;t[0]=s*l,t[4]=r*c-n,t[8]=e*c+i,t[1]=s*u,t[5]=i*c+e,t[9]=n*c-r,t[2]=-c,t[6]=o*s,t[10]=a*s}else if("YZX"===e.order){const e=a*s,n=a*c,r=o*s,i=o*c;t[0]=s*l,t[4]=i-e*u,t[8]=r*u+n,t[1]=u,t[5]=a*l,t[9]=-o*l,t[2]=-c*l,t[6]=n*u+r,t[10]=e-i*u}else if("XZY"===e.order){const e=a*s,n=a*c,r=o*s,i=o*c;t[0]=s*l,t[4]=-u,t[8]=c*l,t[1]=e*u+i,t[5]=a*l,t[9]=n*u-r,t[2]=r*u-n,t[6]=o*l,t[10]=i*u+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(jN,e,BN)}lookAt(e,t,n){const r=this.elements;return HN.subVectors(e,t),0===HN.lengthSq()&&(HN.z=1),HN.normalize(),zN.crossVectors(n,HN),0===zN.lengthSq()&&(1===Math.abs(n.z)?HN.x+=1e-4:HN.z+=1e-4,HN.normalize(),zN.crossVectors(n,HN)),zN.normalize(),$N.crossVectors(HN,zN),r[0]=zN.x,r[4]=$N.x,r[8]=HN.x,r[1]=zN.y,r[5]=$N.y,r[9]=HN.y,r[2]=zN.z,r[6]=$N.z,r[10]=HN.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[4],s=n[8],c=n[12],l=n[1],u=n[5],f=n[9],h=n[13],d=n[2],p=n[6],g=n[10],b=n[14],m=n[3],w=n[7],v=n[11],y=n[15],E=r[0],_=r[4],S=r[8],x=r[12],T=r[1],A=r[5],k=r[9],C=r[13],M=r[2],I=r[6],O=r[10],N=r[14],R=r[3],P=r[7],L=r[11],D=r[15];return i[0]=a*E+o*T+s*M+c*R,i[4]=a*_+o*A+s*I+c*P,i[8]=a*S+o*k+s*O+c*L,i[12]=a*x+o*C+s*N+c*D,i[1]=l*E+u*T+f*M+h*R,i[5]=l*_+u*A+f*I+h*P,i[9]=l*S+u*k+f*O+h*L,i[13]=l*x+u*C+f*N+h*D,i[2]=d*E+p*T+g*M+b*R,i[6]=d*_+p*A+g*I+b*P,i[10]=d*S+p*k+g*O+b*L,i[14]=d*x+p*C+g*N+b*D,i[3]=m*E+w*T+v*M+y*R,i[7]=m*_+w*A+v*I+y*P,i[11]=m*S+w*k+v*O+y*L,i[15]=m*x+w*C+v*N+y*D,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],o=e[5],s=e[9],c=e[13],l=e[2],u=e[6],f=e[10],h=e[14];return e[3]*(+i*s*u-r*c*u-i*o*f+n*c*f+r*o*h-n*s*h)+e[7]*(+t*s*h-t*c*f+i*a*f-r*a*h+r*c*l-i*s*l)+e[11]*(+t*c*u-t*o*h-i*a*u+n*a*h+i*o*l-n*c*l)+e[15]*(-r*o*l-t*s*u+t*o*f+r*a*u-n*a*f+n*s*l)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=e[9],f=e[10],h=e[11],d=e[12],p=e[13],g=e[14],b=e[15],m=u*g*c-p*f*c+p*s*h-o*g*h-u*s*b+o*f*b,w=d*f*c-l*g*c-d*s*h+a*g*h+l*s*b-a*f*b,v=l*p*c-d*u*c+d*o*h-a*p*h-l*o*b+a*u*b,y=d*u*s-l*p*s-d*o*f+a*p*f+l*o*g-a*u*g,E=t*m+n*w+r*v+i*y;if(0===E)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const _=1/E;return e[0]=m*_,e[1]=(p*f*i-u*g*i-p*r*h+n*g*h+u*r*b-n*f*b)*_,e[2]=(o*g*i-p*s*i+p*r*c-n*g*c-o*r*b+n*s*b)*_,e[3]=(u*s*i-o*f*i-u*r*c+n*f*c+o*r*h-n*s*h)*_,e[4]=w*_,e[5]=(l*g*i-d*f*i+d*r*h-t*g*h-l*r*b+t*f*b)*_,e[6]=(d*s*i-a*g*i-d*r*c+t*g*c+a*r*b-t*s*b)*_,e[7]=(a*f*i-l*s*i+l*r*c-t*f*c-a*r*h+t*s*h)*_,e[8]=v*_,e[9]=(d*u*i-l*p*i-d*n*h+t*p*h+l*n*b-t*u*b)*_,e[10]=(a*p*i-d*o*i+d*n*c-t*p*c-a*n*b+t*o*b)*_,e[11]=(l*o*i-a*u*i-l*n*c+t*u*c+a*n*h-t*o*h)*_,e[12]=y*_,e[13]=(l*p*r-d*u*r+d*n*f-t*p*f-l*n*g+t*u*g)*_,e[14]=(d*o*r-a*p*r-d*n*s+t*p*s+a*n*g-t*o*g)*_,e[15]=(a*u*r-l*o*r+l*n*s-t*u*s-a*n*f+t*o*f)*_,this}scale(e){const t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){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,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,o=e.y,s=e.z,c=i*a,l=i*o;return this.set(c*a+n,c*o-r*s,c*s+r*o,0,c*o+r*s,l*o+n,l*s-r*a,0,c*s-r*o,l*s+r*a,i*s*s+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,a){return this.set(1,n,i,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,a=t._y,o=t._z,s=t._w,c=i+i,l=a+a,u=o+o,f=i*c,h=i*l,d=i*u,p=a*l,g=a*u,b=o*u,m=s*c,w=s*l,v=s*u,y=n.x,E=n.y,_=n.z;return r[0]=(1-(p+b))*y,r[1]=(h+v)*y,r[2]=(d-w)*y,r[3]=0,r[4]=(h-v)*E,r[5]=(1-(f+b))*E,r[6]=(g+m)*E,r[7]=0,r[8]=(d+w)*_,r[9]=(g-m)*_,r[10]=(1-(f+p))*_,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;let i=FN.set(r[0],r[1],r[2]).length();const a=FN.set(r[4],r[5],r[6]).length(),o=FN.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],UN.copy(this);const s=1/i,c=1/a,l=1/o;return UN.elements[0]*=s,UN.elements[1]*=s,UN.elements[2]*=s,UN.elements[4]*=c,UN.elements[5]*=c,UN.elements[6]*=c,UN.elements[8]*=l,UN.elements[9]*=l,UN.elements[10]*=l,t.setFromRotationMatrix(UN),n.x=i,n.y=a,n.z=o,this}makePerspective(e,t,n,r,i,a,o=2e3){const s=this.elements,c=2*i/(t-e),l=2*i/(n-r),u=(t+e)/(t-e),f=(n+r)/(n-r);let h,d;if(o===bO)h=-(a+i)/(a-i),d=-2*a*i/(a-i);else{if(o!==mO)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);h=-a/(a-i),d=-a*i/(a-i)}return s[0]=c,s[4]=0,s[8]=u,s[12]=0,s[1]=0,s[5]=l,s[9]=f,s[13]=0,s[2]=0,s[6]=0,s[10]=h,s[14]=d,s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this}makeOrthographic(e,t,n,r,i,a,o=2e3){const s=this.elements,c=1/(t-e),l=1/(n-r),u=1/(a-i),f=(t+e)*c,h=(n+r)*l;let d,p;if(o===bO)d=(a+i)*u,p=-2*u;else{if(o!==mO)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);d=i*u,p=-1*u}return s[0]=2*c,s[4]=0,s[8]=0,s[12]=-f,s[1]=0,s[5]=2*l,s[9]=0,s[13]=-h,s[2]=0,s[6]=0,s[10]=p,s[14]=-d,s[3]=0,s[7]=0,s[11]=0,s[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const FN=new oN,UN=new DN,jN=new oN(0,0,0),BN=new oN(1,1,1),zN=new oN,$N=new oN,HN=new oN,GN=new DN,VN=new aN;class WN{constructor(e=0,t=0,n=0,r=WN.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=r}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,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,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,t=this._order,n=!0){const r=e.elements,i=r[0],a=r[4],o=r[8],s=r[1],c=r[5],l=r[9],u=r[2],f=r[6],h=r[10];switch(t){case"XYZ":this._y=Math.asin(xO(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-l,h),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(f,c),this._z=0);break;case"YXZ":this._x=Math.asin(-xO(l,-1,1)),Math.abs(l)<.9999999?(this._y=Math.atan2(o,h),this._z=Math.atan2(s,c)):(this._y=Math.atan2(-u,i),this._z=0);break;case"ZXY":this._x=Math.asin(xO(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-u,h),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(s,i));break;case"ZYX":this._y=Math.asin(-xO(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(f,h),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(xO(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-l,c),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(o,h));break;case"XZY":this._z=Math.asin(-xO(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(f,c),this._y=Math.atan2(o,i)):(this._x=Math.atan2(-l,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return GN.makeRotationFromQuaternion(e),this.setFromRotationMatrix(GN,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return VN.setFromEuler(this),this.setFromQuaternion(VN,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],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+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}}WN.DEFAULT_ORDER="XYZ";class qN{constructor(){this.mask=1}set(e){this.mask=1<>>0}enable(e){this.mask|=1<1){for(let e=0;e1){for(let e=0;e0&&(n=n.concat(i))}return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(JN,e,eR),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(JN,tR,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t0){r.children=[];for(let t=0;t0){r.animations=[];for(let t=0;t0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),o.length>0&&(n.images=o),s.length>0&&(n.shapes=s),c.length>0&&(n.skeletons=c),l.length>0&&(n.animations=l),u.length>0&&(n.nodes=u)}return n.object=r,n;function a(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!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.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,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)),!0===t)for(let t=0;t0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){cR.subVectors(r,t),lR.subVectors(n,t),uR.subVectors(e,t);const a=cR.dot(cR),o=cR.dot(lR),s=cR.dot(uR),c=lR.dot(lR),l=lR.dot(uR),u=a*c-o*o;if(0===u)return i.set(-2,-1,-1);const f=1/u,h=(c*s-o*l)*f,d=(a*l-o*s)*f;return i.set(1-h-d,d,h)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,fR),fR.x>=0&&fR.y>=0&&fR.x+fR.y<=1}static getUV(e,t,n,r,i,a,o,s){return!1===wR&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),wR=!0),this.getInterpolation(e,t,n,r,i,a,o,s)}static getInterpolation(e,t,n,r,i,a,o,s){return this.getBarycoord(e,t,n,r,fR),s.setScalar(0),s.addScaledVector(i,fR.x),s.addScaledVector(a,fR.y),s.addScaledVector(o,fR.z),s}static isFrontFacing(e,t,n,r){return cR.subVectors(n,t),lR.subVectors(e,t),cR.cross(lR).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),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 cR.subVectors(this.c,this.b),lR.subVectors(this.a,this.b),.5*cR.cross(lR).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return vR.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return vR.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return!1===wR&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),wR=!0),vR.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}getInterpolation(e,t,n,r,i){return vR.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return vR.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return vR.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,i=this.c;let a,o;hR.subVectors(r,n),dR.subVectors(i,n),gR.subVectors(e,n);const s=hR.dot(gR),c=dR.dot(gR);if(s<=0&&c<=0)return t.copy(n);bR.subVectors(e,r);const l=hR.dot(bR),u=dR.dot(bR);if(l>=0&&u<=l)return t.copy(r);const f=s*u-l*c;if(f<=0&&s>=0&&l<=0)return a=s/(s-l),t.copy(n).addScaledVector(hR,a);mR.subVectors(e,i);const h=hR.dot(mR),d=dR.dot(mR);if(d>=0&&h<=d)return t.copy(i);const p=h*c-s*d;if(p<=0&&c>=0&&d<=0)return o=c/(c-d),t.copy(n).addScaledVector(dR,o);const g=l*d-h*u;if(g<=0&&u-l>=0&&h-d>=0)return pR.subVectors(i,r),o=(u-l)/(u-l+(h-d)),t.copy(r).addScaledVector(pR,o);const b=1/(g+p+f);return a=p*b,o=f*b,t.copy(n).addScaledVector(hR,a).addScaledVector(dR,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const yR={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},ER={h:0,s:0,l:0},_R={h:0,s:0,l:0};function SR(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}class xR{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(void 0===t&&void 0===n){const t=e;t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=ZI){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,GO.toWorkingColorSpace(this,t),this}setRGB(e,t,n,r=GO.workingColorSpace){return this.r=e,this.g=t,this.b=n,GO.toWorkingColorSpace(this,r),this}setHSL(e,t,n,r=GO.workingColorSpace){if(e=TO(e,1),t=xO(t,0,1),n=xO(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=SR(i,r,e+1/3),this.g=SR(i,r,e),this.b=SR(i,r,e-1/3)}return GO.toWorkingColorSpace(this,r),this}setStyle(e,t=ZI){function n(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let i;const a=r[1],o=r[2];switch(a){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,t);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,t);break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const n=r[1],i=n.length;if(3===i)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(6===i)return this.setHex(parseInt(n,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=ZI){const n=yR[e.toLowerCase()];return void 0!==n?this.setHex(n,t):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=VO(e.r),this.g=VO(e.g),this.b=VO(e.b),this}copyLinearToSRGB(e){return this.r=WO(e.r),this.g=WO(e.g),this.b=WO(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=ZI){return GO.fromWorkingColorSpace(TR.copy(this),e),65536*Math.round(xO(255*TR.r,0,255))+256*Math.round(xO(255*TR.g,0,255))+Math.round(xO(255*TR.b,0,255))}getHexString(e=ZI){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=GO.workingColorSpace){GO.fromWorkingColorSpace(TR.copy(this),t);const n=TR.r,r=TR.g,i=TR.b,a=Math.max(n,r,i),o=Math.min(n,r,i);let s,c;const l=(o+a)/2;if(o===a)s=0,c=0;else{const e=a-o;switch(c=l<=.5?e/(a+o):e/(2-a-o),a){case n:s=(r-i)/e+(r0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),0!==this.side&&(n.side=this.side),!0===this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=!0),204!==this.blendSrc&&(n.blendSrc=this.blendSrc),205!==this.blendDst&&(n.blendDst=this.blendDst),this.blendEquation!==nI&&(n.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(n.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(n.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(n.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(n.depthFunc=this.depthFunc),!1===this.depthTest&&(n.depthTest=this.depthTest),!1===this.depthWrite&&(n.depthWrite=this.depthWrite),!1===this.colorWrite&&(n.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(n.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(n.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(n.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==aO&&(n.stencilFail=this.stencilFail),this.stencilZFail!==aO&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==aO&&(n.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(n.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaHash&&(n.alphaHash=!0),!0===this.alphaToCoverage&&(n.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=!0),!0===this.forceSinglePass&&(n.forceSinglePass=!0),!0===this.wireframe&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}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 t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,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){!0===e&&this.version++}}class CR extends kR{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new xR(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.combine=0,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.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 MR=new oN,IR=new NO;class OR{constructor(e,t,n=!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=t,this.count=void 0!==e?e.length/t:0,this.normalized=n,this.usage=35044,this.updateRange={offset:0,count:-1},this.gpuType=LI,this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}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,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const t in n){const r=n[t];e.data.attributes[t]=r.toJSON(e.data)}const r={};let i=!1;for(const t in this.morphAttributes){const n=this.morphAttributes[t],a=[];for(let t=0,r=n.length;t0&&(r[t]=a,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return null!==o&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.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 t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const r=e.attributes;for(const e in r){const n=r[e];this.setAttribute(e,n.clone(t))}const i=e.morphAttributes;for(const e in i){const n=[],r=i[e];for(let e=0,i=r.length;e0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e(e.far-e.near)**2)return}HR.copy(i).invert(),GR.copy(e.ray).applyMatrix4(HR),null!==n.boundingBox&&!1===GR.intersectsBox(n.boundingBox)||this._computeIntersections(e,t,GR)}}_computeIntersections(e,t,n){let r;const i=this.geometry,a=this.material,o=i.index,s=i.attributes.position,c=i.attributes.uv,l=i.attributes.uv1,u=i.attributes.normal,f=i.groups,h=i.drawRange;if(null!==o)if(Array.isArray(a))for(let i=0,s=f.length;in.far?null:{distance:l,point:aP.clone(),object:e}}(e,t,n,r,qR,XR,YR,iP);if(u){i&&(QR.fromBufferAttribute(i,s),JR.fromBufferAttribute(i,c),eP.fromBufferAttribute(i,l),u.uv=vR.getInterpolation(iP,qR,XR,YR,QR,JR,eP,new NO)),a&&(QR.fromBufferAttribute(a,s),JR.fromBufferAttribute(a,c),eP.fromBufferAttribute(a,l),u.uv1=vR.getInterpolation(iP,qR,XR,YR,QR,JR,eP,new NO),u.uv2=u.uv1),o&&(tP.fromBufferAttribute(o,s),nP.fromBufferAttribute(o,c),rP.fromBufferAttribute(o,l),u.normal=vR.getInterpolation(iP,qR,XR,YR,tP,nP,rP,new oN),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const e={a:s,b:c,c:l,normal:new oN,materialIndex:0};vR.getNormal(qR,XR,YR,e.normal),u.face=e}return u}class cP extends $R{constructor(e=1,t=1,n=1,r=1,i=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};const o=this;r=Math.floor(r),i=Math.floor(i),a=Math.floor(a);const s=[],c=[],l=[],u=[];let f=0,h=0;function d(e,t,n,r,i,a,d,p,g,b,m){const w=a/g,v=d/b,y=a/2,E=d/2,_=p/2,S=g+1,x=b+1;let T=0,A=0;const k=new oN;for(let a=0;a0?1:-1,l.push(k.x,k.y,k.z),u.push(s/g),u.push(1-a/b),T+=1}}for(let e=0;e0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class pP extends sR{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new DN,this.projectionMatrix=new DN,this.projectionMatrixInverse=new DN,this.coordinateSystem=bO}copy(e,t){return super.copy(e,t),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,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class gP extends pP{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),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=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*_O*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*EO*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*_O*Math.atan(Math.tan(.5*EO*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,i,a){this.aspect=e/t,null===this.view&&(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=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*EO*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const a=this.view;if(null!==this.view&&this.view.enabled){const e=a.fullWidth,o=a.fullHeight;i+=a.offsetX*r/e,t-=a.offsetY*n/o,r*=a.width/e,n*=a.height/o}const o=this.filmOffset;0!==o&&(i+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const bP=-90;class mP extends sR{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new gP(bP,1,e,t);r.layers=this.layers,this.add(r);const i=new gP(bP,1,e,t);i.layers=this.layers,this.add(i);const a=new gP(bP,1,e,t);a.layers=this.layers,this.add(a);const o=new gP(bP,1,e,t);o.layers=this.layers,this.add(o);const s=new gP(bP,1,e,t);s.layers=this.layers,this.add(s);const c=new gP(bP,1,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,r,i,a,o,s]=t;for(const e of t)this.remove(e);if(e===bO)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),s.up.set(0,1,0),s.lookAt(0,0,-1);else{if(e!==mO)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),s.up.set(0,-1,0),s.lookAt(0,0,-1)}for(const e of t)this.add(e),e.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[i,a,o,s,c,l]=this.children,u=e.getRenderTarget(),f=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),d=e.xr.enabled;e.xr.enabled=!1;const p=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,r),e.render(t,i),e.setRenderTarget(n,1,r),e.render(t,a),e.setRenderTarget(n,2,r),e.render(t,o),e.setRenderTarget(n,3,r),e.render(t,s),e.setRenderTarget(n,4,r),e.render(t,c),n.texture.generateMipmaps=p,e.setRenderTarget(n,5,r),e.render(t,l),e.setRenderTarget(u,f,h),e.xr.enabled=d,n.texture.needsPMREMUpdate=!0}}class wP extends JO{constructor(e,t,n,r,i,a,o,s,c,l){super(e=void 0!==e?e:[],t=void 0!==t?t:yI,n,r,i,a,o,s,c,l),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class vP extends nN{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];void 0!==t.encoding&&(jO("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===YI?ZI:KI),this.texture=new wP(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:MI}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={tEquirect:{value:null}},r="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",i="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",a=new cP(5,5,5),o=new dP({name:"CubemapFromEquirect",uniforms:lP(n),vertexShader:r,fragmentShader:i,side:1,blending:0});o.uniforms.tEquirect.value=t;const s=new oP(a,o),c=t.minFilter;return t.minFilter===OI&&(t.minFilter=MI),new mP(1,10,this).update(e,s),t.minFilter=c,s.geometry.dispose(),s.material.dispose(),this}clear(e,t,n,r){const i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}}const yP=new oN,EP=new oN,_P=new RO;class SP{constructor(e=new oN(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=yP.subVectors(n,t).cross(EP.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,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,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta(yP),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(e.start).addScaledVector(n,i)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>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,t){const n=t||_P.getNormalMatrix(e),r=this.coplanarPoint(yP).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),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 xP=new kN,TP=new oN;class AP{constructor(e=new SP,t=new SP,n=new SP,r=new SP,i=new SP,a=new SP){this.planes=[e,t,n,r,i,a]}set(e,t,n,r,i,a){const o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(i),o[5].copy(a),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=2e3){const n=this.planes,r=e.elements,i=r[0],a=r[1],o=r[2],s=r[3],c=r[4],l=r[5],u=r[6],f=r[7],h=r[8],d=r[9],p=r[10],g=r[11],b=r[12],m=r[13],w=r[14],v=r[15];if(n[0].setComponents(s-i,f-c,g-h,v-b).normalize(),n[1].setComponents(s+i,f+c,g+h,v+b).normalize(),n[2].setComponents(s+a,f+l,g+d,v+m).normalize(),n[3].setComponents(s-a,f-l,g-d,v-m).normalize(),n[4].setComponents(s-o,f-u,g-p,v-w).normalize(),t===bO)n[5].setComponents(s+o,f+u,g+p,v+w).normalize();else{if(t!==mO)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);n[5].setComponents(o,u,p,w).normalize()}return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),xP.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),xP.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(xP)}intersectsSprite(e){return xP.center.set(0,0,0),xP.radius=.7071067811865476,xP.applyMatrix4(e.matrixWorld),this.intersectsSphere(xP)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(n)0?e.max.x:e.min.x,TP.y=r.normal.y>0?e.max.y:e.min.y,TP.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(TP)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function kP(){let e=null,t=!1,n=null,r=null;function i(t,a){n(t,a),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function CP(e,t){const n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){const e=r.get(t);return void((!e||e.version 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn 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 );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid 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 ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid 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 ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid 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 ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid 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 ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid 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 ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid 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 ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tanisotropyV /= material.anisotropy;\n\tmaterial.anisotropy = saturate( material.anisotropy );\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x - tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x + tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat 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 ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid 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 ) {\n#else\nvoid 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 ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid 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 ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid 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 ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid 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 ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid 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) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = 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 );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tuniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = 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 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},OP={common:{diffuse:{value:new xR(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new RO},alphaMap:{value:null},alphaMapTransform:{value:new RO},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new RO}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new RO}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new RO}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new RO},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new RO},normalScale:{value:new NO(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new RO},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new RO}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new RO}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new RO}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new xR(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 xR(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new RO},alphaTest:{value:0},uvTransform:{value:new RO}},sprite:{diffuse:{value:new xR(16777215)},opacity:{value:1},center:{value:new NO(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new RO},alphaMap:{value:null},alphaMapTransform:{value:new RO},alphaTest:{value:0}}},NP={basic:{uniforms:uP([OP.common,OP.specularmap,OP.envmap,OP.aomap,OP.lightmap,OP.fog]),vertexShader:IP.meshbasic_vert,fragmentShader:IP.meshbasic_frag},lambert:{uniforms:uP([OP.common,OP.specularmap,OP.envmap,OP.aomap,OP.lightmap,OP.emissivemap,OP.bumpmap,OP.normalmap,OP.displacementmap,OP.fog,OP.lights,{emissive:{value:new xR(0)}}]),vertexShader:IP.meshlambert_vert,fragmentShader:IP.meshlambert_frag},phong:{uniforms:uP([OP.common,OP.specularmap,OP.envmap,OP.aomap,OP.lightmap,OP.emissivemap,OP.bumpmap,OP.normalmap,OP.displacementmap,OP.fog,OP.lights,{emissive:{value:new xR(0)},specular:{value:new xR(1118481)},shininess:{value:30}}]),vertexShader:IP.meshphong_vert,fragmentShader:IP.meshphong_frag},standard:{uniforms:uP([OP.common,OP.envmap,OP.aomap,OP.lightmap,OP.emissivemap,OP.bumpmap,OP.normalmap,OP.displacementmap,OP.roughnessmap,OP.metalnessmap,OP.fog,OP.lights,{emissive:{value:new xR(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:IP.meshphysical_vert,fragmentShader:IP.meshphysical_frag},toon:{uniforms:uP([OP.common,OP.aomap,OP.lightmap,OP.emissivemap,OP.bumpmap,OP.normalmap,OP.displacementmap,OP.gradientmap,OP.fog,OP.lights,{emissive:{value:new xR(0)}}]),vertexShader:IP.meshtoon_vert,fragmentShader:IP.meshtoon_frag},matcap:{uniforms:uP([OP.common,OP.bumpmap,OP.normalmap,OP.displacementmap,OP.fog,{matcap:{value:null}}]),vertexShader:IP.meshmatcap_vert,fragmentShader:IP.meshmatcap_frag},points:{uniforms:uP([OP.points,OP.fog]),vertexShader:IP.points_vert,fragmentShader:IP.points_frag},dashed:{uniforms:uP([OP.common,OP.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:IP.linedashed_vert,fragmentShader:IP.linedashed_frag},depth:{uniforms:uP([OP.common,OP.displacementmap]),vertexShader:IP.depth_vert,fragmentShader:IP.depth_frag},normal:{uniforms:uP([OP.common,OP.bumpmap,OP.normalmap,OP.displacementmap,{opacity:{value:1}}]),vertexShader:IP.meshnormal_vert,fragmentShader:IP.meshnormal_frag},sprite:{uniforms:uP([OP.sprite,OP.fog]),vertexShader:IP.sprite_vert,fragmentShader:IP.sprite_frag},background:{uniforms:{uvTransform:{value:new RO},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:IP.background_vert,fragmentShader:IP.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:IP.backgroundCube_vert,fragmentShader:IP.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:IP.cube_vert,fragmentShader:IP.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:IP.equirect_vert,fragmentShader:IP.equirect_frag},distanceRGBA:{uniforms:uP([OP.common,OP.displacementmap,{referencePosition:{value:new oN},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:IP.distanceRGBA_vert,fragmentShader:IP.distanceRGBA_frag},shadow:{uniforms:uP([OP.lights,OP.fog,{color:{value:new xR(0)},opacity:{value:1}}]),vertexShader:IP.shadow_vert,fragmentShader:IP.shadow_frag}};NP.physical={uniforms:uP([NP.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new RO},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new RO},clearcoatNormalScale:{value:new NO(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new RO},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new RO},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new RO},sheen:{value:0},sheenColor:{value:new xR(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new RO},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new RO},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new RO},transmissionSamplerSize:{value:new NO},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new RO},attenuationDistance:{value:0},attenuationColor:{value:new xR(0)},specularColor:{value:new xR(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new RO},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new RO},anisotropyVector:{value:new NO},anisotropyMap:{value:null},anisotropyMapTransform:{value:new RO}}]),vertexShader:IP.meshphysical_vert,fragmentShader:IP.meshphysical_frag};const RP={r:0,b:0,g:0};function PP(e,t,n,r,i,a,o){const s=new xR(0);let c,l,u=!0===a?0:1,f=null,h=0,d=null;function p(t,n){t.getRGB(RP,fP(e)),r.buffers.color.setClear(RP.r,RP.g,RP.b,n,o)}return{getClearColor:function(){return s},setClearColor:function(e,t=1){s.set(e),u=t,p(s,u)},getClearAlpha:function(){return u},setClearAlpha:function(e){u=e,p(s,u)},render:function(a,g){let b=!1,m=!0===g.isScene?g.background:null;m&&m.isTexture&&(m=(g.backgroundBlurriness>0?n:t).get(m)),null===m?p(s,u):m&&m.isColor&&(p(m,1),b=!0);const w=e.xr.getEnvironmentBlendMode();"additive"===w?r.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===w&&r.buffers.color.setClear(0,0,0,0,o),(e.autoClear||b)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),m&&(m.isCubeTexture||m.mapping===_I)?(void 0===l&&(l=new oP(new cP(1,1,1),new dP({name:"BackgroundCubeMaterial",uniforms:lP(NP.backgroundCube.uniforms),vertexShader:NP.backgroundCube.vertexShader,fragmentShader:NP.backgroundCube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(l)),l.material.uniforms.envMap.value=m,l.material.uniforms.flipEnvMap.value=m.isCubeTexture&&!1===m.isRenderTargetTexture?-1:1,l.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,l.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,l.material.toneMapped=GO.getTransfer(m.colorSpace)!==nO,f===m&&h===m.version&&d===e.toneMapping||(l.material.needsUpdate=!0,f=m,h=m.version,d=e.toneMapping),l.layers.enableAll(),a.unshift(l,l.geometry,l.material,0,0,null)):m&&m.isTexture&&(void 0===c&&(c=new oP(new MP(2,2),new dP({name:"BackgroundMaterial",uniforms:lP(NP.background.uniforms),vertexShader:NP.background.vertexShader,fragmentShader:NP.background.fragmentShader,side:0,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=m,c.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,c.material.toneMapped=GO.getTransfer(m.colorSpace)!==nO,!0===m.matrixAutoUpdate&&m.updateMatrix(),c.material.uniforms.uvTransform.value.copy(m.matrix),f===m&&h===m.version&&d===e.toneMapping||(c.material.needsUpdate=!0,f=m,h=m.version,d=e.toneMapping),c.layers.enableAll(),a.unshift(c,c.geometry,c.material,0,0,null))}}}function LP(e,t,n,r){const i=e.getParameter(e.MAX_VERTEX_ATTRIBS),a=r.isWebGL2?null:t.get("OES_vertex_array_object"),o=r.isWebGL2||null!==a,s={},c=d(null);let l=c,u=!1;function f(t){return r.isWebGL2?e.bindVertexArray(t):a.bindVertexArrayOES(t)}function h(t){return r.isWebGL2?e.deleteVertexArray(t):a.deleteVertexArrayOES(t)}function d(e){const t=[],n=[],r=[];for(let e=0;e=0){const n=i[t];let r=a[t];if(void 0===r&&("instanceMatrix"===t&&e.instanceMatrix&&(r=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(r=e.instanceColor)),void 0===n)return!0;if(n.attribute!==r)return!0;if(r&&n.data!==r.data)return!0;o++}return l.attributesNum!==o||l.index!==r}(i,v,h,y),E&&function(e,t,n,r){const i={},a=t.attributes;let o=0;const s=n.getAttributes();for(const t in s)if(s[t].location>=0){let n=a[t];void 0===n&&("instanceMatrix"===t&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(n=e.instanceColor));const r={};r.attribute=n,n&&n.data&&(r.data=n.data),i[t]=r,o++}l.attributes=i,l.attributesNum=o,l.index=r}(i,v,h,y)}else{const e=!0===c.wireframe;l.geometry===v.id&&l.program===h.id&&l.wireframe===e||(l.geometry=v.id,l.program=h.id,l.wireframe=e,E=!0)}null!==y&&n.update(y,e.ELEMENT_ARRAY_BUFFER),(E||u)&&(u=!1,function(i,a,o,s){if(!1===r.isWebGL2&&(i.isInstancedMesh||s.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;p();const c=s.attributes,l=o.getAttributes(),u=a.defaultAttributeValues;for(const t in l){const a=l[t];if(a.location>=0){let o=c[t];if(void 0===o&&("instanceMatrix"===t&&i.instanceMatrix&&(o=i.instanceMatrix),"instanceColor"===t&&i.instanceColor&&(o=i.instanceColor)),void 0!==o){const t=o.normalized,c=o.itemSize,l=n.get(o);if(void 0===l)continue;const u=l.buffer,f=l.type,h=l.bytesPerElement,d=!0===r.isWebGL2&&(f===e.INT||f===e.UNSIGNED_INT||1013===o.gpuType);if(o.isInterleavedBufferAttribute){const n=o.data,r=n.stride,l=o.offset;if(n.isInstancedInterleavedBuffer){for(let e=0;e0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const a="undefined"!=typeof WebGL2RenderingContext&&"WebGL2RenderingContext"===e.constructor.name;let o=void 0!==n.precision?n.precision:"highp";const s=i(o);s!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",s,"instead."),o=s);const c=a||t.has("WEBGL_draw_buffers"),l=!0===n.logarithmicDepthBuffer,u=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),f=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),h=e.getParameter(e.MAX_TEXTURE_SIZE),d=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),p=e.getParameter(e.MAX_VERTEX_ATTRIBS),g=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),b=e.getParameter(e.MAX_VARYING_VECTORS),m=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),w=f>0,v=a||t.has("OES_texture_float");return{isWebGL2:a,drawBuffers:c,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:l,maxTextures:u,maxVertexTextures:f,maxTextureSize:h,maxCubemapSize:d,maxAttributes:p,maxVertexUniforms:g,maxVaryings:b,maxFragmentUniforms:m,vertexTextures:w,floatFragmentTextures:v,floatVertexTextures:w&&v,maxSamples:a?e.getParameter(e.MAX_SAMPLES):0}}function UP(e){const t=this;let n=null,r=0,i=!1,a=!1;const o=new SP,s=new RO,c={value:null,needsUpdate:!1};function l(e,n,r,i){const a=null!==e?e.length:0;let l=null;if(0!==a){if(l=c.value,!0!==i||null===l){const t=r+4*a,i=n.matrixWorldInverse;s.getNormalMatrix(i),(null===l||l.length0),t.numPlanes=r,t.numIntersection=0);else{const e=a?0:r,t=4*e;let i=p.clippingState||null;c.value=i,i=l(f,s,t,u);for(let e=0;e!==t;++e)i[e]=n[e];p.clippingState=i,this.numIntersection=h?this.numPlanes:0,this.numPlanes+=e}}}function jP(e){let t=new WeakMap;function n(e,t){return 303===t?e.mapping=yI:304===t&&(e.mapping=EI),e}function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture&&!1===i.isRenderTargetTexture){const a=i.mapping;if(303===a||304===a){if(t.has(i))return n(t.get(i).texture,i.mapping);{const a=i.image;if(a&&a.height>0){const o=new vP(a.height/2);return o.fromEquirectangularTexture(e,i),t.set(i,o),i.addEventListener("dispose",r),n(o.texture,i.mapping)}return null}}}return i},dispose:function(){t=new WeakMap}}}class BP extends pP{constructor(e=-1,t=1,n=1,r=-1,i=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),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=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,a){null===this.view&&(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=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-e,a=n+e,o=r+t,s=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,a=i+e*this.view.width,o-=t*this.view.offsetY,s=o-t*this.view.height}this.projectionMatrix.makeOrthographic(i,a,o,s,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}const zP=[.125,.215,.35,.446,.526,.582],$P=new BP,HP=new xR;let GP=null,VP=0,WP=0;const qP=(1+Math.sqrt(5))/2,XP=1/qP,YP=[new oN(1,1,1),new oN(-1,1,1),new oN(1,1,-1),new oN(-1,1,-1),new oN(0,qP,XP),new oN(0,qP,-XP),new oN(XP,0,qP),new oN(-XP,0,qP),new oN(qP,XP,0),new oN(-qP,XP,0)];class KP{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,t=0,n=.1,r=100){GP=this._renderer.getRenderTarget(),VP=this._renderer.getActiveCubeFace(),WP=this._renderer.getActiveMipmapLevel(),this._setSize(256);const i=this._allocateTargets();return i.depthBuffer=!0,this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=eL(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=JP(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;ee-4?s=zP[o-e+4-1]:0===o&&(s=0),r.push(s);const c=1/(a-2),l=-c,u=1+c,f=[l,l,u,l,u,u,l,l,u,u,l,u],h=6,d=6,p=3,g=2,b=1,m=new Float32Array(p*d*h),w=new Float32Array(g*d*h),v=new Float32Array(b*d*h);for(let e=0;e2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];m.set(r,p*d*e),w.set(f,g*d*e);const i=[e,e,e,e,e,e];v.set(i,b*d*e)}const y=new $R;y.setAttribute("position",new OR(m,p)),y.setAttribute("uv",new OR(w,g)),y.setAttribute("faceIndex",new OR(v,b)),t.push(y),i>4&&i--}return{lodPlanes:t,sizeLods:n,sigmas:r}}(r)),this._blurMaterial=function(e,t,n){const r=new Float32Array(20),i=new oN(0,1,0);return new dP({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}(r,e,t)}return r}_compileMaterial(e){const t=new oP(this._lodPlanes[0],e);this._renderer.compile(t,$P)}_sceneToCubeUV(e,t,n,r){const i=new gP(90,1,t,n),a=[1,-1,1,1,1,1],o=[1,1,1,-1,-1,-1],s=this._renderer,c=s.autoClear,l=s.toneMapping;s.getClearColor(HP),s.toneMapping=0,s.autoClear=!1;const u=new CR({name:"PMREM.Background",side:1,depthWrite:!1,depthTest:!1}),f=new oP(new cP,u);let h=!1;const d=e.background;d?d.isColor&&(u.color.copy(d),e.background=null,h=!0):(u.color.copy(HP),h=!0);for(let t=0;t<6;t++){const n=t%3;0===n?(i.up.set(0,a[t],0),i.lookAt(o[t],0,0)):1===n?(i.up.set(0,0,a[t]),i.lookAt(0,o[t],0)):(i.up.set(0,a[t],0),i.lookAt(0,0,o[t]));const c=this._cubeSize;QP(r,n*c,t>2?c:0,c,c),s.setRenderTarget(r),h&&s.render(f,i),s.render(e,i)}f.geometry.dispose(),f.material.dispose(),s.toneMapping=l,s.autoClear=c,e.background=d}_textureToCubeUV(e,t){const n=this._renderer,r=e.mapping===yI||e.mapping===EI;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=eL()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=JP());const i=r?this._cubemapMaterial:this._equirectMaterial,a=new oP(this._lodPlanes[0],i);i.uniforms.envMap.value=e;const o=this._cubeSize;QP(t,0,0,3*o,2*o),n.setRenderTarget(t),n.render(a,$P)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let t=1;t20&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${p} samples when the maximum is set to 20`);const g=[];let b=0;for(let e=0;e<20;++e){const t=e/d,n=Math.exp(-t*t/2);g.push(n),0===e?b+=n:em-4?r-m+4:0),4*(this._cubeSize-w),3*w,2*w),s.setRenderTarget(t),s.render(l,$P)}}function ZP(e,t,n){const r=new nN(e,t,n);return r.texture.mapping=_I,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function QP(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function JP(){return new dP({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function eL(){return new dP({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function tL(e){let t=new WeakMap,n=null;function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const a=i.mapping,o=303===a||304===a,s=a===yI||a===EI;if(o||s){if(i.isRenderTargetTexture&&!0===i.needsPMREMUpdate){i.needsPMREMUpdate=!1;let r=t.get(i);return null===n&&(n=new KP(e)),r=o?n.fromEquirectangular(i,r):n.fromCubemap(i,r),t.set(i,r),r.texture}if(t.has(i))return t.get(i).texture;{const a=i.image;if(o&&a&&a.height>0||s&&a&&function(e){let t=0;for(let n=0;n<6;n++)void 0!==e[n]&&t++;return 6===t}(a)){null===n&&(n=new KP(e));const a=o?n.fromEquirectangular(i):n.fromCubemap(i);return t.set(i,a),i.addEventListener("dispose",r),a.texture}return null}}}return i},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function nL(e){const t={};function n(n){if(void 0!==t[n])return t[n];let r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture")},get:function(e){const t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function rL(e,t,n,r){const i={},a=new WeakMap;function o(e){const s=e.target;null!==s.index&&t.remove(s.index);for(const e in s.attributes)t.remove(s.attributes[e]);for(const e in s.morphAttributes){const n=s.morphAttributes[e];for(let e=0,r=n.length;et.maxTextureSize&&(T=Math.ceil(x/t.maxTextureSize),x=t.maxTextureSize);const A=new Float32Array(x*T*4*d),k=new rN(A,x,T,d);k.type=LI,k.needsUpdate=!0;const C=4*S;for(let I=0;I0)return e;const i=t*n;let a=pL[i];if(void 0===a&&(a=new Float32Array(i),pL[i]=a),0!==t){r.toArray(a,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(a,i)}return a}function yL(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n":" "} ${i}: ${n[e]}`)}return r.join("\n")}(e.getShaderSource(t),r)}return i}function mD(e,t){const n=function(e){const t=GO.getPrimaries(GO.workingColorSpace),n=GO.getPrimaries(e);let r;switch(t===n?r="":t===iO&&n===rO?r="LinearDisplayP3ToLinearSRGB":t===rO&&n===iO&&(r="LinearSRGBToLinearDisplayP3"),e){case QI:case eO:return[r,"LinearTransferOETF"];case ZI:case JI:return[r,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",e),[r,"LinearTransferOETF"]}}(t);return`vec4 ${e}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function wD(e,t){let n;switch(t){case 1:n="Linear";break;case 2:n="Reinhard";break;case 3:n="OptimizedCineon";break;case 4:n="ACESFilmic";break;case 5:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function vD(e){return""!==e}function yD(e,t){const n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function ED(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const _D=/^[ \t]*#include +<([\w\d./]+)>/gm;function SD(e){return e.replace(_D,TD)}const xD=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function TD(e,t){let n=IP[t];if(void 0===n){const e=xD.get(t);if(void 0===e)throw new Error("Can not resolve #include <"+t+">");n=IP[e],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,e)}return SD(n)}const AD=/#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 kD(e){return e.replace(AD,CD)}function CD(e,t,n,r){let i="";for(let e=parseInt(t);e0&&(b+="\n"),m=[d,"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,p].filter(vD).join("\n"),m.length>0&&(m+="\n")):(b=[MD(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,p,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",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 "+u:"",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&&!1===n.flatShading?"#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&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+c:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.useLegacyLights?"#define LEGACY_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(vD).join("\n"),m=[d,MD(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,p,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+l:"",n.envMap?"#define "+u:"",n.envMap?"#define "+f:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.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.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&&!1===n.flatShading?"#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 "+c:"",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":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?IP.tonemapping_pars_fragment:"",0!==n.toneMapping?wD("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",IP.colorspace_pars_fragment,mD("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(vD).join("\n")),o=SD(o),o=yD(o,n),o=ED(o,n),s=SD(s),s=yD(s,n),s=ED(s,n),o=kD(o),s=kD(s),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(w="#version 300 es\n",b=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+b,m=["precision mediump sampler2DArray;","#define varying in",n.glslVersion===pO?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===pO?"":"#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("\n")+"\n"+m);const v=w+b+o,y=w+m+s,E=pD(i,i.VERTEX_SHADER,v),_=pD(i,i.FRAGMENT_SHADER,y);function S(t){if(e.debug.checkShaderErrors){const n=i.getProgramInfoLog(g).trim(),r=i.getShaderInfoLog(E).trim(),a=i.getShaderInfoLog(_).trim();let o=!0,s=!0;if(!1===i.getProgramParameter(g,i.LINK_STATUS))if(o=!1,"function"==typeof e.debug.onShaderError)e.debug.onShaderError(i,g,E,_);else{const e=bD(i,E,"vertex"),t=bD(i,_,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(g,i.VALIDATE_STATUS)+"\n\nProgram Info Log: "+n+"\n"+e+"\n"+t)}else""!==n?console.warn("THREE.WebGLProgram: Program Info Log:",n):""!==r&&""!==a||(s=!1);s&&(t.diagnostics={runnable:o,programLog:n,vertexShader:{log:r,prefix:b},fragmentShader:{log:a,prefix:m}})}i.deleteShader(E),i.deleteShader(_),x=new dD(i,g),T=function(e,t){const n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i0,V=a.clearcoat>0,W=a.iridescence>0,q=a.sheen>0,X=a.transmission>0,Y=G&&!!a.anisotropyMap,K=V&&!!a.clearcoatMap,Z=V&&!!a.clearcoatNormalMap,Q=V&&!!a.clearcoatRoughnessMap,J=W&&!!a.iridescenceMap,ee=W&&!!a.iridescenceThicknessMap,te=q&&!!a.sheenColorMap,ne=q&&!!a.sheenRoughnessMap,re=!!a.specularMap,ie=!!a.specularColorMap,ae=!!a.specularIntensityMap,oe=X&&!!a.transmissionMap,se=X&&!!a.thicknessMap,ce=!!a.gradientMap,le=!!a.alphaMap,ue=a.alphaTest>0,fe=!!a.alphaHash,he=!!a.extensions,de=!!v.attributes.uv1,pe=!!v.attributes.uv2,ge=!!v.attributes.uv3;let be=0;return a.toneMapped&&(null!==O&&!0!==O.isXRRenderTarget||(be=e.toneMapping)),{isWebGL2:u,shaderID:S,shaderType:a.type,shaderName:a.name,vertexShader:A,fragmentShader:k,defines:a.defines,customVertexShaderID:C,customFragmentShaderID:M,isRawShaderMaterial:!0===a.isRawShaderMaterial,glslVersion:a.glslVersion,precision:d,instancing:N,instancingColor:N&&null!==m.instanceColor,supportsVertexTextures:h,outputColorSpace:null===O?e.outputColorSpace:!0===O.isXRRenderTarget?O.texture.colorSpace:QI,map:R,matcap:P,envMap:L,envMapMode:L&&E.mapping,envMapCubeUVHeight:_,aoMap:D,lightMap:F,bumpMap:U,normalMap:j,displacementMap:h&&B,emissiveMap:z,normalMapObjectSpace:j&&1===a.normalMapType,normalMapTangentSpace:j&&0===a.normalMapType,metalnessMap:$,roughnessMap:H,anisotropy:G,anisotropyMap:Y,clearcoat:V,clearcoatMap:K,clearcoatNormalMap:Z,clearcoatRoughnessMap:Q,iridescence:W,iridescenceMap:J,iridescenceThicknessMap:ee,sheen:q,sheenColorMap:te,sheenRoughnessMap:ne,specularMap:re,specularColorMap:ie,specularIntensityMap:ae,transmission:X,transmissionMap:oe,thicknessMap:se,gradientMap:ce,opaque:!1===a.transparent&&1===a.blending,alphaMap:le,alphaTest:ue,alphaHash:fe,combine:a.combine,mapUv:R&&g(a.map.channel),aoMapUv:D&&g(a.aoMap.channel),lightMapUv:F&&g(a.lightMap.channel),bumpMapUv:U&&g(a.bumpMap.channel),normalMapUv:j&&g(a.normalMap.channel),displacementMapUv:B&&g(a.displacementMap.channel),emissiveMapUv:z&&g(a.emissiveMap.channel),metalnessMapUv:$&&g(a.metalnessMap.channel),roughnessMapUv:H&&g(a.roughnessMap.channel),anisotropyMapUv:Y&&g(a.anisotropyMap.channel),clearcoatMapUv:K&&g(a.clearcoatMap.channel),clearcoatNormalMapUv:Z&&g(a.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Q&&g(a.clearcoatRoughnessMap.channel),iridescenceMapUv:J&&g(a.iridescenceMap.channel),iridescenceThicknessMapUv:ee&&g(a.iridescenceThicknessMap.channel),sheenColorMapUv:te&&g(a.sheenColorMap.channel),sheenRoughnessMapUv:ne&&g(a.sheenRoughnessMap.channel),specularMapUv:re&&g(a.specularMap.channel),specularColorMapUv:ie&&g(a.specularColorMap.channel),specularIntensityMapUv:ae&&g(a.specularIntensityMap.channel),transmissionMapUv:oe&&g(a.transmissionMap.channel),thicknessMapUv:se&&g(a.thicknessMap.channel),alphaMapUv:le&&g(a.alphaMap.channel),vertexTangents:!!v.attributes.tangent&&(j||G),vertexColors:a.vertexColors,vertexAlphas:!0===a.vertexColors&&!!v.attributes.color&&4===v.attributes.color.itemSize,vertexUv1s:de,vertexUv2s:pe,vertexUv3s:ge,pointsUvs:!0===m.isPoints&&!!v.attributes.uv&&(R||le),fog:!!w,useFog:!0===a.fog,fogExp2:w&&w.isFogExp2,flatShading:!0===a.flatShading,sizeAttenuation:!0===a.sizeAttenuation,logarithmicDepthBuffer:f,skinning:!0===m.isSkinnedMesh,morphTargets:void 0!==v.morphAttributes.position,morphNormals:void 0!==v.morphAttributes.normal,morphColors:void 0!==v.morphAttributes.color,morphTargetsCount:T,morphTextureStride:I,numDirLights:s.directional.length,numPointLights:s.point.length,numSpotLights:s.spot.length,numSpotLightMaps:s.spotLightMap.length,numRectAreaLights:s.rectArea.length,numHemiLights:s.hemi.length,numDirLightShadows:s.directionalShadowMap.length,numPointLightShadows:s.pointShadowMap.length,numSpotLightShadows:s.spotShadowMap.length,numSpotLightShadowsWithMaps:s.numSpotLightShadowsWithMaps,numLightProbes:s.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:a.dithering,shadowMapEnabled:e.shadowMap.enabled&&l.length>0,shadowMapType:e.shadowMap.type,toneMapping:be,useLegacyLights:e._useLegacyLights,decodeVideoTexture:R&&!0===a.map.isVideoTexture&&GO.getTransfer(a.map.colorSpace)===nO,premultipliedAlpha:a.premultipliedAlpha,doubleSided:2===a.side,flipSided:1===a.side,useDepthPacking:a.depthPacking>=0,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionDerivatives:he&&!0===a.extensions.derivatives,extensionFragDepth:he&&!0===a.extensions.fragDepth,extensionDrawBuffers:he&&!0===a.extensions.drawBuffers,extensionShaderTextureLOD:he&&!0===a.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||r.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:a.customProgramCacheKey()}},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(function(e,t){e.push(t.precision),e.push(t.outputColorSpace),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.mapUv),e.push(t.alphaMapUv),e.push(t.lightMapUv),e.push(t.aoMapUv),e.push(t.bumpMapUv),e.push(t.normalMapUv),e.push(t.displacementMapUv),e.push(t.emissiveMapUv),e.push(t.metalnessMapUv),e.push(t.roughnessMapUv),e.push(t.anisotropyMapUv),e.push(t.clearcoatMapUv),e.push(t.clearcoatNormalMapUv),e.push(t.clearcoatRoughnessMapUv),e.push(t.iridescenceMapUv),e.push(t.iridescenceThicknessMapUv),e.push(t.sheenColorMapUv),e.push(t.sheenRoughnessMapUv),e.push(t.specularMapUv),e.push(t.specularColorMapUv),e.push(t.specularIntensityMapUv),e.push(t.transmissionMapUv),e.push(t.thicknessMapUv),e.push(t.combine),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.numLightProbes),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}(n,t),function(e,t){s.disableAll(),t.isWebGL2&&s.enable(0),t.supportsVertexTextures&&s.enable(1),t.instancing&&s.enable(2),t.instancingColor&&s.enable(3),t.matcap&&s.enable(4),t.envMap&&s.enable(5),t.normalMapObjectSpace&&s.enable(6),t.normalMapTangentSpace&&s.enable(7),t.clearcoat&&s.enable(8),t.iridescence&&s.enable(9),t.alphaTest&&s.enable(10),t.vertexColors&&s.enable(11),t.vertexAlphas&&s.enable(12),t.vertexUv1s&&s.enable(13),t.vertexUv2s&&s.enable(14),t.vertexUv3s&&s.enable(15),t.vertexTangents&&s.enable(16),t.anisotropy&&s.enable(17),t.alphaHash&&s.enable(18),e.push(s.mask),s.disableAll(),t.fog&&s.enable(0),t.useFog&&s.enable(1),t.flatShading&&s.enable(2),t.logarithmicDepthBuffer&&s.enable(3),t.skinning&&s.enable(4),t.morphTargets&&s.enable(5),t.morphNormals&&s.enable(6),t.morphColors&&s.enable(7),t.premultipliedAlpha&&s.enable(8),t.shadowMapEnabled&&s.enable(9),t.useLegacyLights&&s.enable(10),t.doubleSided&&s.enable(11),t.flipSided&&s.enable(12),t.useDepthPacking&&s.enable(13),t.dithering&&s.enable(14),t.transmission&&s.enable(15),t.sheen&&s.enable(16),t.opaque&&s.enable(17),t.pointsUvs&&s.enable(18),t.decodeVideoTexture&&s.enable(19),e.push(s.mask)}(n,t),n.push(e.outputColorSpace)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=p[e.type];let n;if(t){const e=NP[t];n=hP.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let r;for(let e=0,t=l.length;e0?r.push(u):!0===o.transparent?i.push(u):n.push(u)},unshift:function(e,t,o,s,c,l){const u=a(e,t,o,s,c,l);o.transmission>0?r.unshift(u):!0===o.transparent?i.unshift(u):n.unshift(u)},finish:function(){for(let n=t,r=e.length;n1&&n.sort(e||DD),r.length>1&&r.sort(t||FD),i.length>1&&i.sort(t||FD)}}}function jD(){let e=new WeakMap;return{get:function(t,n){const r=e.get(t);let i;return void 0===r?(i=new UD,e.set(t,[i])):n>=r.length?(i=new UD,r.push(i)):i=r[n],i},dispose:function(){e=new WeakMap}}}function BD(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new oN,color:new xR};break;case"SpotLight":n={position:new oN,direction:new oN,color:new xR,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new oN,color:new xR,distance:0,decay:0};break;case"HemisphereLight":n={direction:new oN,skyColor:new xR,groundColor:new xR};break;case"RectAreaLight":n={color:new xR,position:new oN,halfWidth:new oN,halfHeight:new oN}}return e[t.id]=n,n}}}let zD=0;function $D(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function HD(e,t){const n=new BD,r=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new NO};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new NO,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={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 e=0;e<9;e++)i.probe.push(new oN);const a=new oN,o=new DN,s=new DN;return{setup:function(a,o){let s=0,c=0,l=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let u=0,f=0,h=0,d=0,p=0,g=0,b=0,m=0,w=0,v=0,y=0;a.sort($D);const E=!0===o?Math.PI:1;for(let e=0,t=a.length;e0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=OP.LTC_FLOAT_1,i.rectAreaLTC2=OP.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=OP.LTC_HALF_1,i.rectAreaLTC2=OP.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=s,i.ambient[1]=c,i.ambient[2]=l;const _=i.hash;_.directionalLength===u&&_.pointLength===f&&_.spotLength===h&&_.rectAreaLength===d&&_.hemiLength===p&&_.numDirectionalShadows===g&&_.numPointShadows===b&&_.numSpotShadows===m&&_.numSpotMaps===w&&_.numLightProbes===y||(i.directional.length=u,i.spot.length=h,i.rectArea.length=d,i.point.length=f,i.hemi.length=p,i.directionalShadow.length=g,i.directionalShadowMap.length=g,i.pointShadow.length=b,i.pointShadowMap.length=b,i.spotShadow.length=m,i.spotShadowMap.length=m,i.directionalShadowMatrix.length=g,i.pointShadowMatrix.length=b,i.spotLightMatrix.length=m+w-v,i.spotLightMap.length=w,i.numSpotLightShadowsWithMaps=v,i.numLightProbes=y,_.directionalLength=u,_.pointLength=f,_.spotLength=h,_.rectAreaLength=d,_.hemiLength=p,_.numDirectionalShadows=g,_.numPointShadows=b,_.numSpotShadows=m,_.numSpotMaps=w,_.numLightProbes=y,i.version=zD++)},setupView:function(e,t){let n=0,r=0,c=0,l=0,u=0;const f=t.matrixWorldInverse;for(let t=0,h=e.length;t=a.length?(o=new GD(e,t),a.push(o)):o=a[i],o},dispose:function(){n=new WeakMap}}}class WD extends kR{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,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 qD extends kR{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}}function XD(e,t,n){let r=new AP;const i=new NO,a=new NO,o=new eN,s=new WD({depthPacking:3201}),c=new qD,l={},u=n.maxTextureSize,f={[JM]:1,[eI]:0,[tI]:2},h=new dP({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new NO},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),d=h.clone();d.defines.HORIZONTAL_PASS=1;const p=new $R;p.setAttribute("position",new OR(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const g=new oP(p,h),b=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1;let m=this.type;function w(n,r){const a=t.update(g);h.defines.VSM_SAMPLES!==n.blurSamples&&(h.defines.VSM_SAMPLES=n.blurSamples,d.defines.VSM_SAMPLES=n.blurSamples,h.needsUpdate=!0,d.needsUpdate=!0),null===n.mapPass&&(n.mapPass=new nN(i.x,i.y)),h.uniforms.shadow_pass.value=n.map.texture,h.uniforms.resolution.value=n.mapSize,h.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,a,h,g,null),d.uniforms.shadow_pass.value=n.mapPass.texture,d.uniforms.resolution.value=n.mapSize,d.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,a,d,g,null)}function v(t,n,r,i){let a=null;const o=!0===r.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==o)a=o;else if(a=!0===r.isPointLight?c:s,e.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0){const e=a.uuid,t=n.uuid;let r=l[e];void 0===r&&(r={},l[e]=r);let i=r[t];void 0===i&&(i=a.clone(),r[t]=i),a=i}return a.visible=n.visible,a.wireframe=n.wireframe,a.side=3===i?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:f[n.side],a.alphaMap=n.alphaMap,a.alphaTest=n.alphaTest,a.map=n.map,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.clipIntersection=n.clipIntersection,a.displacementMap=n.displacementMap,a.displacementScale=n.displacementScale,a.displacementBias=n.displacementBias,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,!0===r.isPointLight&&!0===a.isMeshDistanceMaterial&&(e.properties.get(a).light=r),a}function y(n,i,a,o,s){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&3===s)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);const r=t.update(n),i=n.material;if(Array.isArray(i)){const t=r.groups;for(let c=0,l=t.length;cu||i.y>u)&&(i.x>u&&(a.x=Math.floor(u/g.x),i.x=a.x*g.x,f.mapSize.x=a.x),i.y>u&&(a.y=Math.floor(u/g.y),i.y=a.y*g.y,f.mapSize.y=a.y)),null===f.map||!0===d||!0===p){const e=3!==this.type?{minFilter:AI,magFilter:AI}:{};null!==f.map&&f.map.dispose(),f.map=new nN(i.x,i.y,e),f.map.texture.name=l.name+".shadowMap",f.camera.updateProjectionMatrix()}e.setRenderTarget(f.map),e.clear();const b=f.getViewportCount();for(let e=0;e=1):-1!==R.indexOf("OpenGL ES")&&(N=parseFloat(/^OpenGL ES (\d)/.exec(R)[1]),O=N>=2);let P=null,L={};const D=e.getParameter(e.SCISSOR_BOX),F=e.getParameter(e.VIEWPORT),U=(new eN).fromArray(D),j=(new eN).fromArray(F);function B(t,n,i,a){const o=new Uint8Array(4),s=e.createTexture();e.bindTexture(t,s),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let s=0;sr||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const r=t?CO:Math.floor,a=r(i*e.width),o=r(i*e.height);void 0===g&&(g=w(a,o));const s=n?w(a,o):g;return s.width=a,s.height=o,s.getContext("2d").drawImage(e,0,0,a,o),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+a+"x"+o+")."),s}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function y(e){return kO(e.width)&&kO(e.height)}function E(e,t){return e.generateMipmaps&&t&&e.minFilter!==AI&&e.minFilter!==MI}function _(t){e.generateMipmap(t)}function S(n,r,i,a,o=!1){if(!1===s)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let c=r;if(r===e.RED&&(i===e.FLOAT&&(c=e.R32F),i===e.HALF_FLOAT&&(c=e.R16F),i===e.UNSIGNED_BYTE&&(c=e.R8)),r===e.RED_INTEGER&&(i===e.UNSIGNED_BYTE&&(c=e.R8UI),i===e.UNSIGNED_SHORT&&(c=e.R16UI),i===e.UNSIGNED_INT&&(c=e.R32UI),i===e.BYTE&&(c=e.R8I),i===e.SHORT&&(c=e.R16I),i===e.INT&&(c=e.R32I)),r===e.RG&&(i===e.FLOAT&&(c=e.RG32F),i===e.HALF_FLOAT&&(c=e.RG16F),i===e.UNSIGNED_BYTE&&(c=e.RG8)),r===e.RGBA){const t=o?tO:GO.getTransfer(a);i===e.FLOAT&&(c=e.RGBA32F),i===e.HALF_FLOAT&&(c=e.RGBA16F),i===e.UNSIGNED_BYTE&&(c=t===nO?e.SRGB8_ALPHA8:e.RGBA8),i===e.UNSIGNED_SHORT_4_4_4_4&&(c=e.RGBA4),i===e.UNSIGNED_SHORT_5_5_5_1&&(c=e.RGB5_A1)}return c!==e.R16F&&c!==e.R32F&&c!==e.RG16F&&c!==e.RG32F&&c!==e.RGBA16F&&c!==e.RGBA32F||t.get("EXT_color_buffer_float"),c}function x(e,t,n){return!0===E(e,n)||e.isFramebufferTexture&&e.minFilter!==AI&&e.minFilter!==MI?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function T(t){return t===AI||1004===t||t===CI?e.NEAREST:e.LINEAR}function A(e){const t=e.target;t.removeEventListener("dispose",A),function(e){const t=r.get(e);if(void 0===t.__webglInit)return;const n=e.source,i=b.get(n);if(i){const r=i[t.__cacheKey];r.usedTimes--,0===r.usedTimes&&C(e),0===Object.keys(i).length&&b.delete(n)}r.remove(e)}(t),t.isVideoTexture&&p.delete(t)}function k(t){const n=t.target;n.removeEventListener("dispose",k),function(t){const n=t.texture,i=r.get(t),a=r.get(n);if(void 0!==a.__webglTexture&&(e.deleteTexture(a.__webglTexture),o.memory.textures--),t.depthTexture&&t.depthTexture.dispose(),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++){if(Array.isArray(i.__webglFramebuffer[t]))for(let n=0;n0&&a.__version!==t.version){const e=t.image;if(null===e)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void D(a,t,i);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.bindTexture(e.TEXTURE_2D,a.__webglTexture,e.TEXTURE0+i)}const O={[SI]:e.REPEAT,[xI]:e.CLAMP_TO_EDGE,[TI]:e.MIRRORED_REPEAT},N={[AI]:e.NEAREST,[kI]:e.NEAREST_MIPMAP_NEAREST,[CI]:e.NEAREST_MIPMAP_LINEAR,[MI]:e.LINEAR,[II]:e.LINEAR_MIPMAP_NEAREST,[OI]:e.LINEAR_MIPMAP_LINEAR},R={[oO]:e.NEVER,[dO]:e.ALWAYS,[sO]:e.LESS,[lO]:e.LEQUAL,[cO]:e.EQUAL,[hO]:e.GEQUAL,[uO]:e.GREATER,[fO]:e.NOTEQUAL};function P(n,a,o){if(o?(e.texParameteri(n,e.TEXTURE_WRAP_S,O[a.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,O[a.wrapT]),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,O[a.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,N[a.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,N[a.minFilter])):(e.texParameteri(n,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(n,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,e.CLAMP_TO_EDGE),a.wrapS===xI&&a.wrapT===xI||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,e.TEXTURE_MAG_FILTER,T(a.magFilter)),e.texParameteri(n,e.TEXTURE_MIN_FILTER,T(a.minFilter)),a.minFilter!==AI&&a.minFilter!==MI&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),a.compareFunction&&(e.texParameteri(n,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(n,e.TEXTURE_COMPARE_FUNC,R[a.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){const o=t.get("EXT_texture_filter_anisotropic");if(a.magFilter===AI)return;if(a.minFilter!==CI&&a.minFilter!==OI)return;if(a.type===LI&&!1===t.has("OES_texture_float_linear"))return;if(!1===s&&a.type===DI&&!1===t.has("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(e.texParameterf(n,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function L(t,n){let r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",A));const i=n.source;let a=b.get(i);void 0===a&&(a={},b.set(i,a));const s=function(e){const t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}(n);if(s!==t.__cacheKey){void 0===a[s]&&(a[s]={texture:e.createTexture(),usedTimes:0},o.memory.textures++,r=!0),a[s].usedTimes++;const i=a[t.__cacheKey];void 0!==i&&(a[t.__cacheKey].usedTimes--,0===i.usedTimes&&C(n)),t.__cacheKey=s,t.__webglTexture=a[s].texture}return r}function D(t,i,o){let c=e.TEXTURE_2D;(i.isDataArrayTexture||i.isCompressedArrayTexture)&&(c=e.TEXTURE_2D_ARRAY),i.isData3DTexture&&(c=e.TEXTURE_3D);const l=L(t,i),f=i.source;n.bindTexture(c,t.__webglTexture,e.TEXTURE0+o);const h=r.get(f);if(f.version!==h.__version||!0===l){n.activeTexture(e.TEXTURE0+o);const t=GO.getPrimaries(GO.workingColorSpace),r=i.colorSpace===KI?null:GO.getPrimaries(i.colorSpace),d=i.colorSpace===KI||t===r?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,i.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,i.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,d);const p=function(e){return!s&&(e.wrapS!==xI||e.wrapT!==xI||e.minFilter!==AI&&e.minFilter!==MI)}(i)&&!1===y(i.image);let g=v(i.image,p,!1,u);g=$(i,g);const b=y(g)||s,m=a.convert(i.format,i.colorSpace);let w,T=a.convert(i.type),A=S(i.internalFormat,m,T,i.colorSpace,i.isVideoTexture);P(c,i,b);const k=i.mipmaps,C=s&&!0!==i.isVideoTexture,M=void 0===h.__version||!0===l,I=x(i,g,b);if(i.isDepthTexture)A=e.DEPTH_COMPONENT,s?A=i.type===LI?e.DEPTH_COMPONENT32F:i.type===PI?e.DEPTH_COMPONENT24:i.type===FI?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT16:i.type===LI&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),i.format===jI&&A===e.DEPTH_COMPONENT&&i.type!==RI&&i.type!==PI&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=PI,T=a.convert(i.type)),i.format===BI&&A===e.DEPTH_COMPONENT&&(A=e.DEPTH_STENCIL,i.type!==FI&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=FI,T=a.convert(i.type))),M&&(C?n.texStorage2D(e.TEXTURE_2D,1,A,g.width,g.height):n.texImage2D(e.TEXTURE_2D,0,A,g.width,g.height,0,m,T,null));else if(i.isDataTexture)if(k.length>0&&b){C&&M&&n.texStorage2D(e.TEXTURE_2D,I,A,k[0].width,k[0].height);for(let t=0,r=k.length;t>=1,r>>=1}}else if(k.length>0&&b){C&&M&&n.texStorage2D(e.TEXTURE_2D,I,A,k[0].width,k[0].height);for(let t=0,r=k.length;t>l),r=Math.max(1,i.height>>l);c===e.TEXTURE_3D||c===e.TEXTURE_2D_ARRAY?n.texImage3D(c,l,d,t,r,i.depth,0,u,f,null):n.texImage2D(c,l,d,t,r,0,u,f,null)}n.bindFramebuffer(e.FRAMEBUFFER,t),z(i)?h.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,s,c,r.get(o).__webglTexture,0,B(i)):(c===e.TEXTURE_2D||c>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&c<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,s,c,r.get(o).__webglTexture,l),n.bindFramebuffer(e.FRAMEBUFFER,null)}function U(t,n,r){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer&&!n.stencilBuffer){let i=!0===s?e.DEPTH_COMPONENT24:e.DEPTH_COMPONENT16;if(r||z(n)){const t=n.depthTexture;t&&t.isDepthTexture&&(t.type===LI?i=e.DEPTH_COMPONENT32F:t.type===PI&&(i=e.DEPTH_COMPONENT24));const r=B(n);z(n)?h.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,r,i,n.width,n.height):e.renderbufferStorageMultisample(e.RENDERBUFFER,r,i,n.width,n.height)}else e.renderbufferStorage(e.RENDERBUFFER,i,n.width,n.height);e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)}else if(n.depthBuffer&&n.stencilBuffer){const i=B(n);r&&!1===z(n)?e.renderbufferStorageMultisample(e.RENDERBUFFER,i,e.DEPTH24_STENCIL8,n.width,n.height):z(n)?h.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,i,e.DEPTH24_STENCIL8,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t)}else{const t=!0===n.isWebGLMultipleRenderTargets?n.texture:[n.texture];for(let i=0;i0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function $(e,n){const r=e.colorSpace,i=e.format,a=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||e.format===gO||r!==QI&&r!==KI&&(GO.getTransfer(r)===nO?!1===s?!0===t.has("EXT_sRGB")&&i===UI?(e.format=gO,e.minFilter=MI,e.generateMipmaps=!1):n=XO.sRGBToLinear(n):i===UI&&a===NI||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",r)),n}this.allocateTextureUnit=function(){const e=M;return e>=c&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+c),M+=1,e},this.resetTextureUnits=function(){M=0},this.setTexture2D=I,this.setTexture2DArray=function(t,i){const a=r.get(t);t.version>0&&a.__version!==t.version?D(a,t,i):n.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+i)},this.setTexture3D=function(t,i){const a=r.get(t);t.version>0&&a.__version!==t.version?D(a,t,i):n.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+i)},this.setTextureCube=function(t,i){const o=r.get(t);t.version>0&&o.__version!==t.version?function(t,i,o){if(6!==i.image.length)return;const c=L(t,i),u=i.source;n.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+o);const f=r.get(u);if(u.version!==f.__version||!0===c){n.activeTexture(e.TEXTURE0+o);const t=GO.getPrimaries(GO.workingColorSpace),r=i.colorSpace===KI?null:GO.getPrimaries(i.colorSpace),h=i.colorSpace===KI||t===r?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,i.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,i.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,h);const d=i.isCompressedTexture||i.image[0].isCompressedTexture,p=i.image[0]&&i.image[0].isDataTexture,g=[];for(let e=0;e<6;e++)g[e]=d||p?p?i.image[e].image:i.image[e]:v(i.image[e],!1,!0,l),g[e]=$(i,g[e]);const b=g[0],m=y(b)||s,w=a.convert(i.format,i.colorSpace),T=a.convert(i.type),A=S(i.internalFormat,w,T,i.colorSpace),k=s&&!0!==i.isVideoTexture,C=void 0===f.__version||!0===c;let M,I=x(i,b,m);if(P(e.TEXTURE_CUBE_MAP,i,m),d){k&&C&&n.texStorage2D(e.TEXTURE_CUBE_MAP,I,A,b.width,b.height);for(let t=0;t<6;t++){M=g[t].mipmaps;for(let r=0;r0&&I++,n.texStorage2D(e.TEXTURE_CUBE_MAP,I,A,g[0].width,g[0].height));for(let t=0;t<6;t++)if(p){k?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,g[t].width,g[t].height,w,T,g[t].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,A,g[t].width,g[t].height,0,w,T,g[t].data);for(let r=0;r0){l.__webglFramebuffer[t]=[];for(let n=0;n0){l.__webglFramebuffer=[];for(let t=0;t0&&!1===z(t)){const r=h?c:[c];l.__webglMultisampledFramebuffer=e.createFramebuffer(),l.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,l.__webglMultisampledFramebuffer);for(let n=0;n0)for(let r=0;r0)for(let n=0;n0&&!1===z(t)){const i=t.isWebGLMultipleRenderTargets?t.texture:[t.texture],a=t.width,o=t.height;let s=e.COLOR_BUFFER_BIT;const c=[],l=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,u=r.get(t),f=!0===t.isWebGLMultipleRenderTargets;if(f)for(let t=0;ts+l?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&o<=s-l&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==s&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1));null!==o&&(r=t.getPose(e.targetRaySpace,n),null===r&&null!==i&&(r=i),null!==r&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(eF)))}return null!==o&&(o.visible=null!==r),null!==s&&(s.visible=null!==i),null!==c&&(c.visible=null!==a),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const n=new JD;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class nF extends JO{constructor(e,t,n,r,i,a,o,s,c,l){if((l=void 0!==l?l:jI)!==jI&&l!==BI)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&l===jI&&(n=PI),void 0===n&&l===BI&&(n=FI),super(null,r,i,a,o,s,l,n,c),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=void 0!==o?o:AI,this.minFilter=void 0!==s?s:AI,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return null!==this.compareFunction&&(t.compareFunction=this.compareFunction),t}}class rF extends wO{constructor(e,t){super();const n=this;let r=null,i=1,a=null,o="local-floor",s=1,c=null,l=null,u=null,f=null,h=null,d=null;const p=t.getContextAttributes();let g=null,b=null;const m=[],w=[],v=new gP;v.layers.enable(1),v.viewport=new eN;const y=new gP;y.layers.enable(2),y.viewport=new eN;const E=[v,y],_=new QD;_.layers.enable(1),_.layers.enable(2);let S=null,x=null;function T(e){const t=w.indexOf(e.inputSource);if(-1===t)return;const n=m[t];void 0!==n&&(n.update(e.inputSource,e.frame,c||a),n.dispatchEvent({type:e.type,data:e.inputSource}))}function A(){r.removeEventListener("select",T),r.removeEventListener("selectstart",T),r.removeEventListener("selectend",T),r.removeEventListener("squeeze",T),r.removeEventListener("squeezestart",T),r.removeEventListener("squeezeend",T),r.removeEventListener("end",A),r.removeEventListener("inputsourceschange",k);for(let e=0;e=0&&(w[r]=null,m[r].disconnect(n))}for(let t=0;t=w.length){w.push(n),r=e;break}if(null===w[e]){w[e]=n,r=e;break}}if(-1===r)break}const i=m[r];i&&i.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=m[e];return void 0===t&&(t=new tF,m[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=m[e];return void 0===t&&(t=new tF,m[e]=t),t.getGripSpace()},this.getHand=function(e){let t=m[e];return void 0===t&&(t=new tF,m[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){i=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){o=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||a},this.setReferenceSpace=function(e){c=e},this.getBaseLayer=function(){return null!==f?f:h},this.getBinding=function(){return u},this.getFrame=function(){return d},this.getSession=function(){return r},this.setSession=async function(l){if(r=l,null!==r){if(g=e.getRenderTarget(),r.addEventListener("select",T),r.addEventListener("selectstart",T),r.addEventListener("selectend",T),r.addEventListener("squeeze",T),r.addEventListener("squeezestart",T),r.addEventListener("squeezeend",T),r.addEventListener("end",A),r.addEventListener("inputsourceschange",k),!0!==p.xrCompatible&&await t.makeXRCompatible(),void 0===r.renderState.layers||!1===e.capabilities.isWebGL2){const n={antialias:void 0!==r.renderState.layers||p.antialias,alpha:!0,depth:p.depth,stencil:p.stencil,framebufferScaleFactor:i};h=new XRWebGLLayer(r,t,n),r.updateRenderState({baseLayer:h}),b=new nN(h.framebufferWidth,h.framebufferHeight,{format:UI,type:NI,colorSpace:e.outputColorSpace,stencilBuffer:p.stencil})}else{let n=null,a=null,o=null;p.depth&&(o=p.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,n=p.stencil?BI:jI,a=p.stencil?FI:PI);const s={colorFormat:t.RGBA8,depthFormat:o,scaleFactor:i};u=new XRWebGLBinding(r,t),f=u.createProjectionLayer(s),r.updateRenderState({layers:[f]}),b=new nN(f.textureWidth,f.textureHeight,{format:UI,type:NI,depthTexture:new nF(f.textureWidth,f.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:p.stencil,colorSpace:e.outputColorSpace,samples:p.antialias?4:0}),e.properties.get(b).__ignoreDepthValues=f.ignoreDepthValues}b.isXRRenderTarget=!0,this.setFoveation(s),c=null,a=await r.requestReferenceSpace(o),N.setContext(r),N.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode};const C=new oN,M=new oN;function I(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===r)return;_.near=y.near=v.near=e.near,_.far=y.far=v.far=e.far,S===_.near&&x===_.far||(r.updateRenderState({depthNear:_.near,depthFar:_.far}),S=_.near,x=_.far);const t=e.parent,n=_.cameras;I(_,t);for(let e=0;e0&&(r.alphaTest.value=i.alphaTest);const a=t.get(i).envMap;if(a&&(r.envMap.value=a,r.flipEnvMap.value=a.isCubeTexture&&!1===a.isRenderTargetTexture?-1:1,r.reflectivity.value=i.reflectivity,r.ior.value=i.ior,r.refractionRatio.value=i.refractionRatio),i.lightMap){r.lightMap.value=i.lightMap;const t=!0===e._useLegacyLights?Math.PI:1;r.lightMapIntensity.value=i.lightMapIntensity*t,n(i.lightMap,r.lightMapTransform)}i.aoMap&&(r.aoMap.value=i.aoMap,r.aoMapIntensity.value=i.aoMapIntensity,n(i.aoMap,r.aoMapTransform))}return{refreshFogUniforms:function(t,n){n.color.getRGB(t.fogColor.value,fP(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)},refreshMaterialUniforms:function(e,i,a,o,s){i.isMeshBasicMaterial||i.isMeshLambertMaterial?r(e,i):i.isMeshToonMaterial?(r(e,i),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,i)):i.isMeshPhongMaterial?(r(e,i),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,i)):i.isMeshStandardMaterial?(r(e,i),function(e,r){e.metalness.value=r.metalness,r.metalnessMap&&(e.metalnessMap.value=r.metalnessMap,n(r.metalnessMap,e.metalnessMapTransform)),e.roughness.value=r.roughness,r.roughnessMap&&(e.roughnessMap.value=r.roughnessMap,n(r.roughnessMap,e.roughnessMapTransform));t.get(r).envMap&&(e.envMapIntensity.value=r.envMapIntensity)}(e,i),i.isMeshPhysicalMaterial&&function(e,t,r){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap,n(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,n(t.sheenRoughnessMap,e.sheenRoughnessMapTransform))),t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,n(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,n(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,n(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),1===t.side&&e.clearcoatNormalScale.value.negate())),t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap,n(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,n(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform))),t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,n(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,n(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)),t.anisotropy>0&&(e.anisotropyVector.value.set(t.anisotropy*Math.cos(t.anisotropyRotation),t.anisotropy*Math.sin(t.anisotropyRotation)),t.anisotropyMap&&(e.anisotropyMap.value=t.anisotropyMap,n(t.anisotropyMap,e.anisotropyMapTransform))),e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,n(t.specularColorMap,e.specularColorMapTransform)),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,n(t.specularIntensityMap,e.specularIntensityMapTransform))}(e,i,s)):i.isMeshMatcapMaterial?(r(e,i),function(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,i)):i.isMeshDepthMaterial?r(e,i):i.isMeshDistanceMaterial?(r(e,i),function(e,n){const r=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),e.nearDistance.value=r.shadow.camera.near,e.farDistance.value=r.shadow.camera.far}(e,i)):i.isMeshNormalMaterial?r(e,i):i.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform))}(e,i),i.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,i)):i.isPointsMaterial?function(e,t,r,i){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*r,e.scale.value=.5*i,t.map&&(e.map.value=t.map,n(t.map,e.uvTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,i,a,o):i.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,i):i.isShadowMaterial?(e.color.value.copy(i.color),e.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function aF(e,t,n,r){let i={},a={},o=[];const s=n.isWebGL2?e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS):0;function c(e,t,n){const r=e.value;if(void 0===n[t]){if("number"==typeof r)n[t]=r;else{const e=Array.isArray(r)?r:[r],i=[];for(let t=0;t0&&(r=n%16,0!==r&&16-r-a.boundary<0&&(n+=16-r,i.__offset=n)),n+=a.storage}r=n%16,r>0&&(n+=16-r),e.__size=n,e.__cache={}}(n),h=function(t){const n=function(){for(let e=0;e0),f=!!n.morphAttributes.position,h=!!n.morphAttributes.normal,d=!!n.morphAttributes.color;let p=0;r.toneMapped&&(null!==_&&!0!==_.isXRRenderTarget||(p=w.toneMapping));const b=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,m=void 0!==b?b.length:0,v=Z.get(r),y=g.state.lights;if(!0===j&&(!0===B||e!==x)){const t=e===x&&r.id===S;ce.setState(r,e,t)}let E=!1;r.version===v.__version?v.needsLights&&v.lightsStateVersion!==y.state.version||v.outputColorSpace!==s||i.isInstancedMesh&&!1===v.instancing?E=!0:i.isInstancedMesh||!0!==v.instancing?i.isSkinnedMesh&&!1===v.skinning?E=!0:i.isSkinnedMesh||!0!==v.skinning?i.isInstancedMesh&&!0===v.instancingColor&&null===i.instanceColor||i.isInstancedMesh&&!1===v.instancingColor&&null!==i.instanceColor||v.envMap!==c||!0===r.fog&&v.fog!==a?E=!0:void 0===v.numClippingPlanes||v.numClippingPlanes===ce.numPlanes&&v.numIntersection===ce.numIntersection?(v.vertexAlphas!==l||v.vertexTangents!==u||v.morphTargets!==f||v.morphNormals!==h||v.morphColors!==d||v.toneMapping!==p||!0===X.isWebGL2&&v.morphTargetsCount!==m)&&(E=!0):E=!0:E=!0:E=!0:(E=!0,v.__version=r.version);let T=v.currentProgram;!0===E&&(T=Pe(r,t,i));let A=!1,k=!1,C=!1;const M=T.getUniforms(),I=v.uniforms;if(Y.useProgram(T.program)&&(A=!0,k=!0,C=!0),r.id!==S&&(S=r.id,k=!0),A||x!==e){M.setValue(me,"projectionMatrix",e.projectionMatrix),M.setValue(me,"viewMatrix",e.matrixWorldInverse);const t=M.map.cameraPosition;void 0!==t&&t.setValue(me,G.setFromMatrixPosition(e.matrixWorld)),X.logarithmicDepthBuffer&&M.setValue(me,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&M.setValue(me,"isOrthographic",!0===e.isOrthographicCamera),x!==e&&(x=e,k=!0,C=!0)}if(i.isSkinnedMesh){M.setOptional(me,i,"bindMatrix"),M.setOptional(me,i,"bindMatrixInverse");const e=i.skeleton;e&&(X.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),M.setValue(me,"boneTexture",e.boneTexture,Q),M.setValue(me,"boneTextureSize",e.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}const R=n.morphAttributes;if((void 0!==R.position||void 0!==R.normal||void 0!==R.color&&!0===X.isWebGL2)&&fe.update(i,n,T),(k||v.receiveShadow!==i.receiveShadow)&&(v.receiveShadow=i.receiveShadow,M.setValue(me,"receiveShadow",i.receiveShadow)),r.isMeshGouraudMaterial&&null!==r.envMap&&(I.envMap.value=c,I.flipEnvMap.value=c.isCubeTexture&&!1===c.isRenderTargetTexture?-1:1),k&&(M.setValue(me,"toneMappingExposure",w.toneMappingExposure),v.needsLights&&function(e,t){e.ambientLightColor.needsUpdate=t,e.lightProbe.needsUpdate=t,e.directionalLights.needsUpdate=t,e.directionalLightShadows.needsUpdate=t,e.pointLights.needsUpdate=t,e.pointLightShadows.needsUpdate=t,e.spotLights.needsUpdate=t,e.spotLightShadows.needsUpdate=t,e.rectAreaLights.needsUpdate=t,e.hemisphereLights.needsUpdate=t}(I,C),a&&!0===r.fog&&ae.refreshFogUniforms(I,a),ae.refreshMaterialUniforms(I,r,N,O,z),dD.upload(me,Le(v),I,Q)),r.isShaderMaterial&&!0===r.uniformsNeedUpdate&&(dD.upload(me,Le(v),I,Q),r.uniformsNeedUpdate=!1),r.isSpriteMaterial&&M.setValue(me,"center",i.center),M.setValue(me,"modelViewMatrix",i.modelViewMatrix),M.setValue(me,"normalMatrix",i.normalMatrix),M.setValue(me,"modelMatrix",i.matrixWorld),r.isShaderMaterial||r.isRawShaderMaterial){const e=r.uniformsGroups;for(let t=0,n=e.length;t{function n(){r.forEach(function(e){Z.get(e).currentProgram.isReady()&&r.delete(e)}),0!==r.size?setTimeout(n,10):t(e)}null!==q.get("KHR_parallel_shader_compile")?n():setTimeout(n,10)})};let Ae=null;function ke(){Me.stop()}function Ce(){Me.start()}const Me=new kP;function Ie(e,t,n,r){if(!1===e.visible)return;if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)g.pushLight(e),e.castShadow&&g.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||U.intersectsSprite(e)){r&&G.setFromMatrixPosition(e.matrixWorld).applyMatrix4($);const t=re.update(e),i=e.material;i.visible&&p.push(e,t,i,n,G.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||U.intersectsObject(e))){const t=re.update(e),i=e.material;if(r&&(void 0!==e.boundingSphere?(null===e.boundingSphere&&e.computeBoundingSphere(),G.copy(e.boundingSphere.center)):(null===t.boundingSphere&&t.computeBoundingSphere(),G.copy(t.boundingSphere.center)),G.applyMatrix4(e.matrixWorld).applyMatrix4($)),Array.isArray(i)){const r=t.groups;for(let a=0,o=r.length;a0&&function(e,t,n,r){if(null!==(!0===n.isScene?n.overrideMaterial:null))return;const i=X.isWebGL2;null===z&&(z=new nN(1,1,{generateMipmaps:!0,type:q.has("EXT_color_buffer_half_float")?DI:NI,minFilter:OI,samples:i?4:0})),w.getDrawingBufferSize(H),i?z.setSize(H.x,H.y):z.setSize(CO(H.x),CO(H.y));const a=w.getRenderTarget();w.setRenderTarget(z),w.getClearColor(C),M=w.getClearAlpha(),M<1&&w.setClearColor(16777215,.5),w.clear();const o=w.toneMapping;w.toneMapping=0,Ne(e,n,r),Q.updateMultisampleRenderTarget(z),Q.updateRenderTargetMipmap(z);let s=!1;for(let e=0,i=t.length;e0&&Ne(i,t,n),a.length>0&&Ne(a,t,n),o.length>0&&Ne(o,t,n),Y.buffers.depth.setTest(!0),Y.buffers.depth.setMask(!0),Y.buffers.color.setMask(!0),Y.setPolygonOffset(!1)}function Ne(e,t,n){const r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,a=e.length;i0?m[m.length-1]:null,b.pop(),p=b.length>0?b[b.length-1]:null},this.getActiveCubeFace=function(){return y},this.getActiveMipmapLevel=function(){return E},this.getRenderTarget=function(){return _},this.setRenderTargetTextures=function(e,t,n){Z.get(e.texture).__webglTexture=t,Z.get(e.depthTexture).__webglTexture=n;const r=Z.get(e);r.__hasExternalTextures=!0,r.__hasExternalTextures&&(r.__autoAllocateDepthBuffer=void 0===n,r.__autoAllocateDepthBuffer||!0===q.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),r.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){const n=Z.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,n=0){_=e,y=t,E=n;let r=!0,i=null,a=!1,o=!1;if(e){const s=Z.get(e);void 0!==s.__useDefaultFramebuffer?(Y.bindFramebuffer(me.FRAMEBUFFER,null),r=!1):void 0===s.__webglFramebuffer?Q.setupRenderTarget(e):s.__hasExternalTextures&&Q.rebindTextures(e,Z.get(e.texture).__webglTexture,Z.get(e.depthTexture).__webglTexture);const c=e.texture;(c.isData3DTexture||c.isDataArrayTexture||c.isCompressedArrayTexture)&&(o=!0);const l=Z.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(i=Array.isArray(l[t])?l[t][n]:l[t],a=!0):i=X.isWebGL2&&e.samples>0&&!1===Q.useMultisampledRTT(e)?Z.get(e).__webglMultisampledFramebuffer:Array.isArray(l)?l[n]:l,T.copy(e.viewport),A.copy(e.scissor),k=e.scissorTest}else T.copy(L).multiplyScalar(N).floor(),A.copy(D).multiplyScalar(N).floor(),k=F;if(Y.bindFramebuffer(me.FRAMEBUFFER,i)&&X.drawBuffers&&r&&Y.drawBuffers(e,i),Y.viewport(T),Y.scissor(A),Y.setScissorTest(k),a){const r=Z.get(e.texture);me.framebufferTexture2D(me.FRAMEBUFFER,me.COLOR_ATTACHMENT0,me.TEXTURE_CUBE_MAP_POSITIVE_X+t,r.__webglTexture,n)}else if(o){const r=Z.get(e.texture),i=t||0;me.framebufferTextureLayer(me.FRAMEBUFFER,me.COLOR_ATTACHMENT0,r.__webglTexture,n||0,i)}S=-1},this.readRenderTargetPixels=function(e,t,n,r,i,a,o){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let s=Z.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==o&&(s=s[o]),s){Y.bindFramebuffer(me.FRAMEBUFFER,s);try{const o=e.texture,s=o.format,c=o.type;if(s!==UI&&pe.convert(s)!==me.getParameter(me.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const l=c===DI&&(q.has("EXT_color_buffer_half_float")||X.isWebGL2&&q.has("EXT_color_buffer_float"));if(!(c===NI||pe.convert(c)===me.getParameter(me.IMPLEMENTATION_COLOR_READ_TYPE)||c===LI&&(X.isWebGL2||q.has("OES_texture_float")||q.has("WEBGL_color_buffer_float"))||l))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&me.readPixels(t,n,r,i,pe.convert(s),pe.convert(c),a)}finally{const e=null!==_?Z.get(_).__webglFramebuffer:null;Y.bindFramebuffer(me.FRAMEBUFFER,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){const r=Math.pow(2,-n),i=Math.floor(t.image.width*r),a=Math.floor(t.image.height*r);Q.setTexture2D(t,0),me.copyTexSubImage2D(me.TEXTURE_2D,n,0,0,e.x,e.y,i,a),Y.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r=0){const i=t.image.width,a=t.image.height,o=pe.convert(n.format),s=pe.convert(n.type);Q.setTexture2D(n,0),me.pixelStorei(me.UNPACK_FLIP_Y_WEBGL,n.flipY),me.pixelStorei(me.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),me.pixelStorei(me.UNPACK_ALIGNMENT,n.unpackAlignment),t.isDataTexture?me.texSubImage2D(me.TEXTURE_2D,r,e.x,e.y,i,a,o,s,t.image.data):t.isCompressedTexture?me.compressedTexSubImage2D(me.TEXTURE_2D,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,o,t.mipmaps[0].data):me.texSubImage2D(me.TEXTURE_2D,r,e.x,e.y,o,s,t.image),0===r&&n.generateMipmaps&&me.generateMipmap(me.TEXTURE_2D),Y.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,i=0){if(w.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const a=e.max.x-e.min.x+1,o=e.max.y-e.min.y+1,s=e.max.z-e.min.z+1,c=pe.convert(r.format),l=pe.convert(r.type);let u;if(r.isData3DTexture)Q.setTexture3D(r,0),u=me.TEXTURE_3D;else{if(!r.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");Q.setTexture2DArray(r,0),u=me.TEXTURE_2D_ARRAY}me.pixelStorei(me.UNPACK_FLIP_Y_WEBGL,r.flipY),me.pixelStorei(me.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),me.pixelStorei(me.UNPACK_ALIGNMENT,r.unpackAlignment);const f=me.getParameter(me.UNPACK_ROW_LENGTH),h=me.getParameter(me.UNPACK_IMAGE_HEIGHT),d=me.getParameter(me.UNPACK_SKIP_PIXELS),p=me.getParameter(me.UNPACK_SKIP_ROWS),g=me.getParameter(me.UNPACK_SKIP_IMAGES),b=n.isCompressedTexture?n.mipmaps[0]:n.image;me.pixelStorei(me.UNPACK_ROW_LENGTH,b.width),me.pixelStorei(me.UNPACK_IMAGE_HEIGHT,b.height),me.pixelStorei(me.UNPACK_SKIP_PIXELS,e.min.x),me.pixelStorei(me.UNPACK_SKIP_ROWS,e.min.y),me.pixelStorei(me.UNPACK_SKIP_IMAGES,e.min.z),n.isDataTexture||n.isData3DTexture?me.texSubImage3D(u,i,t.x,t.y,t.z,a,o,s,c,l,b.data):n.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),me.compressedTexSubImage3D(u,i,t.x,t.y,t.z,a,o,s,c,b.data)):me.texSubImage3D(u,i,t.x,t.y,t.z,a,o,s,c,l,b),me.pixelStorei(me.UNPACK_ROW_LENGTH,f),me.pixelStorei(me.UNPACK_IMAGE_HEIGHT,h),me.pixelStorei(me.UNPACK_SKIP_PIXELS,d),me.pixelStorei(me.UNPACK_SKIP_ROWS,p),me.pixelStorei(me.UNPACK_SKIP_IMAGES,g),0===i&&r.generateMipmaps&&me.generateMipmap(u),Y.unbindTexture()},this.initTexture=function(e){e.isCubeTexture?Q.setTextureCube(e,0):e.isData3DTexture?Q.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?Q.setTexture2DArray(e,0):Q.setTexture2D(e,0),Y.unbindTexture()},this.resetState=function(){y=0,E=0,_=null,Y.reset(),ge.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return bO}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===JI?"display-p3":"srgb",t.unpackColorSpace=GO.workingColorSpace===eO?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===ZI?YI:3e3}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===YI?ZI:QI}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 extends oF{}).prototype.isWebGL1Renderer=!0;class sF extends kR{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new xR(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const cF=new oN,lF=new oN,uF=new DN,fF=new LN,hF=new kN;class dF{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}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 t=[];let n,r=this.getPoint(0),i=0;t.push(0);for(let a=1;a<=e;a++)n=this.getPoint(a/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let r=0;const i=n.length;let a;a=t||e*n[i-1];let o,s=0,c=i-1;for(;s<=c;)if(r=Math.floor(s+(c-s)/2),o=n[r]-a,o<0)s=r+1;else{if(!(o>0)){c=r;break}c=r-1}if(r=c,n[r]===a)return r/(i-1);const l=n[r];return(r+(a-l)/(n[r+1]-l))/(i-1)}getTangent(e,t){const n=1e-4;let r=e-n,i=e+n;r<0&&(r=0),i>1&&(i=1);const a=this.getPoint(r),o=this.getPoint(i),s=t||(a.isVector2?new NO:new oN);return s.copy(o).sub(a).normalize(),s}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new oN,r=[],i=[],a=[],o=new oN,s=new DN;for(let t=0;t<=e;t++){const n=t/e;r[t]=this.getTangentAt(n,new oN)}i[0]=new oN,a[0]=new oN;let c=Number.MAX_VALUE;const l=Math.abs(r[0].x),u=Math.abs(r[0].y),f=Math.abs(r[0].z);l<=c&&(c=l,n.set(1,0,0)),u<=c&&(c=u,n.set(0,1,0)),f<=c&&n.set(0,0,1),o.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],o),a[0].crossVectors(r[0],i[0]);for(let t=1;t<=e;t++){if(i[t]=i[t-1].clone(),a[t]=a[t-1].clone(),o.crossVectors(r[t-1],r[t]),o.length()>Number.EPSILON){o.normalize();const e=Math.acos(xO(r[t-1].dot(r[t]),-1,1));i[t].applyMatrix4(s.makeRotationAxis(o,e))}a[t].crossVectors(r[t],i[t])}if(!0===t){let t=Math.acos(xO(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(o.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(s.makeRotationAxis(r[n],t*n)),a[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:a}}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 pF extends dF{constructor(e=0,t=0,n=1,r=1,i=0,a=2*Math.PI,o=!1,s=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=a,this.aClockwise=o,this.aRotation=s}getPoint(e,t){const n=t||new NO,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const a=Math.abs(i)r;)i-=r;i0?0:(Math.floor(Math.abs(c)/i)+1)*i:0===l&&c===i-1&&(c=i-2,l=1),this.closed||c>0?o=r[(c-1)%i]:(bF.subVectors(r[0],r[1]).add(r[0]),o=bF);const u=r[c%i],f=r[(c+1)%i];if(this.closed||c+2r.length-2?r.length-1:a+1],u=r[a>r.length-3?r.length-1:a+2];return n.set(yF(o,s.x,c.x,l.x,u.x),yF(o,s.y,c.y,l.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t0&&m(!0),t>0&&m(!1)),this.setIndex(l),this.setAttribute("position",new PR(u,3)),this.setAttribute("normal",new PR(f,3)),this.setAttribute("uv",new PR(h,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new AF(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class kF extends AF{constructor(e=1,t=1,n=32,r=1,i=!1,a=0,o=2*Math.PI){super(0,e,t,n,r,i,a,o),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:a,thetaLength:o}}static fromJSON(e){return new kF(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class CF extends $R{constructor(e=1,t=32,n=16,r=0,i=2*Math.PI,a=0,o=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:a,thetaLength:o},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const s=Math.min(a+o,Math.PI);let c=0;const l=[],u=new oN,f=new oN,h=[],d=[],p=[],g=[];for(let h=0;h<=n;h++){const b=[],m=h/n;let w=0;0===h&&0===a?w=.5/t:h===n&&s===Math.PI&&(w=-.5/t);for(let n=0;n<=t;n++){const s=n/t;u.x=-e*Math.cos(r+s*i)*Math.sin(a+m*o),u.y=e*Math.cos(a+m*o),u.z=e*Math.sin(r+s*i)*Math.sin(a+m*o),d.push(u.x,u.y,u.z),f.copy(u).normalize(),p.push(f.x,f.y,f.z),g.push(s+w,1-m),b.push(c++)}l.push(b)}for(let e=0;e0)&&h.push(t,i,c),(e!==n-1||s=i)){const o=t[1];e=i)break t}a=n,n=0;break n}break e}for(;n>>1;et;)--a;if(++a,0!==i||a!==r){i>=a&&(a=Math.max(a,1),i=a-1);const e=this.getValueSize();this.times=n.slice(i,a),this.values=this.values.slice(i*e,a*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let t=0;t!==i;t++){const r=n[t];if("number"==typeof r&&isNaN(r)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,r),e=!1;break}if(null!==a&&a>r){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,r,a),e=!1;break}a=r}if(void 0!==r&&function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(r))for(let t=0,n=r.length;t!==n;++t){const n=r[t];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,n),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),r=this.getInterpolation()===XI,i=e.length-1;let a=1;for(let o=1;o0){e[a]=e[i];for(let e=i*n,r=a*n,o=0;o!==n;++o)t[r+o]=t[e+o];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}LF.prototype.TimeBufferType=Float32Array,LF.prototype.ValueBufferType=Float32Array,LF.prototype.DefaultInterpolation=qI;class DF extends LF{}DF.prototype.ValueTypeName="bool",DF.prototype.ValueBufferType=Array,DF.prototype.DefaultInterpolation=WI,DF.prototype.InterpolantFactoryMethodLinear=void 0,DF.prototype.InterpolantFactoryMethodSmooth=void 0;(class extends LF{}).prototype.ValueTypeName="color";(class extends LF{}).prototype.ValueTypeName="number";class FF extends OF{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=(n-t)/(r-t);let c=e*o;for(let e=c+o;c!==e;c+=4)aN.slerpFlat(i,0,a,c-o,a,c,s);return i}}class UF extends LF{InterpolantFactoryMethodLinear(e){return new FF(this.times,this.values,this.getValueSize(),e)}}UF.prototype.ValueTypeName="quaternion",UF.prototype.DefaultInterpolation=qI,UF.prototype.InterpolantFactoryMethodSmooth=void 0;class jF extends LF{}jF.prototype.ValueTypeName="string",jF.prototype.ValueBufferType=Array,jF.prototype.DefaultInterpolation=WI,jF.prototype.InterpolantFactoryMethodLinear=void 0,jF.prototype.InterpolantFactoryMethodSmooth=void 0;(class extends LF{}).prototype.ValueTypeName="vector";const BF={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class zF{constructor(e,t,n){const r=this;let i,a=!1,o=0,s=0;const c=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){s++,!1===a&&void 0!==r.onStart&&r.onStart(e,o,s),a=!0},this.itemEnd=function(e){o++,void 0!==r.onProgress&&r.onProgress(e,o,s),o===s&&(a=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return i?i(e):e},this.setURLModifier=function(e){return i=e,this},this.addHandler=function(e,t){return c.push(e,t),this},this.removeHandler=function(e){const t=c.indexOf(e);return-1!==t&&c.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=c.length;t0){const e=a[0].object;uU.setFromNormalAndCoplanarPoint(t.getWorldDirection(uU.normal),gU.setFromMatrixPosition(e.matrixWorld)),i!==e&&null!==i&&(o.dispatchEvent({type:"hoveroff",object:i}),n.style.cursor="auto",i=null),i!==e&&(o.dispatchEvent({type:"hoveron",object:e}),n.style.cursor="pointer",i=e)}else null!==i&&(o.dispatchEvent({type:"hoveroff",object:i}),n.style.cursor="auto",i=null)}}function u(i){!1!==o.enabled&&(h(i),a.length=0,fU.setFromCamera(hU,t),fU.intersectObjects(e,o.recursive,a),a.length>0&&(r=!0===o.transformGroup?e[0]:a[0].object,uU.setFromNormalAndCoplanarPoint(t.getWorldDirection(uU.normal),gU.setFromMatrixPosition(r.matrixWorld)),fU.ray.intersectPlane(uU,pU)&&(bU.copy(r.parent.matrixWorld).invert(),dU.copy(pU).sub(gU.setFromMatrixPosition(r.matrixWorld))),n.style.cursor="move",o.dispatchEvent({type:"dragstart",object:r})))}function f(){!1!==o.enabled&&(r&&(o.dispatchEvent({type:"dragend",object:r}),r=null),n.style.cursor=i?"pointer":"auto")}function h(e){const t=n.getBoundingClientRect();hU.x=(e.clientX-t.left)/t.width*2-1,hU.y=-(e.clientY-t.top)/t.height*2+1}s(),this.enabled=!0,this.recursive=!0,this.transformGroup=!1,this.activate=s,this.deactivate=c,this.dispose=function(){c()},this.getObjects=function(){return e},this.getRaycaster=function(){return fU}}}const wU=4294967296;function vU(e){return e.x}function yU(e){return e.y}function EU(e){return e.z}var _U=Math.PI*(3-Math.sqrt(5)),SU=20*Math.PI/(9+Math.sqrt(221));function xU(e,t){t=t||2;var n,r=Math.min(3,Math.max(1,Math.round(t))),i=1,a=.001,o=1-Math.pow(a,1/300),s=0,c=.6,l=new Map,u=_A(d),f=cA("tick","end"),h=function(){let e=1;return()=>(e=(1664525*e+1013904223)%wU)/wU}();function d(){p(),f.call("tick",n),i1&&(null==u.fy?u.y+=u.vy*=c:(u.y=u.fy,u.vy=0)),r>2&&(null==u.fz?u.z+=u.vz*=c:(u.z=u.fz,u.vz=0));return n}function g(){for(var t,n=0,i=e.length;n1&&isNaN(t.y)||r>2&&isNaN(t.z)){var a=10*(r>2?Math.cbrt(.5+n):r>1?Math.sqrt(.5+n):n),o=n*_U,s=n*SU;1===r?t.x=a:2===r?(t.x=a*Math.cos(o),t.y=a*Math.sin(o)):(t.x=a*Math.sin(o)*Math.cos(s),t.y=a*Math.cos(o),t.z=a*Math.sin(o)*Math.sin(s))}(isNaN(t.vx)||r>1&&isNaN(t.vy)||r>2&&isNaN(t.vz))&&(t.vx=0,r>1&&(t.vy=0),r>2&&(t.vz=0))}}function b(t){return t.initialize&&t.initialize(e,h,r),t}return null==e&&(e=[]),g(),n={tick:p,restart:function(){return u.restart(d),n},stop:function(){return u.stop(),n},numDimensions:function(e){return arguments.length?(r=Math.min(3,Math.max(1,Math.round(e))),l.forEach(b),n):r},nodes:function(t){return arguments.length?(e=t,g(),l.forEach(b),n):e},alpha:function(e){return arguments.length?(i=+e,n):i},alphaMin:function(e){return arguments.length?(a=+e,n):a},alphaDecay:function(e){return arguments.length?(o=+e,n):+o},alphaTarget:function(e){return arguments.length?(s=+e,n):s},velocityDecay:function(e){return arguments.length?(c=1-e,n):1-c},randomSource:function(e){return arguments.length?(h=e,l.forEach(b),n):h},force:function(e,t){return arguments.length>1?(null==t?l.delete(e):l.set(e,b(t)),n):l.get(e)},find:function(){var t,n,i,a,o,s,c=Array.prototype.slice.call(arguments),l=c.shift()||0,u=(r>1?c.shift():null)||0,f=(r>2?c.shift():null)||0,h=c.shift()||1/0,d=0,p=e.length;for(h*=h,d=0;d1?(f.on(e,t),n):f.on(e)}}}function TU(e){return function(){return e}}function AU(e){return 1e-6*(e()-.5)}function kU(e){return e.index}function CU(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function MU(e){var t,n,r,i,a,o,s,c=kU,l=function(e){return 1/Math.min(a[e.source.index],a[e.target.index])},u=TU(30),f=1;function h(r){for(var a=0,c=e.length;a1&&(m=h.y+h.vy-u.y-u.vy||AU(s)),i>2&&(w=h.z+h.vz-u.z-u.vz||AU(s)),b*=d=((d=Math.sqrt(b*b+m*m+w*w))-n[g])/d*r*t[g],m*=d,w*=d,h.vx-=b*(p=o[g]),i>1&&(h.vy-=m*p),i>2&&(h.vz-=w*p),u.vx+=b*(p=1-p),i>1&&(u.vy+=m*p),i>2&&(u.vz+=w*p)}function d(){if(r){var i,s,l=r.length,u=e.length,f=new Map(r.map((e,t)=>[c(e,t,r),e]));for(i=0,a=new Array(l);i"function"==typeof e)||Math.random,i=t.find(e=>[1,2,3].includes(e))||2,d()},h.links=function(t){return arguments.length?(e=t,d(),h):e},h.id=function(e){return arguments.length?(c=e,h):c},h.iterations=function(e){return arguments.length?(f=+e,h):f},h.strength=function(e){return arguments.length?(l="function"==typeof e?e:TU(+e),p(),h):l},h.distance=function(e){return arguments.length?(u="function"==typeof e?e:TU(+e),g(),h):u},h}function IU(e,t,n){if(isNaN(t))return e;var r,i,a,o,s,c,l=e._root,u={data:n},f=e._x0,h=e._x1;if(!l)return e._root=u,e;for(;l.length;)if((o=t>=(i=(f+h)/2))?f=i:h=i,r=l,!(l=l[s=+o]))return r[s]=u,e;if(t===(a=+e._x.call(null,l.data)))return u.next=l,r?r[s]=u:e._root=u,e;do{r=r?r[s]=new Array(2):e._root=new Array(2),(o=t>=(i=(f+h)/2))?f=i:h=i}while((s=+o)===(c=+(a>=i)));return r[c]=l,r[s]=u,e}function OU(e,t,n){this.node=e,this.x0=t,this.x1=n}function NU(e){return e[0]}function RU(e,t){var n=new PU(null==t?NU:t,NaN,NaN);return null==e?n:n.addAll(e)}function PU(e,t,n){this._x=e,this._x0=t,this._x1=n,this._root=void 0}function LU(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var DU=RU.prototype=PU.prototype;function FU(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a,o,s,c,l,u,f,h,d=e._root,p={data:r},g=e._x0,b=e._y0,m=e._x1,w=e._y1;if(!d)return e._root=p,e;for(;d.length;)if((l=t>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(b+w)/2))?b=o:w=o,i=d,!(d=d[f=u<<1|l]))return i[f]=p,e;if(s=+e._x.call(null,d.data),c=+e._y.call(null,d.data),t===s&&n===c)return p.next=d,i?i[f]=p:e._root=p,e;do{i=i?i[f]=new Array(4):e._root=new Array(4),(l=t>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(b+w)/2))?b=o:w=o}while((f=u<<1|l)==(h=(c>=o)<<1|s>=a));return i[h]=d,i[f]=p,e}function UU(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function jU(e){return e[0]}function BU(e){return e[1]}function zU(e,t,n){var r=new $U(null==t?jU:t,null==n?BU:n,NaN,NaN,NaN,NaN);return null==e?r:r.addAll(e)}function $U(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function HU(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}DU.copy=function(){var e,t,n=new PU(this._x,this._x0,this._x1),r=this._root;if(!r)return n;if(!r.length)return n._root=LU(r),n;for(e=[{source:r,target:n._root=new Array(2)}];r=e.pop();)for(var i=0;i<2;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(2)}):r.target[i]=LU(t));return n},DU.add=function(e){var t=+this._x.call(null,e);return IU(this.cover(t),t,e)},DU.addAll=function(e){var t,n,r=e.length,i=new Array(r),a=1/0,o=-1/0;for(t=0;to&&(o=n));if(a>o)return this;for(this.cover(a).cover(o),t=0;te||e>=n;)switch(i=+(ec||(i=a.x1)=f))&&(a=l[l.length-1],l[l.length-1]=l[l.length-1-o],l[l.length-1-o]=a)}else{var h=Math.abs(e-+this._x.call(null,u.data));h=(o=(f+h)/2))?f=o:h=o,t=u,!(u=u[c=+s]))return this;if(!u.length)break;t[c+1&1]&&(n=t,l=c)}for(;u.data!==e;)if(r=u,!(u=u.next))return this;return(i=u.next)&&delete u.next,r?(i?r.next=i:delete r.next,this):t?(i?t[c]=i:delete t[c],(u=t[0]||t[1])&&u===(t[1]||t[0])&&!u.length&&(n?n[l]=u:this._root=u),this):(this._root=i,this)},DU.removeAll=function(e){for(var t=0,n=e.length;t=(o=(v+_)/2))?v=o:_=o,(d=n>=(s=(y+S)/2))?y=s:S=s,(p=r>=(c=(E+x)/2))?E=c:x=c,a=m,!(m=m[g=p<<2|d<<1|h]))return a[g]=w,e;if(l=+e._x.call(null,m.data),u=+e._y.call(null,m.data),f=+e._z.call(null,m.data),t===l&&n===u&&r===f)return w.next=m,a?a[g]=w:e._root=w,e;do{a=a?a[g]=new Array(8):e._root=new Array(8),(h=t>=(o=(v+_)/2))?v=o:_=o,(d=n>=(s=(y+S)/2))?y=s:S=s,(p=r>=(c=(E+x)/2))?E=c:x=c}while((g=p<<2|d<<1|h)==(b=(f>=c)<<2|(u>=s)<<1|l>=o));return a[b]=m,a[g]=w,e}function WU(e,t,n,r,i,a,o){this.node=e,this.x0=t,this.y0=n,this.z0=r,this.x1=i,this.y1=a,this.z1=o}function qU(e){return e[0]}function XU(e){return e[1]}function YU(e){return e[2]}function KU(e,t,n,r){var i=new ZU(null==t?qU:t,null==n?XU:n,null==r?YU:r,NaN,NaN,NaN,NaN,NaN,NaN);return null==e?i:i.addAll(e)}function ZU(e,t,n,r,i,a,o,s,c){this._x=e,this._y=t,this._z=n,this._x0=r,this._y0=i,this._z0=a,this._x1=o,this._y1=s,this._z1=c,this._root=void 0}function QU(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}GU.copy=function(){var e,t,n=new $U(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=HU(r),n;for(e=[{source:r,target:n._root=new Array(4)}];r=e.pop();)for(var i=0;i<4;++i)(t=r.source[i])&&(t.length?e.push({source:t,target:r.target[i]=new Array(4)}):r.target[i]=HU(t));return n},GU.add=function(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return FU(this.cover(t,n),t,n,e)},GU.addAll=function(e){var t,n,r,i,a=e.length,o=new Array(a),s=new Array(a),c=1/0,l=1/0,u=-1/0,f=-1/0;for(n=0;nu&&(u=r),if&&(f=i));if(c>u||l>f)return this;for(this.cover(c,l).cover(u,f),n=0;ne||e>=i||r>t||t>=a;)switch(s=(th||(a=c.y0)>d||(o=c.x1)=m)<<1|e>=b)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-l],p[p.length-1-l]=c)}else{var w=e-+this._x.call(null,g.data),v=t-+this._y.call(null,g.data),y=w*w+v*v;if(y=(s=(p+b)/2))?p=s:b=s,(u=o>=(c=(g+m)/2))?g=c:m=c,t=d,!(d=d[f=u<<1|l]))return this;if(!d.length)break;(t[f+1&3]||t[f+2&3]||t[f+3&3])&&(n=t,h=f)}for(;d.data!==e;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):t?(i?t[f]=i:delete t[f],(d=t[0]||t[1]||t[2]||t[3])&&d===(t[3]||t[2]||t[1]||t[0])&&!d.length&&(n?n[h]=d:this._root=d),this):(this._root=i,this)},GU.removeAll=function(e){for(var t=0,n=e.length;t1&&(e.y=o/u),t>2&&(e.z=s/u)}else{(n=e).x=n.data.x,t>1&&(n.y=n.data.y),t>2&&(n.z=n.data.z);do{l+=a[n.data.index]}while(n=n.next)}e.value=l}function d(e,o,u,f,h){if(!e.value)return!0;var d=[u,f,h][t-1],p=e.x-n.x,g=t>1?e.y-n.y:0,b=t>2?e.z-n.z:0,m=d-o,w=p*p+g*g+b*b;if(m*m/l1&&0===g&&(w+=(g=AU(r))*g),t>2&&0===b&&(w+=(b=AU(r))*b),w1&&(n.vy+=g*e.value*i/w),t>2&&(n.vz+=b*e.value*i/w)),!0;if(!(e.length||w>=c)){(e.data!==n||e.next)&&(0===p&&(w+=(p=AU(r))*p),t>1&&0===g&&(w+=(g=AU(r))*g),t>2&&0===b&&(w+=(b=AU(r))*b),w1&&(n.vy+=g*m),t>2&&(n.vz+=b*m))}while(e=e.next)}}return u.initialize=function(n,...i){e=n,r=i.find(e=>"function"==typeof e)||Math.random,t=i.find(e=>[1,2,3].includes(e))||2,f()},u.strength=function(e){return arguments.length?(o="function"==typeof e?e:TU(+e),f(),u):o},u.distanceMin=function(e){return arguments.length?(s=e*e,u):Math.sqrt(s)},u.distanceMax=function(e){return arguments.length?(c=e*e,u):Math.sqrt(c)},u.theta=function(e){return arguments.length?(l=e*e,u):Math.sqrt(l)},u}function tj(e,t,n){var r,i=1;function a(){var a,o,s=r.length,c=0,l=0,u=0;for(a=0;ad&&(d=r),ip&&(p=i),ag&&(g=a));if(u>d||f>p||h>g)return this;for(this.cover(u,f,h).cover(d,p,g),n=0;ne||e>=o||i>t||t>=s||a>n||n>=c;)switch(u=(nb||(o=f.y0)>m||(s=f.z0)>w||(c=f.x1)=S)<<2|(t>=_)<<1|e>=E)&&(f=v[v.length-1],v[v.length-1]=v[v.length-1-h],v[v.length-1-h]=f)}else{var x=e-+this._x.call(null,y.data),T=t-+this._y.call(null,y.data),A=n-+this._z.call(null,y.data),k=x*x+T*T+A*A;if(k=(c=(m+y)/2))?m=c:y=c,(h=o>=(l=(w+E)/2))?w=l:E=l,(d=s>=(u=(v+_)/2))?v=u:_=u,t=b,!(b=b[p=d<<2|h<<1|f]))return this;if(!b.length)break;(t[p+1&7]||t[p+2&7]||t[p+3&7]||t[p+4&7]||t[p+5&7]||t[p+6&7]||t[p+7&7])&&(n=t,g=p)}for(;b.data!==e;)if(r=b,!(b=b.next))return this;return(i=b.next)&&delete b.next,r?(i?r.next=i:delete r.next,this):t?(i?t[p]=i:delete t[p],(b=t[0]||t[1]||t[2]||t[3]||t[4]||t[5]||t[6]||t[7])&&b===(t[7]||t[6]||t[5]||t[4]||t[3]||t[2]||t[1]||t[0])&&!b.length&&(n?n[g]=b:this._root=b),this):(this._root=i,this)},JU.removeAll=function(e){for(var t=0,n=e.length;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},t=Object.assign({},n instanceof Function?n(e):n,{initialised:!1}),r={};function i(t){return a(t,e),s(),i}var a=function(e,n){u.call(i,e,t,n),t.initialised=!0},s=function(e,t,n){var r,i,a,o,s,c,l=0,u=!1,f=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function d(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n)}function p(e){var n=e-c;return void 0===c||n>=t||n<0||f&&e-l>=a}function g(){var e=ij();if(p(e))return b(e);s=setTimeout(g,function(e){var n=t-(e-c);return f?oj(n,a-(e-l)):n}(e))}function b(e){return s=void 0,h&&r?d(e):(r=i=void 0,o)}function m(){var e=ij(),n=p(e);if(r=arguments,i=this,c=e,n){if(void 0===s)return function(e){return l=e,s=setTimeout(g,t),u?d(e):o}(c);if(f)return clearTimeout(s),s=setTimeout(g,t),d(c)}return void 0===s&&(s=setTimeout(g,t)),o}return t=ib(t)||0,lh(n)&&(u=!!n.leading,a=(f="maxWait"in n)?aj(ib(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h),m.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=c=i=s=void 0},m.flush=function(){return void 0===s?o:b(ij())},m}(function(){t.initialised&&(h.call(i,t,r),r={})},1);return d.forEach(function(e){i[e.name]=function(e){var n=e.name,a=e.triggerUpdate,o=void 0!==a&&a,c=e.onChange,l=void 0===c?function(e,t){}:c,u=e.defaultVal,f=void 0===u?null:u;return function(e){var a=t[n];if(!arguments.length)return a;var c=void 0===e?f:e;return t[n]=c,l.call(i,c,t,a),!r.hasOwnProperty(n)&&(r[n]=a),o&&s(),i}}(e)}),Object.keys(o).forEach(function(e){i[e]=function(){for(var n,r=arguments.length,a=new Array(r),s=0;st||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function gj(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n=i)&&(n=i)}return n}function bj(e,t){if(e){if("string"==typeof e)return mj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mj(e,t):void 0}}function mj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=(t instanceof Array?t.length?t:[void 0]:[t]).map(function(e){return{keyAccessor:e,isProp:!(e instanceof Function)}}),a=e.reduce(function(e,t){var r=e,a=t;return i.forEach(function(e,t){var o,s=e.keyAccessor;if(e.isProp){var c=a,l=c[s],u=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(c,[s].map(wj));o=l,a=u}else o=s(a,t);t+11&&void 0!==arguments[1]?arguments[1]:1;r===i.length?Object.keys(t).forEach(function(e){return t[e]=n(t[e])}):Object.values(t).forEach(function(t){return e(t,r+1)})}(a);var o=a;return r&&(o=[],function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];n.length===i.length?o.push({keys:n,vals:t}):Object.entries(t).forEach(function(t){var r,i=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||bj(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,2),a=i[0],o=i[1];return e(o,[].concat(function(e){if(Array.isArray(e))return mj(e)}(r=n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||bj(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[a]))})}(a),t instanceof Array&&0===t.length&&1===o.length&&(o[0].keys=[])),o};function yj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ej(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||xj(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sj(e){return function(e){if(Array.isArray(e))return Tj(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||xj(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xj(e,t){if(e){if("string"==typeof e)return Tj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tj(e,t):void 0}}function Tj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(i,Aj),b=function(e,t,n){var r=n.objBindAttr,i=void 0===r?"__obj":r,a=n.dataBindAttr,o=void 0===a?"__data":a,s=n.idAccessor,c=n.purge,l=void 0!==c&&c,u=function(e){return e.hasOwnProperty(o)},f=t.filter(function(e){return!u(e)}),h=t.filter(u).map(function(e){return e[o]}),d=l?{enter:e,exit:h,update:[]}:function(e,t,n){var r={enter:[],update:[],exit:[]};if(n){var i=vj(e,n,!1),a=vj(t,n,!1),o=Object.assign({},i,a);Object.entries(o).forEach(function(e){var t=_j(e,2),n=t[0],o=t[1],s=i.hasOwnProperty(n)?a.hasOwnProperty(n)?"update":"exit":"enter";r[s].push("update"===s?[i[n],a[n]]:o)})}else{var s=new Set(e),c=new Set(t);new Set([].concat(Sj(s),Sj(c))).forEach(function(e){var t=s.has(e)?c.has(e)?"update":"exit":"enter";r[t].push("update"===t?[e,e]:e)})}return r}(h,e,s);return d.update=d.update.map(function(e){var t=_j(e,2),n=t[0],r=t[1];return n!==r&&(r[i]=n[i],r[i][o]=r),r}),d.exit=d.exit.concat(f.map(function(e){return Ej({},i,e)})),d}(e,t,function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:{},r=n.objFilter,i=void 0===r?function(){return!0}:r,a=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(n,Zj);return kj(e,t.children.filter(i),function(e){return t.add(e)},function(e){t.remove(e),Kj(e)},Lj({objBindAttr:"__threeObj"},a))}var Jj=function(e){return isNaN(e)?parseInt(Rj(e).toHex(),16):e},eB=function(e){return isNaN(e)?Rj(e).getAlpha():1},tB=function e(){var t=new Cj,n=[],r=[],i=Oj;function a(e){let a=t.get(e);if(void 0===a){if(i!==Oj)return i;t.set(e,a=n.push(e)-1)}return r[a%r.length]}return a.domain=function(e){if(!arguments.length)return n.slice();n=[],t=new Cj;for(const r of e)t.has(r)||t.set(r,n.push(r)-1);return a},a.range=function(e){return arguments.length?(r=Array.from(e),a):r.slice()},a.unknown=function(e){return arguments.length?(i=e,a):i},a.copy=function(){return e(n,r).unknown(i)},_M.apply(a,arguments),a}(Nj);function nB(e,t,n){t&&"string"==typeof n&&e.filter(function(e){return!e[n]}).forEach(function(e){e[n]=tB(t(e))})}var rB=window.THREE?window.THREE:{Group:JD,Mesh:oP,MeshLambertMaterial:class extends kR{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new xR(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new xR(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=0,this.normalScale=new NO(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,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.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}},Color:xR,BufferGeometry:$R,BufferAttribute:OR,Matrix4:DN,Vector3:oN,SphereGeometry:CF,CylinderGeometry:AF,TubeGeometry:MF,ConeGeometry:kF,Line:class extends sR{constructor(e=new $R,t=new sF){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,r=t.count;es)continue;f.applyMatrix4(this.matrixWorld);const a=e.ray.origin.distanceTo(f);ae.far||t.push({distance:a,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}else for(let n=Math.max(0,a.start),r=Math.min(p.count,a.start+a.count)-1;ns)continue;f.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(f);re.far||t.push({distance:r,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e2?-60:-30),e<3&&r(t.graphData.nodes,"z"),e<2&&r(t.graphData.nodes,"y")}},dagMode:{onChange:function(e,t){!e&&"d3"===t.forceEngine&&(t.graphData.nodes||[]).forEach(function(e){return e.fx=e.fy=e.fz=void 0})}},dagLevelDistance:{},dagNodeFilter:{default:function(e){return!0}},onDagError:{triggerUpdate:!1},nodeRelSize:{default:4},nodeId:{default:"id"},nodeVal:{default:"val"},nodeResolution:{default:8},nodeColor:{default:"color"},nodeAutoColorBy:{},nodeOpacity:{default:.75},nodeVisibility:{default:!0},nodeThreeObject:{},nodeThreeObjectExtend:{default:!1},nodePositionUpdate:{triggerUpdate:!1},linkSource:{default:"source"},linkTarget:{default:"target"},linkVisibility:{default:!0},linkColor:{default:"color"},linkAutoColorBy:{},linkOpacity:{default:.2},linkWidth:{},linkResolution:{default:6},linkCurvature:{default:0,triggerUpdate:!1},linkCurveRotation:{default:0,triggerUpdate:!1},linkMaterial:{},linkThreeObject:{},linkThreeObjectExtend:{default:!1},linkPositionUpdate:{triggerUpdate:!1},linkDirectionalArrowLength:{default:0},linkDirectionalArrowColor:{},linkDirectionalArrowRelPos:{default:.5,triggerUpdate:!1},linkDirectionalArrowResolution:{default:8},linkDirectionalParticles:{default:0},linkDirectionalParticleSpeed:{default:.01,triggerUpdate:!1},linkDirectionalParticleWidth:{default:.5},linkDirectionalParticleColor:{},linkDirectionalParticleResolution:{default:4},forceEngine:{default:"d3"},d3AlphaMin:{default:0},d3AlphaDecay:{default:.0228,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.alphaDecay(e)}},d3AlphaTarget:{default:0,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.alphaTarget(e)}},d3VelocityDecay:{default:.4,triggerUpdate:!1,onChange:function(e,t){t.d3ForceLayout.velocityDecay(e)}},ngraphPhysics:{default:{timeStep:20,gravity:-1.2,theta:.8,springLength:30,springCoefficient:8e-4,dragCoefficient:.02}},warmupTicks:{default:0,triggerUpdate:!1},cooldownTicks:{default:1/0,triggerUpdate:!1},cooldownTime:{default:15e3,triggerUpdate:!1},onLoading:{default:function(){},triggerUpdate:!1},onFinishLoading:{default:function(){},triggerUpdate:!1},onUpdate:{default:function(){},triggerUpdate:!1},onFinishUpdate:{default:function(){},triggerUpdate:!1},onEngineTick:{default:function(){},triggerUpdate:!1},onEngineStop:{default:function(){},triggerUpdate:!1}},methods:{refresh:function(e){return e._flushObjects=!0,e._rerender(),this},d3Force:function(e,t,n){return void 0===n?e.d3ForceLayout.force(t):(e.d3ForceLayout.force(t,n),this)},d3ReheatSimulation:function(e){return e.d3ForceLayout.alpha(1),this.resetCountdown(),this},resetCountdown:function(e){return e.cntTicks=0,e.startTickTime=new Date,e.engineRunning=!0,this},tickFrame:function(e){var t,n,r,i,a="ngraph"!==e.forceEngine;return e.engineRunning&&function(){++e.cntTicks>e.cooldownTicks||new Date-e.startTickTime>e.cooldownTime||a&&e.d3AlphaMin>0&&e.d3ForceLayout.alpha()0){var p=s.x-o.x,g=s.y-o.y||0,b=(new rB.Vector3).subVectors(f,u),m=b.clone().multiplyScalar(c).cross(0!==p||0!==g?new rB.Vector3(0,0,1):new rB.Vector3(0,1,0)).applyAxisAngle(b.normalize(),d).add((new rB.Vector3).addVectors(u,f).divideScalar(2));l=new rB.QuadraticBezierCurve3(u,m,f)}else{var w=70*c,v=-d,y=v+Math.PI/2;l=new rB.CubicBezierCurve3(u,new rB.Vector3(w*Math.cos(y),w*Math.sin(y),0).add(u),new rB.Vector3(w*Math.cos(v),w*Math.sin(v),0).add(u),f)}t.__curve=l}else t.__curve=null}}(t);var f=o(t);if(!e.linkPositionUpdate||!e.linkPositionUpdate(f?s.children[1]:s,{start:{x:l.x,y:l.y,z:l.z},end:{x:u.x,y:u.y,z:u.z}},t)||f){var h=t.__curve,d=s.children.length?s.children[0]:s;if("Line"===d.type){if(h)d.geometry.setFromPoints(h.getPoints(30));else{var p=d.geometry.getAttribute("position");p&&p.array&&6===p.array.length||d.geometry[aB]("position",p=new rB.BufferAttribute(new Float32Array(6),3)),p.array[0]=l.x,p.array[1]=l.y||0,p.array[2]=l.z||0,p.array[3]=u.x,p.array[4]=u.y||0,p.array[5]=u.z||0,p.needsUpdate=!0}d.geometry.computeBoundingSphere()}else if("Mesh"===d.type)if(h){d.geometry.type.match(/^Tube(Buffer)?Geometry$/)||(d.position.set(0,0,0),d.rotation.set(0,0,0),d.scale.set(1,1,1));var g=Math.ceil(10*n(t))/10/2,b=new rB.TubeGeometry(h,30,g,e.linkResolution,!1);d.geometry.dispose(),d.geometry=b}else{if(!d.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)){var m=Math.ceil(10*n(t))/10/2,w=new rB.CylinderGeometry(m,m,1,e.linkResolution,1,!1);w[oB]((new rB.Matrix4).makeTranslation(0,.5,0)),w[oB]((new rB.Matrix4).makeRotationX(Math.PI/2)),d.geometry.dispose(),d.geometry=w}var v=new rB.Vector3(l.x,l.y||0,l.z||0),y=new rB.Vector3(u.x,u.y||0,u.z||0),E=v.distanceTo(y);d.position.x=v.x,d.position.y=v.y,d.position.z=v.z,d.scale.z=E,d.parent.localToWorld(y),d.lookAt(y)}}}}})}(),t=dj(e.linkDirectionalArrowRelPos),n=dj(e.linkDirectionalArrowLength),r=dj(e.nodeVal),e.graphData.links.forEach(function(i){var o=i.__arrowObj;if(o){var s=a?i:e.layout.getLinkPosition(e.layout.graph.getLink(i.source,i.target).id),c=s[a?"source":"from"],l=s[a?"target":"to"];if(c&&l&&c.hasOwnProperty("x")&&l.hasOwnProperty("x")){var u=Math.cbrt(Math.max(0,r(c)||1))*e.nodeRelSize,f=Math.cbrt(Math.max(0,r(l)||1))*e.nodeRelSize,h=n(i),d=t(i),p=i.__curve?function(e){return i.__curve.getPoint(e)}:function(e){var t=function(e,t,n,r){return t[e]+(n[e]-t[e])*r||0};return{x:t("x",c,l,e),y:t("y",c,l,e),z:t("z",c,l,e)}},g=i.__curve?i.__curve.getLength():Math.sqrt(["x","y","z"].map(function(e){return Math.pow((l[e]||0)-(c[e]||0),2)}).reduce(function(e,t){return e+t},0)),b=u+h+(g-u-f-h)*d,m=p(b/g),w=p((b-h)/g);["x","y","z"].forEach(function(e){return o.position[e]=w[e]});var v=zj(rB.Vector3,Gj(["x","y","z"].map(function(e){return m[e]})));o.parent.localToWorld(v),o.lookAt(v)}}}),i=dj(e.linkDirectionalParticleSpeed),e.graphData.links.forEach(function(t){var n=t.__photonsObj&&t.__photonsObj.children,r=t.__singleHopPhotonsObj&&t.__singleHopPhotonsObj.children;if(r&&r.length||n&&n.length){var o=a?t:e.layout.getLinkPosition(e.layout.graph.getLink(t.source,t.target).id),s=o[a?"source":"from"],c=o[a?"target":"to"];if(s&&c&&s.hasOwnProperty("x")&&c.hasOwnProperty("x")){var l=i(t),u=t.__curve?function(e){return t.__curve.getPoint(e)}:function(e){var t=function(e,t,n,r){return t[e]+(n[e]-t[e])*r||0};return{x:t("x",s,c,e),y:t("y",s,c,e),z:t("z",s,c,e)}};[].concat(Gj(n||[]),Gj(r||[])).forEach(function(e,t){var r="singleHopPhotons"===e.parent.__linkThreeObjType;if(e.hasOwnProperty("__progressRatio")||(e.__progressRatio=r?0:t/n.length),e.__progressRatio+=l,e.__progressRatio>=1){if(r)return e.parent.remove(e),void Kj(e);e.__progressRatio=e.__progressRatio%1}var i=e.__progressRatio,a=u(i);["x","y","z"].forEach(function(t){return e.position[t]=a[t]})})}}}),this},emitParticle:function(e,t){if(t&&e.graphData.links.includes(t)){if(!t.__singleHopPhotonsObj){var n=new rB.Group;n.__linkThreeObjType="singleHopPhotons",t.__singleHopPhotonsObj=n,e.graphScene.add(n)}var r=dj(e.linkDirectionalParticleWidth),i=Math.ceil(10*r(t))/10/2,a=e.linkDirectionalParticleResolution,o=new rB.SphereGeometry(i,a,a),s=dj(e.linkColor),c=dj(e.linkDirectionalParticleColor)(t)||s(t)||"#f0f0f0",l=new rB.Color(Jj(c)),u=3*e.linkOpacity,f=new rB.MeshLambertMaterial({color:l,transparent:!0,opacity:u});t.__singleHopPhotonsObj.add(new rB.Mesh(o,f))}return this},getGraphBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0};if(!e.initialised)return null;var n=function e(n){var r=[];if(n.geometry){n.geometry.computeBoundingBox();var i=new rB.Box3;i.copy(n.geometry.boundingBox).applyMatrix4(n.matrixWorld),r.push(i)}return r.concat.apply(r,Gj((n.children||[]).filter(function(e){return!e.hasOwnProperty("__graphObjType")||"node"===e.__graphObjType&&t(e.__data)}).map(e)))}(e.graphScene);return n.length?Object.assign.apply(Object,Gj(["x","y","z"].map(function(e){return Fj({},e,[pj(n,function(t){return t.min[e]}),gj(n,function(t){return t.max[e]})])}))):null}},stateInit:function(){return{d3ForceLayout:xU().force("link",MU()).force("charge",ej()).force("center",tj()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(e,t){t.graphScene=e},update:function(e,t){var n=function(e){return e.some(function(e){return t.hasOwnProperty(e)})};if(e.engineRunning=!1,e.onUpdate(),null!==e.nodeAutoColorBy&&n(["nodeAutoColorBy","graphData","nodeColor"])&&nB(e.graphData.nodes,dj(e.nodeAutoColorBy),e.nodeColor),null!==e.linkAutoColorBy&&n(["linkAutoColorBy","graphData","linkColor"])&&nB(e.graphData.links,dj(e.linkAutoColorBy),e.linkColor),e._flushObjects||n(["graphData","nodeThreeObject","nodeThreeObjectExtend","nodeVal","nodeColor","nodeVisibility","nodeRelSize","nodeResolution","nodeOpacity"])){var r=dj(e.nodeThreeObject),i=dj(e.nodeThreeObjectExtend),a=dj(e.nodeVal),o=dj(e.nodeColor),s=dj(e.nodeVisibility),c={},l={};Qj(e.graphData.nodes.filter(s),e.graphScene,{purge:e._flushObjects||n(["nodeThreeObject","nodeThreeObjectExtend"]),objFilter:function(e){return"node"===e.__graphObjType},createObj:function(t){var n,a=r(t),o=i(t);return a&&e.nodeThreeObject===a&&(a=a.clone()),a&&!o?n=a:((n=new rB.Mesh).__graphDefaultObj=!0,a&&o&&n.add(a)),n.__graphObjType="node",n},updateObj:function(t,n){if(t.__graphDefaultObj){var r=a(n)||1,i=Math.cbrt(r)*e.nodeRelSize,s=e.nodeResolution;t.geometry.type.match(/^Sphere(Buffer)?Geometry$/)&&t.geometry.parameters.radius===i&&t.geometry.parameters.widthSegments===s||(c.hasOwnProperty(r)||(c[r]=new rB.SphereGeometry(i,s,s)),t.geometry.dispose(),t.geometry=c[r]);var u=o(n),f=new rB.Color(Jj(u||"#ffffaa")),h=e.nodeOpacity*eB(u);"MeshLambertMaterial"===t.material.type&&t.material.color.equals(f)&&t.material.opacity===h||(l.hasOwnProperty(u)||(l[u]=new rB.MeshLambertMaterial({color:f,transparent:!0,opacity:h})),t.material.dispose(),t.material=l[u])}}})}if(e._flushObjects||n(["graphData","linkThreeObject","linkThreeObjectExtend","linkMaterial","linkColor","linkWidth","linkVisibility","linkResolution","linkOpacity","linkDirectionalArrowLength","linkDirectionalArrowColor","linkDirectionalArrowResolution","linkDirectionalParticles","linkDirectionalParticleWidth","linkDirectionalParticleColor","linkDirectionalParticleResolution"])){var u=dj(e.linkThreeObject),f=dj(e.linkThreeObjectExtend),h=dj(e.linkMaterial),d=dj(e.linkVisibility),p=dj(e.linkColor),g=dj(e.linkWidth),b={},m={},w={},v=e.graphData.links.filter(d);if(Qj(v,e.graphScene,{objBindAttr:"__lineObj",purge:e._flushObjects||n(["linkThreeObject","linkThreeObjectExtend","linkWidth"]),objFilter:function(e){return"link"===e.__graphObjType},exitObj:function(e){var t=e.__data&&e.__data.__singleHopPhotonsObj;t&&(t.parent.remove(t),Kj(t),delete e.__data.__singleHopPhotonsObj)},createObj:function(t){var n,r,i=u(t),a=f(t);if(i&&e.linkThreeObject===i&&(i=i.clone()),!i||a)if(g(t))n=new rB.Mesh;else{var o=new rB.BufferGeometry;o[aB]("position",new rB.BufferAttribute(new Float32Array(6),3)),n=new rB.Line(o)}return i?a?((r=new rB.Group).__graphDefaultObj=!0,r.add(n),r.add(i)):r=i:(r=n).__graphDefaultObj=!0,r.renderOrder=10,r.__graphObjType="link",r},updateObj:function(t,n){if(t.__graphDefaultObj){var r=t.children.length?t.children[0]:t,i=Math.ceil(10*g(n))/10,a=!!i;if(a){var o=i/2,s=e.linkResolution;if(!r.geometry.type.match(/^Cylinder(Buffer)?Geometry$/)||r.geometry.parameters.radiusTop!==o||r.geometry.parameters.radialSegments!==s){if(!b.hasOwnProperty(i)){var c=new rB.CylinderGeometry(o,o,1,s,1,!1);c[oB]((new rB.Matrix4).makeTranslation(0,.5,0)),c[oB]((new rB.Matrix4).makeRotationX(Math.PI/2)),b[i]=c}r.geometry.dispose(),r.geometry=b[i]}}var l=h(n);if(l)r.material=l;else{var u=p(n),f=new rB.Color(Jj(u||"#f0f0f0")),d=e.linkOpacity*eB(u),v=a?"MeshLambertMaterial":"LineBasicMaterial";if(r.material.type!==v||!r.material.color.equals(f)||r.material.opacity!==d){var y=a?m:w;y.hasOwnProperty(u)||(y[u]=new rB[v]({color:f,transparent:d<1,opacity:d,depthWrite:d>=1})),r.material.dispose(),r.material=y[u]}}}}}),e.linkDirectionalArrowLength||t.hasOwnProperty("linkDirectionalArrowLength")){var y=dj(e.linkDirectionalArrowLength),E=dj(e.linkDirectionalArrowColor);Qj(v.filter(y),e.graphScene,{objBindAttr:"__arrowObj",objFilter:function(e){return"arrow"===e.__linkThreeObjType},createObj:function(){var e=new rB.Mesh(void 0,new rB.MeshLambertMaterial({transparent:!0}));return e.__linkThreeObjType="arrow",e},updateObj:function(t,n){var r=y(n),i=e.linkDirectionalArrowResolution;if(!t.geometry.type.match(/^Cone(Buffer)?Geometry$/)||t.geometry.parameters.height!==r||t.geometry.parameters.radialSegments!==i){var a=new rB.ConeGeometry(.25*r,r,i);a.translate(0,r/2,0),a.rotateX(Math.PI/2),t.geometry.dispose(),t.geometry=a}var o=E(n)||p(n)||"#f0f0f0";t.material.color=new rB.Color(Jj(o)),t.material.opacity=3*e.linkOpacity*eB(o)}})}if(e.linkDirectionalParticles||t.hasOwnProperty("linkDirectionalParticles")){var _=dj(e.linkDirectionalParticles),S=dj(e.linkDirectionalParticleWidth),x=dj(e.linkDirectionalParticleColor),T={},A={};Qj(v.filter(_),e.graphScene,{objBindAttr:"__photonsObj",objFilter:function(e){return"photons"===e.__linkThreeObjType},createObj:function(){var e=new rB.Group;return e.__linkThreeObjType="photons",e},updateObj:function(t,n){var r,i=Math.round(Math.abs(_(n))),a=!!t.children.length&&t.children[0],o=Math.ceil(10*S(n))/10/2,s=e.linkDirectionalParticleResolution;a&&a.geometry.parameters.radius===o&&a.geometry.parameters.widthSegments===s?r=a.geometry:(A.hasOwnProperty(o)||(A[o]=new rB.SphereGeometry(o,s,s)),r=A[o],a&&a.geometry.dispose());var c,l=x(n)||p(n)||"#f0f0f0",u=new rB.Color(Jj(l)),f=3*e.linkOpacity;a&&a.material.color.equals(u)&&a.material.opacity===f?c=a.material:(T.hasOwnProperty(l)||(T[l]=new rB.MeshLambertMaterial({color:u,transparent:!0,opacity:f})),c=T[l],a&&a.material.dispose()),Qj(Gj(new Array(i)).map(function(e,t){return{idx:t}}),t,{idAccessor:function(e){return e.idx},createObj:function(){return new rB.Mesh(r,c)},updateObj:function(e){e.geometry=r,e.material=c}})}})}}if(e._flushObjects=!1,n(["graphData","nodeId","linkSource","linkTarget","numDimensions","forceEngine","dagMode","dagNodeFilter","dagLevelDistance"])){e.engineRunning=!1,e.graphData.links.forEach(function(t){t.source=t[e.linkSource],t.target=t[e.linkTarget]});var k,C="ngraph"!==e.forceEngine;if(C){(k=e.d3ForceLayout).stop().alpha(1).numDimensions(e.numDimensions).nodes(e.graphData.nodes);var M=e.d3ForceLayout.force("link");M&&M.id(function(t){return t[e.nodeId]}).links(e.graphData.links);var I=e.dagMode&&function(e,t){var n=e.nodes,r=e.links,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.nodeFilter,o=void 0===a?function(){return!0}:a,s=i.onLoopError,c=void 0===s?function(e){throw"Invalid DAG structure! Found cycle in node path: ".concat(e.join(" -> "),".")}:s,l={};n.forEach(function(e){return l[t(e)]={data:e,out:[],depth:-1,skip:!o(e)}}),r.forEach(function(e){var n=e.source,r=e.target,i=c(n),a=c(r);if(!l.hasOwnProperty(i))throw"Missing source node with id: ".concat(i);if(!l.hasOwnProperty(a))throw"Missing target node with id: ".concat(a);var o=l[i],s=l[a];function c(e){return"object"===Dj(e)?t(e):e}o.out.push(s)});var u=[];return function e(n){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=function(){var a=n[o];if(-1!==r.indexOf(a)){var s=[].concat(Gj(r.slice(r.indexOf(a))),[a]).map(function(e){return t(e.data)});return u.some(function(e){return e.length===s.length&&e.every(function(e,t){return e===s[t]})})||(u.push(s),c(s)),"continue"}i>a.depth&&(a.depth=i,e(a.out,[].concat(Gj(r),[a]),i+(a.skip?0:1)))},o=0,s=n.length;o1&&(u.vy+=h*g),a>2&&(u.vz+=d*g)}}function u(){if(i){var t,n=i.length;for(o=new Array(n),s=new Array(n),t=0;t[1,2,3].includes(e))||2,u()},l.strength=function(e){return arguments.length?(c="function"==typeof e?e:TU(+e),u(),l):c},l.radius=function(t){return arguments.length?(e="function"==typeof t?t:TU(+t),u(),l):e},l.x=function(e){return arguments.length?(t=+e,l):t},l.y=function(e){return arguments.length?(n=+e,l):n},l.z=function(e){return arguments.length?(r=+e,l):r},l}(function(t){var n=I[t[e.nodeId]]||-1;return("radialin"===e.dagMode?O-n:n)*N}).strength(function(t){return e.dagNodeFilter(t)?1:0}):null)}else{var F=iB.graph();e.graphData.nodes.forEach(function(t){F.addNode(t[e.nodeId])}),e.graphData.links.forEach(function(e){F.addLink(e.source,e.target)}),(k=iB.forcelayout(F,Lj({dimensions:e.numDimensions},e.ngraphPhysics))).graph=F}for(var U=0;U0&&e.d3ForceLayout.alpha()2&&void 0!==arguments[2]&&arguments[2],n=function(n){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jj(e,t)}(s,n);var r,i,a,o=(i=s,a=Bj(),function(){var e,t=Uj(i);if(a){var n=Uj(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return $j(e)}(this,e)});function s(){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var r=arguments.length,i=new Array(r),a=0;a1&&void 0!==arguments[1]?arguments[1]:Object);return Object.keys(e()).forEach(function(e){return n.prototype[e]=function(){var t,n=(t=this.__kapsuleInstance)[e].apply(t,arguments);return n===this.__kapsuleInstance?this:n}}),n}(sB,(window.THREE?window.THREE:{Group:JD}).Group,!0);const lB={type:"change"},uB={type:"start"},fB={type:"end"};class hB extends wO{constructor(e,t){super();const n=this,r=-1;this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.screen={left:0,top:0,width:0,height:0},this.rotateSpeed=1,this.zoomSpeed=1.2,this.panSpeed=.3,this.noRotate=!1,this.noZoom=!1,this.noPan=!1,this.staticMoving=!1,this.dynamicDampingFactor=.2,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.keys=["KeyA","KeyS","KeyD"],this.mouseButtons={LEFT:QM.ROTATE,MIDDLE:QM.DOLLY,RIGHT:QM.PAN},this.target=new oN;const i=1e-6,a=new oN;let o=1,s=r,c=r,l=0,u=0,f=0;const h=new oN,d=new NO,p=new NO,g=new oN,b=new NO,m=new NO,w=new NO,v=new NO,y=[],E={};this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.up0=this.object.up.clone(),this.zoom0=this.object.zoom,this.handleResize=function(){const e=n.domElement.getBoundingClientRect(),t=n.domElement.ownerDocument.documentElement;n.screen.left=e.left+window.pageXOffset-t.clientLeft,n.screen.top=e.top+window.pageYOffset-t.clientTop,n.screen.width=e.width,n.screen.height=e.height};const _=function(){const e=new NO;return function(t,r){return e.set((t-n.screen.left)/n.screen.width,(r-n.screen.top)/n.screen.height),e}}(),S=function(){const e=new NO;return function(t,r){return e.set((t-.5*n.screen.width-n.screen.left)/(.5*n.screen.width),(n.screen.height+2*(n.screen.top-r))/n.screen.width),e}}();function x(e){!1!==n.enabled&&(0===y.length&&(n.domElement.setPointerCapture(e.pointerId),n.domElement.addEventListener("pointermove",T),n.domElement.addEventListener("pointerup",A)),function(e){y.push(e)}(e),"touch"===e.pointerType?function(e){if(1===(R(e),y.length))s=3,p.copy(S(y[0].pageX,y[0].pageY)),d.copy(p);else{s=4;const e=y[0].pageX-y[1].pageX,t=y[0].pageY-y[1].pageY;u=l=Math.sqrt(e*e+t*t);const n=(y[0].pageX+y[1].pageX)/2,r=(y[0].pageY+y[1].pageY)/2;w.copy(_(n,r)),v.copy(w)}n.dispatchEvent(uB)}(e):function(e){if(s===r)switch(e.button){case n.mouseButtons.LEFT:s=0;break;case n.mouseButtons.MIDDLE:s=1;break;case n.mouseButtons.RIGHT:s=2}const t=c!==r?c:s;0!==t||n.noRotate?1!==t||n.noZoom?2!==t||n.noPan||(w.copy(_(e.pageX,e.pageY)),v.copy(w)):(b.copy(_(e.pageX,e.pageY)),m.copy(b)):(p.copy(S(e.pageX,e.pageY)),d.copy(p)),n.dispatchEvent(uB)}(e))}function T(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){if(1===(R(e),y.length))d.copy(p),p.copy(S(e.pageX,e.pageY));else{const t=function(e){const t=e.pointerId===y[0].pointerId?y[1]:y[0];return E[t.pointerId]}(e),n=e.pageX-t.x,r=e.pageY-t.y;u=Math.sqrt(n*n+r*r);const i=(e.pageX+t.x)/2,a=(e.pageY+t.y)/2;v.copy(_(i,a))}}(e):function(e){const t=c!==r?c:s;0!==t||n.noRotate?1!==t||n.noZoom?2!==t||n.noPan||v.copy(_(e.pageX,e.pageY)):m.copy(_(e.pageX,e.pageY)):(d.copy(p),p.copy(S(e.pageX,e.pageY)))}(e))}function A(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(y.length){case 0:s=r;break;case 1:s=3,p.copy(S(e.pageX,e.pageY)),d.copy(p);break;case 2:s=4;for(let t=0;t0&&(n.object.isPerspectiveCamera?h.multiplyScalar(e):n.object.isOrthographicCamera?(n.object.zoom=OO.clamp(n.object.zoom/e,n.minZoom,n.maxZoom),o!==n.object.zoom&&n.object.updateProjectionMatrix()):console.warn("THREE.TrackballControls: Unsupported camera type")),n.staticMoving?b.copy(m):b.y+=(m.y-b.y)*this.dynamicDampingFactor)},this.panCamera=function(){const e=new NO,t=new oN,r=new oN;return function(){if(e.copy(v).sub(w),e.lengthSq()){if(n.object.isOrthographicCamera){const t=(n.object.right-n.object.left)/n.object.zoom/n.domElement.clientWidth,r=(n.object.top-n.object.bottom)/n.object.zoom/n.domElement.clientWidth;e.x*=t,e.y*=r}e.multiplyScalar(h.length()*n.panSpeed),r.copy(h).cross(n.object.up).setLength(e.x),r.add(t.copy(n.object.up).setLength(e.y)),n.object.position.add(r),n.target.add(r),n.staticMoving?w.copy(v):w.add(e.subVectors(v,w).multiplyScalar(n.dynamicDampingFactor))}}}(),this.checkDistances=function(){n.noZoom&&n.noPan||(h.lengthSq()>n.maxDistance*n.maxDistance&&(n.object.position.addVectors(n.target,h.setLength(n.maxDistance)),b.copy(m)),h.lengthSq()i&&(n.dispatchEvent(lB),a.copy(n.object.position))):n.object.isOrthographicCamera?(n.object.lookAt(n.target),(a.distanceToSquared(n.object.position)>i||o!==n.object.zoom)&&(n.dispatchEvent(lB),a.copy(n.object.position),o=n.object.zoom)):console.warn("THREE.TrackballControls: Unsupported camera type")},this.reset=function(){s=r,c=r,n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.up.copy(n.up0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),h.subVectors(n.object.position,n.target),n.object.lookAt(n.target),n.dispatchEvent(lB),a.copy(n.object.position),o=n.object.zoom},this.dispose=function(){n.domElement.removeEventListener("contextmenu",O),n.domElement.removeEventListener("pointerdown",x),n.domElement.removeEventListener("pointercancel",k),n.domElement.removeEventListener("wheel",I),n.domElement.removeEventListener("pointermove",T),n.domElement.removeEventListener("pointerup",A),window.removeEventListener("keydown",C),window.removeEventListener("keyup",M)},this.domElement.addEventListener("contextmenu",O),this.domElement.addEventListener("pointerdown",x),this.domElement.addEventListener("pointercancel",k),this.domElement.addEventListener("wheel",I,{passive:!1}),window.addEventListener("keydown",C),window.addEventListener("keyup",M),this.handleResize(),this.update()}}const dB={type:"change"},pB={type:"start"},gB={type:"end"},bB=new LN,mB=new SP,wB=Math.cos(70*OO.DEG2RAD);class vB extends wO{constructor(e,t){super(),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new oN,this.cursor=new oN,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:QM.ROTATE,MIDDLE:QM.DOLLY,RIGHT:QM.PAN},this.touches={ONE:0,TWO:2},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return o.phi},this.getAzimuthalAngle=function(){return o.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(e){e.addEventListener("keydown",W),this._domElementKeyEvents=e},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",W),this._domElementKeyEvents=null},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(dB),n.update(),i=r.NONE},this.update=function(){const t=new oN,u=(new aN).setFromUnitVectors(e.up,new oN(0,1,0)),f=u.clone().invert(),h=new oN,d=new aN,p=new oN,g=2*Math.PI;return function(b=null){const m=n.object.position;t.copy(m).sub(n.target),t.applyQuaternion(u),o.setFromVector3(t),n.autoRotate&&i===r.NONE&&T(function(e){return null!==e?2*Math.PI/60*n.autoRotateSpeed*e:2*Math.PI/60/60*n.autoRotateSpeed}(b)),n.enableDamping?(o.theta+=s.theta*n.dampingFactor,o.phi+=s.phi*n.dampingFactor):(o.theta+=s.theta,o.phi+=s.phi);let w=n.minAzimuthAngle,_=n.maxAzimuthAngle;isFinite(w)&&isFinite(_)&&(w<-Math.PI?w+=g:w>Math.PI&&(w-=g),_<-Math.PI?_+=g:_>Math.PI&&(_-=g),o.theta=w<=_?Math.max(w,Math.min(_,o.theta)):o.theta>(w+_)/2?Math.max(w,o.theta):Math.min(_,o.theta)),o.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,o.phi)),o.makeSafe(),!0===n.enableDamping?n.target.addScaledVector(l,n.dampingFactor):n.target.add(l),n.target.sub(n.cursor),n.target.clampLength(n.minTargetRadius,n.maxTargetRadius),n.target.add(n.cursor),n.zoomToCursor&&E||n.object.isOrthographicCamera?o.radius=R(o.radius):o.radius=R(o.radius*c),t.setFromSpherical(o),t.applyQuaternion(f),m.copy(n.target).add(t),n.object.lookAt(n.target),!0===n.enableDamping?(s.theta*=1-n.dampingFactor,s.phi*=1-n.dampingFactor,l.multiplyScalar(1-n.dampingFactor)):(s.set(0,0,0),l.set(0,0,0));let S=!1;if(n.zoomToCursor&&E){let r=null;if(n.object.isPerspectiveCamera){const e=t.length();r=R(e*c);const i=e-r;n.object.position.addScaledVector(v,i),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){const e=new oN(y.x,y.y,0);e.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/c)),n.object.updateProjectionMatrix(),S=!0;const i=new oN(y.x,y.y,0);i.unproject(n.object),n.object.position.sub(i).add(e),n.object.updateMatrixWorld(),r=t.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;null!==r&&(this.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(r).add(n.object.position):(bB.origin.copy(n.object.position),bB.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(bB.direction))a||8*(1-d.dot(n.object.quaternion))>a||p.distanceToSquared(n.target)>0)&&(n.dispatchEvent(dB),h.copy(n.object.position),d.copy(n.object.quaternion),p.copy(n.target),S=!1,!0)}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",q),n.domElement.removeEventListener("pointerdown",$),n.domElement.removeEventListener("pointercancel",G),n.domElement.removeEventListener("wheel",V),n.domElement.removeEventListener("pointermove",H),n.domElement.removeEventListener("pointerup",G),null!==n._domElementKeyEvents&&(n._domElementKeyEvents.removeEventListener("keydown",W),n._domElementKeyEvents=null)};const n=this,r={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let i=r.NONE;const a=1e-6,o=new lU,s=new lU;let c=1;const l=new oN,u=new NO,f=new NO,h=new NO,d=new NO,p=new NO,g=new NO,b=new NO,m=new NO,w=new NO,v=new oN,y=new NO;let E=!1;const _=[],S={};function x(){return Math.pow(.95,n.zoomSpeed)}function T(e){s.theta-=e}function A(e){s.phi-=e}const k=function(){const e=new oN;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),l.add(e)}}(),C=function(){const e=new oN;return function(t,r){!0===n.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),l.add(e)}}(),M=function(){const e=new oN;return function(t,r){const i=n.domElement;if(n.object.isPerspectiveCamera){const a=n.object.position;e.copy(a).sub(n.target);let o=e.length();o*=Math.tan(n.object.fov/2*Math.PI/180),k(2*t*o/i.clientHeight,n.object.matrix),C(2*r*o/i.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(k(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),C(r*(n.object.top-n.object.bottom)/n.object.zoom/i.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function I(e){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?c/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function O(e){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?c*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function N(e){if(!n.zoomToCursor)return;E=!0;const t=n.domElement.getBoundingClientRect(),r=e.clientX-t.left,i=e.clientY-t.top,a=t.width,o=t.height;y.x=r/a*2-1,y.y=-i/o*2+1,v.set(y.x,y.y,1).unproject(n.object).sub(n.object.position).normalize()}function R(e){return Math.max(n.minDistance,Math.min(n.maxDistance,e))}function P(e){u.set(e.clientX,e.clientY)}function L(e){d.set(e.clientX,e.clientY)}function D(){if(1===_.length)u.set(_[0].pageX,_[0].pageY);else{const e=.5*(_[0].pageX+_[1].pageX),t=.5*(_[0].pageY+_[1].pageY);u.set(e,t)}}function F(){if(1===_.length)d.set(_[0].pageX,_[0].pageY);else{const e=.5*(_[0].pageX+_[1].pageX),t=.5*(_[0].pageY+_[1].pageY);d.set(e,t)}}function U(){const e=_[0].pageX-_[1].pageX,t=_[0].pageY-_[1].pageY,n=Math.sqrt(e*e+t*t);b.set(0,n)}function j(e){if(1==_.length)f.set(e.pageX,e.pageY);else{const t=Y(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);f.set(n,r)}h.subVectors(f,u).multiplyScalar(n.rotateSpeed);const t=n.domElement;T(2*Math.PI*h.x/t.clientHeight),A(2*Math.PI*h.y/t.clientHeight),u.copy(f)}function B(e){if(1===_.length)p.set(e.pageX,e.pageY);else{const t=Y(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);p.set(n,r)}g.subVectors(p,d).multiplyScalar(n.panSpeed),M(g.x,g.y),d.copy(p)}function z(e){const t=Y(e),r=e.pageX-t.x,i=e.pageY-t.y,a=Math.sqrt(r*r+i*i);m.set(0,a),w.set(0,Math.pow(m.y/b.y,n.zoomSpeed)),I(w.y),b.copy(m)}function $(e){!1!==n.enabled&&(0===_.length&&(n.domElement.setPointerCapture(e.pointerId),n.domElement.addEventListener("pointermove",H),n.domElement.addEventListener("pointerup",G)),function(e){_.push(e)}(e),"touch"===e.pointerType?function(e){switch(X(e),_.length){case 1:switch(n.touches.ONE){case 0:if(!1===n.enableRotate)return;D(),i=r.TOUCH_ROTATE;break;case 1:if(!1===n.enablePan)return;F(),i=r.TOUCH_PAN;break;default:i=r.NONE}break;case 2:switch(n.touches.TWO){case 2:if(!1===n.enableZoom&&!1===n.enablePan)return;n.enableZoom&&U(),n.enablePan&&F(),i=r.TOUCH_DOLLY_PAN;break;case 3:if(!1===n.enableZoom&&!1===n.enableRotate)return;n.enableZoom&&U(),n.enableRotate&&D(),i=r.TOUCH_DOLLY_ROTATE;break;default:i=r.NONE}break;default:i=r.NONE}i!==r.NONE&&n.dispatchEvent(pB)}(e):function(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case QM.DOLLY:if(!1===n.enableZoom)return;!function(e){N(e),b.set(e.clientX,e.clientY)}(e),i=r.DOLLY;break;case QM.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enablePan)return;L(e),i=r.PAN}else{if(!1===n.enableRotate)return;P(e),i=r.ROTATE}break;case QM.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enableRotate)return;P(e),i=r.ROTATE}else{if(!1===n.enablePan)return;L(e),i=r.PAN}break;default:i=r.NONE}i!==r.NONE&&n.dispatchEvent(pB)}(e))}function H(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(X(e),i){case r.TOUCH_ROTATE:if(!1===n.enableRotate)return;j(e),n.update();break;case r.TOUCH_PAN:if(!1===n.enablePan)return;B(e),n.update();break;case r.TOUCH_DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;!function(e){n.enableZoom&&z(e),n.enablePan&&B(e)}(e),n.update();break;case r.TOUCH_DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;!function(e){n.enableZoom&&z(e),n.enableRotate&&j(e)}(e),n.update();break;default:i=r.NONE}}(e):function(e){switch(i){case r.ROTATE:if(!1===n.enableRotate)return;!function(e){f.set(e.clientX,e.clientY),h.subVectors(f,u).multiplyScalar(n.rotateSpeed);const t=n.domElement;T(2*Math.PI*h.x/t.clientHeight),A(2*Math.PI*h.y/t.clientHeight),u.copy(f),n.update()}(e);break;case r.DOLLY:if(!1===n.enableZoom)return;!function(e){m.set(e.clientX,e.clientY),w.subVectors(m,b),w.y>0?I(x()):w.y<0&&O(x()),b.copy(m),n.update()}(e);break;case r.PAN:if(!1===n.enablePan)return;!function(e){p.set(e.clientX,e.clientY),g.subVectors(p,d).multiplyScalar(n.panSpeed),M(g.x,g.y),d.copy(p),n.update()}(e)}}(e))}function G(e){!function(e){delete S[e.pointerId];for(let t=0;t<_.length;t++)if(_[t].pointerId==e.pointerId)return void _.splice(t,1)}(e),0===_.length&&(n.domElement.releasePointerCapture(e.pointerId),n.domElement.removeEventListener("pointermove",H),n.domElement.removeEventListener("pointerup",G)),n.dispatchEvent(gB),i=r.NONE}function V(e){!1!==n.enabled&&!1!==n.enableZoom&&i===r.NONE&&(e.preventDefault(),n.dispatchEvent(pB),function(e){N(e),e.deltaY<0?O(x()):e.deltaY>0&&I(x()),n.update()}(e),n.dispatchEvent(gB))}function W(e){!1!==n.enabled&&!1!==n.enablePan&&function(e){let t=!1;switch(e.code){case n.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?A(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):M(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?A(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):M(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?T(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):M(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?T(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):M(-n.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),n.update())}(e)}function q(e){!1!==n.enabled&&e.preventDefault()}function X(e){let t=S[e.pointerId];void 0===t&&(t=new NO,S[e.pointerId]=t),t.set(e.pageX,e.pageY)}function Y(e){const t=e.pointerId===_[0].pointerId?_[1]:_[0];return S[t.pointerId]}n.domElement.addEventListener("contextmenu",q),n.domElement.addEventListener("pointerdown",$),n.domElement.addEventListener("pointercancel",G),n.domElement.addEventListener("wheel",V,{passive:!1}),this.update()}}const yB={type:"change"};class EB extends wO{constructor(e,t){super(),this.object=e,this.domElement=t,this.enabled=!0,this.movementSpeed=1,this.rollSpeed=.005,this.dragToLook=!1,this.autoForward=!1;const n=this,r=1e-6,i=new aN,a=new oN;this.tmpQuaternion=new aN,this.status=0,this.moveState={up:0,down:0,left:0,right:0,forward:0,back:0,pitchUp:0,pitchDown:0,yawLeft:0,yawRight:0,rollLeft:0,rollRight:0},this.moveVector=new oN(0,0,0),this.rotationVector=new oN(0,0,0),this.keydown=function(e){if(!e.altKey&&!1!==this.enabled){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=.1;break;case"KeyW":this.moveState.forward=1;break;case"KeyS":this.moveState.back=1;break;case"KeyA":this.moveState.left=1;break;case"KeyD":this.moveState.right=1;break;case"KeyR":this.moveState.up=1;break;case"KeyF":this.moveState.down=1;break;case"ArrowUp":this.moveState.pitchUp=1;break;case"ArrowDown":this.moveState.pitchDown=1;break;case"ArrowLeft":this.moveState.yawLeft=1;break;case"ArrowRight":this.moveState.yawRight=1;break;case"KeyQ":this.moveState.rollLeft=1;break;case"KeyE":this.moveState.rollRight=1}this.updateMovementVector(),this.updateRotationVector()}},this.keyup=function(e){if(!1!==this.enabled){switch(e.code){case"ShiftLeft":case"ShiftRight":this.movementSpeedMultiplier=1;break;case"KeyW":this.moveState.forward=0;break;case"KeyS":this.moveState.back=0;break;case"KeyA":this.moveState.left=0;break;case"KeyD":this.moveState.right=0;break;case"KeyR":this.moveState.up=0;break;case"KeyF":this.moveState.down=0;break;case"ArrowUp":this.moveState.pitchUp=0;break;case"ArrowDown":this.moveState.pitchDown=0;break;case"ArrowLeft":this.moveState.yawLeft=0;break;case"ArrowRight":this.moveState.yawRight=0;break;case"KeyQ":this.moveState.rollLeft=0;break;case"KeyE":this.moveState.rollRight=0}this.updateMovementVector(),this.updateRotationVector()}},this.pointerdown=function(e){if(!1!==this.enabled)if(this.dragToLook)this.status++;else{switch(e.button){case 0:this.moveState.forward=1;break;case 2:this.moveState.back=1}this.updateMovementVector()}},this.pointermove=function(e){if(!1!==this.enabled&&(!this.dragToLook||this.status>0)){const t=this.getContainerDimensions(),n=t.size[0]/2,r=t.size[1]/2;this.moveState.yawLeft=-(e.pageX-t.offset[0]-n)/n,this.moveState.pitchDown=(e.pageY-t.offset[1]-r)/r,this.updateRotationVector()}},this.pointerup=function(e){if(!1!==this.enabled){if(this.dragToLook)this.status--,this.moveState.yawLeft=this.moveState.pitchDown=0;else{switch(e.button){case 0:this.moveState.forward=0;break;case 2:this.moveState.back=0}this.updateMovementVector()}this.updateRotationVector()}},this.pointercancel=function(){!1!==this.enabled&&(this.dragToLook?(this.status=0,this.moveState.yawLeft=this.moveState.pitchDown=0):(this.moveState.forward=0,this.moveState.back=0,this.updateMovementVector()),this.updateRotationVector())},this.contextMenu=function(e){!1!==this.enabled&&e.preventDefault()},this.update=function(e){if(!1===this.enabled)return;const t=e*n.movementSpeed,o=e*n.rollSpeed;n.object.translateX(n.moveVector.x*t),n.object.translateY(n.moveVector.y*t),n.object.translateZ(n.moveVector.z*t),n.tmpQuaternion.set(n.rotationVector.x*o,n.rotationVector.y*o,n.rotationVector.z*o,1).normalize(),n.object.quaternion.multiply(n.tmpQuaternion),(a.distanceToSquared(n.object.position)>r||8*(1-i.dot(n.object.quaternion))>r)&&(n.dispatchEvent(yB),i.copy(n.object.quaternion),a.copy(n.object.position))},this.updateMovementVector=function(){const e=this.moveState.forward||this.autoForward&&!this.moveState.back?1:0;this.moveVector.x=-this.moveState.left+this.moveState.right,this.moveVector.y=-this.moveState.down+this.moveState.up,this.moveVector.z=-e+this.moveState.back},this.updateRotationVector=function(){this.rotationVector.x=-this.moveState.pitchDown+this.moveState.pitchUp,this.rotationVector.y=-this.moveState.yawRight+this.moveState.yawLeft,this.rotationVector.z=-this.moveState.rollRight+this.moveState.rollLeft},this.getContainerDimensions=function(){return this.domElement!=document?{size:[this.domElement.offsetWidth,this.domElement.offsetHeight],offset:[this.domElement.offsetLeft,this.domElement.offsetTop]}:{size:[window.innerWidth,window.innerHeight],offset:[0,0]}},this.dispose=function(){this.domElement.removeEventListener("contextmenu",o),this.domElement.removeEventListener("pointerdown",c),this.domElement.removeEventListener("pointermove",s),this.domElement.removeEventListener("pointerup",l),this.domElement.removeEventListener("pointercancel",u),window.removeEventListener("keydown",f),window.removeEventListener("keyup",h)};const o=this.contextMenu.bind(this),s=this.pointermove.bind(this),c=this.pointerdown.bind(this),l=this.pointerup.bind(this),u=this.pointercancel.bind(this),f=this.keydown.bind(this),h=this.keyup.bind(this);this.domElement.addEventListener("contextmenu",o),this.domElement.addEventListener("pointerdown",c),this.domElement.addEventListener("pointermove",s),this.domElement.addEventListener("pointerup",l),this.domElement.addEventListener("pointercancel",u),window.addEventListener("keydown",f),window.addEventListener("keyup",h),this.updateMovementVector(),this.updateRotationVector()}}const _B={name:"CopyShader",uniforms:{tDiffuse:{value:null},opacity:{value:1}},vertexShader:"\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}",fragmentShader:"\n\n\t\tuniform float opacity;\n\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\t\tgl_FragColor = opacity * texel;\n\n\n\t\t}"};class SB{constructor(){this.isPass=!0,this.enabled=!0,this.needsSwap=!0,this.clear=!1,this.renderToScreen=!1}setSize(){}render(){console.error("THREE.Pass: .render() must be implemented in derived pass.")}dispose(){}}const xB=new BP(-1,1,1,-1,0,1),TB=new class extends $R{constructor(){super(),this.setAttribute("position",new PR([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new PR([0,2,0,0,2,0],2))}};class AB{constructor(e){this._mesh=new oP(TB,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,xB)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}class kB extends SB{constructor(e,t){super(),this.textureID=void 0!==t?t:"tDiffuse",e instanceof dP?(this.uniforms=e.uniforms,this.material=e):e&&(this.uniforms=hP.clone(e.uniforms),this.material=new dP({name:void 0!==e.name?e.name:"unspecified",defines:Object.assign({},e.defines),uniforms:this.uniforms,vertexShader:e.vertexShader,fragmentShader:e.fragmentShader})),this.fsQuad=new AB(this.material)}render(e,t,n){this.uniforms[this.textureID]&&(this.uniforms[this.textureID].value=n.texture),this.fsQuad.material=this.material,this.renderToScreen?(e.setRenderTarget(null),this.fsQuad.render(e)):(e.setRenderTarget(t),this.clear&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),this.fsQuad.render(e))}dispose(){this.material.dispose(),this.fsQuad.dispose()}}class CB extends SB{constructor(e,t){super(),this.scene=e,this.camera=t,this.clear=!0,this.needsSwap=!1,this.inverse=!1}render(e,t,n){const r=e.getContext(),i=e.state;let a,o;i.buffers.color.setMask(!1),i.buffers.depth.setMask(!1),i.buffers.color.setLocked(!0),i.buffers.depth.setLocked(!0),this.inverse?(a=0,o=1):(a=1,o=0),i.buffers.stencil.setTest(!0),i.buffers.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),i.buffers.stencil.setFunc(r.ALWAYS,a,4294967295),i.buffers.stencil.setClear(o),i.buffers.stencil.setLocked(!0),e.setRenderTarget(n),this.clear&&e.clear(),e.render(this.scene,this.camera),e.setRenderTarget(t),this.clear&&e.clear(),e.render(this.scene,this.camera),i.buffers.color.setLocked(!1),i.buffers.depth.setLocked(!1),i.buffers.color.setMask(!0),i.buffers.depth.setMask(!0),i.buffers.stencil.setLocked(!1),i.buffers.stencil.setFunc(r.EQUAL,1,4294967295),i.buffers.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),i.buffers.stencil.setLocked(!0)}}class MB extends SB{constructor(){super(),this.needsSwap=!1}render(e){e.state.buffers.stencil.setLocked(!1),e.state.buffers.stencil.setTest(!1)}}class IB{constructor(e,t){if(this.renderer=e,this._pixelRatio=e.getPixelRatio(),void 0===t){const n=e.getSize(new NO);this._width=n.width,this._height=n.height,(t=new nN(this._width*this._pixelRatio,this._height*this._pixelRatio,{type:DI})).texture.name="EffectComposer.rt1"}else this._width=t.width,this._height=t.height;this.renderTarget1=t,this.renderTarget2=t.clone(),this.renderTarget2.texture.name="EffectComposer.rt2",this.writeBuffer=this.renderTarget1,this.readBuffer=this.renderTarget2,this.renderToScreen=!0,this.passes=[],this.copyPass=new kB(_B),this.copyPass.material.blending=0,this.clock=new ZF}swapBuffers(){const e=this.readBuffer;this.readBuffer=this.writeBuffer,this.writeBuffer=e}addPass(e){this.passes.push(e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}insertPass(e,t){this.passes.splice(t,0,e),e.setSize(this._width*this._pixelRatio,this._height*this._pixelRatio)}removePass(e){const t=this.passes.indexOf(e);-1!==t&&this.passes.splice(t,1)}isLastEnabledPass(e){for(let t=e+1;t=0&&i<1?(s=a,c=o):i>=1&&i<2?(s=o,c=a):i>=2&&i<3?(c=a,l=o):i>=3&&i<4?(c=o,l=a):i>=4&&i<5?(s=o,l=a):i>=5&&i<6&&(s=a,l=o);var u=n-a/2;return r(s+u,c+u,l+u)}var BB={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},zB=/^#[a-fA-F0-9]{6}$/,$B=/^#[a-fA-F0-9]{8}$/,HB=/^#[a-fA-F0-9]{3}$/,GB=/^#[a-fA-F0-9]{4}$/,VB=/^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,WB=/^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i,qB=/^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,XB=/^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;function YB(e){if("string"!=typeof e)throw new DB(3);var t=function(e){if("string"!=typeof e)return e;var t=e.toLowerCase();return BB[t]?"#"+BB[t]:e}(e);if(t.match(zB))return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16)};if(t.match($B)){var n=parseFloat((parseInt(""+t[7]+t[8],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[2],16),green:parseInt(""+t[3]+t[4],16),blue:parseInt(""+t[5]+t[6],16),alpha:n}}if(t.match(HB))return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16)};if(t.match(GB)){var r=parseFloat((parseInt(""+t[4]+t[4],16)/255).toFixed(2));return{red:parseInt(""+t[1]+t[1],16),green:parseInt(""+t[2]+t[2],16),blue:parseInt(""+t[3]+t[3],16),alpha:r}}var i=VB.exec(t);if(i)return{red:parseInt(""+i[1],10),green:parseInt(""+i[2],10),blue:parseInt(""+i[3],10)};var a=WB.exec(t.substring(0,50));if(a)return{red:parseInt(""+a[1],10),green:parseInt(""+a[2],10),blue:parseInt(""+a[3],10),alpha:parseFloat(""+a[4])>1?parseFloat(""+a[4])/100:parseFloat(""+a[4])};var o=qB.exec(t);if(o){var s="rgb("+jB(parseInt(""+o[1],10),parseInt(""+o[2],10)/100,parseInt(""+o[3],10)/100)+")",c=VB.exec(s);if(!c)throw new DB(4,t,s);return{red:parseInt(""+c[1],10),green:parseInt(""+c[2],10),blue:parseInt(""+c[3],10)}}var l=XB.exec(t.substring(0,50));if(l){var u="rgb("+jB(parseInt(""+l[1],10),parseInt(""+l[2],10)/100,parseInt(""+l[3],10)/100)+")",f=VB.exec(u);if(!f)throw new DB(4,t,u);return{red:parseInt(""+f[1],10),green:parseInt(""+f[2],10),blue:parseInt(""+f[3],10),alpha:parseFloat(""+l[4])>1?parseFloat(""+l[4])/100:parseFloat(""+l[4])}}throw new DB(5)}var KB=function(e){return 7===e.length&&e[1]===e[2]&&e[3]===e[4]&&e[5]===e[6]?"#"+e[1]+e[3]+e[5]:e};function ZB(e){var t=e.toString(16);return 1===t.length?"0"+t:t}function QB(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return KB("#"+ZB(e)+ZB(t)+ZB(n));if("object"==typeof e&&void 0===t&&void 0===n)return KB("#"+ZB(e.red)+ZB(e.green)+ZB(e.blue));throw new DB(6)}function JB(e,t,n){return function(){var r=n.concat(Array.prototype.slice.call(arguments));return r.length>=t?e.apply(this,r):JB(e,t,r)}}function ez(e){return JB(e,e.length,[])}function tz(e,t,n){return Math.max(e,Math.min(t,n))}function nz(e,t){if("transparent"===t)return t;var n=YB(t),r="number"==typeof n.alpha?n.alpha:1;return function(e,t,n,r){if("string"==typeof e&&"number"==typeof t){var i=YB(e);return"rgba("+i.red+","+i.green+","+i.blue+","+t+")"}if("number"==typeof e&&"number"==typeof t&&"number"==typeof n&&"number"==typeof r)return r>=1?QB(e,t,n):"rgba("+e+","+t+","+n+","+r+")";if("object"==typeof e&&void 0===t&&void 0===n&&void 0===r)return e.alpha>=1?QB(e.red,e.green,e.blue):"rgba("+e.red+","+e.green+","+e.blue+","+e.alpha+")";throw new DB(7)}((0,we.A)({},n,{alpha:tz(0,1,(100*r+100*parseFloat(e))/100)}))}var rz=ez(nz),iz={Linear:{None:function(e){return e}},Quadratic:{In:function(e){return e*e},Out:function(e){return e*(2-e)},InOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)}},Cubic:{In:function(e){return e*e*e},Out:function(e){return--e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)}},Quartic:{In:function(e){return e*e*e*e},Out:function(e){return 1- --e*e*e*e},InOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)}},Quintic:{In:function(e){return e*e*e*e*e},Out:function(e){return--e*e*e*e*e+1},InOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)}},Sinusoidal:{In:function(e){return 1-Math.cos(e*Math.PI/2)},Out:function(e){return Math.sin(e*Math.PI/2)},InOut:function(e){return.5*(1-Math.cos(Math.PI*e))}},Exponential:{In:function(e){return 0===e?0:Math.pow(1024,e-1)},Out:function(e){return 1===e?1:1-Math.pow(2,-10*e)},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))}},Circular:{In:function(e){return 1-Math.sqrt(1-e*e)},Out:function(e){return Math.sqrt(1- --e*e)},InOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)}},Elastic:{In:function(e){return 0===e?0:1===e?1:-Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)},Out:function(e){return 0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin(5*(e-.1)*Math.PI)+1},InOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?-.5*Math.pow(2,10*(e-1))*Math.sin(5*(e-1.1)*Math.PI):.5*Math.pow(2,-10*(e-1))*Math.sin(5*(e-1.1)*Math.PI)+1}},Back:{In:function(e){var t=1.70158;return e*e*((t+1)*e-t)},Out:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},InOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)}},Bounce:{In:function(e){return 1-iz.Bounce.Out(1-e)},Out:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},InOut:function(e){return e<.5?.5*iz.Bounce.In(2*e):.5*iz.Bounce.Out(2*e-1)+.5}}},az="undefined"==typeof self&&"undefined"!=typeof process&&process.hrtime?function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},oz=function(){function e(){this._tweens={},this._tweensAddedDuringUpdate={}}return e.prototype.getAll=function(){var e=this;return Object.keys(this._tweens).map(function(t){return e._tweens[t]})},e.prototype.removeAll=function(){this._tweens={}},e.prototype.add=function(e){this._tweens[e.getId()]=e,this._tweensAddedDuringUpdate[e.getId()]=e},e.prototype.remove=function(e){delete this._tweens[e.getId()],delete this._tweensAddedDuringUpdate[e.getId()]},e.prototype.update=function(e,t){void 0===e&&(e=az()),void 0===t&&(t=!1);var n=Object.keys(this._tweens);if(0===n.length)return!1;for(;n.length>0;){this._tweensAddedDuringUpdate={};for(var r=0;r1?a(e[n],e[n-1],n-r):a(e[i],e[i+1>n?n:i+1],r-i)},Bezier:function(e,t){for(var n=0,r=e.length-1,i=Math.pow,a=sz.Utils.Bernstein,o=0;o<=r;o++)n+=i(1-t,r-o)*i(t,o)*e[o]*a(r,o);return n},CatmullRom:function(e,t){var n=e.length-1,r=n*t,i=Math.floor(r),a=sz.Utils.CatmullRom;return e[0]===e[n]?(t<0&&(i=Math.floor(r=n*(1+t))),a(e[(i-1+n)%n],e[i],e[(i+1)%n],e[(i+2)%n],r-i)):t<0?e[0]-(a(e[0],e[0],e[1],e[1],-r)-e[0]):t>1?e[n]-(a(e[n],e[n],e[n-1],e[n-1],r-n)-e[n]):a(e[i?i-1:0],e[i],e[n1;r--)n*=r;return e[t]=n,n}}(),CatmullRom:function(e,t,n,r,i){var a=.5*(n-e),o=.5*(r-t),s=i*i;return(2*t-2*n+a+o)*(i*s)+(-3*t+3*n-2*a-o)*s+a*i+t}}},cz=function(){function e(){}return e.nextId=function(){return e._nextId++},e._nextId=0,e}(),lz=new oz,uz=function(){function e(e,t){void 0===t&&(t=lz),this._object=e,this._group=t,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=iz.Linear.None,this._interpolationFunction=sz.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=cz.nextId(),this._isChainStopped=!1,this._goToEnd=!1}return e.prototype.getId=function(){return this._id},e.prototype.isPlaying=function(){return this._isPlaying},e.prototype.isPaused=function(){return this._isPaused},e.prototype.to=function(e,t){return this._valuesEnd=Object.create(e),void 0!==t&&(this._duration=t),this},e.prototype.duration=function(e){return this._duration=e,this},e.prototype.start=function(e){if(this._isPlaying)return this;if(this._group&&this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var t in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(t),this._valuesStart[t]=this._valuesStartRepeat[t];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==e?"string"==typeof e?az()+parseFloat(e):e:az(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},e.prototype._setupProperties=function(e,t,n,r){for(var i in n){var a=e[i],o=Array.isArray(a),s=o?"array":typeof a,c=!o&&Array.isArray(n[i]);if("undefined"!==s&&"function"!==s){if(c){var l=n[i];if(0===l.length)continue;l=l.map(this._handleRelativeValue.bind(this,a)),n[i]=[a].concat(l)}if("object"!==s&&!o||!a||c)void 0===t[i]&&(t[i]=a),o||(t[i]*=1),r[i]=c?n[i].slice().reverse():t[i]||0;else{for(var u in t[i]=o?[]:{},a)t[i][u]=a[u];r[i]=o?[]:{},this._setupProperties(a,t[i],n[i],r[i])}}}},e.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group&&this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},e.prototype.end=function(){return this._goToEnd=!0,this.update(1/0),this},e.prototype.pause=function(e){return void 0===e&&(e=az()),this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=e,this._group&&this._group.remove(this)),this},e.prototype.resume=function(e){return void 0===e&&(e=az()),this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=e-this._pauseStart,this._pauseStart=0,this._group&&this._group.add(this),this):this},e.prototype.stopChainedTweens=function(){for(var e=0,t=this._chainedTweens.length;ei)return!1;t&&this.start(e)}if(this._goToEnd=!1,e1?1:r;var a=this._easingFunction(r);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,a),this._onUpdateCallback&&this._onUpdateCallback(this._object,r),1===r){if(this._repeat>0){for(n in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[n]||(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=e+this._repeatDelayTime:this._startTime=e+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var o=0,s=this._chainedTweens.length;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t}},PerspectiveCamera:gP,Raycaster:oU,SRGBColorSpace:ZI,TextureLoader:class extends HF{constructor(e){super(e)}load(e,t,n,r){const i=new JO,a=new GF(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,function(e){i.image=e,i.needsUpdate=!0,void 0!==t&&t(i)},n,r),i}},Vector2:NO,Vector3:oN,Box3:lN,Color:xR,Mesh:oP,SphereGeometry:CF,MeshBasicMaterial:CR,BackSide:1,EventDispatcher:wO,MOUSE:QM,Quaternion:aN,Spherical:lU,Clock:ZF},mz=hj({props:{width:{default:window.innerWidth,onChange:function(e,t,n){isNaN(e)&&(t.width=n)}},height:{default:window.innerHeight,onChange:function(e,t,n){isNaN(e)&&(t.height=n)}},backgroundColor:{default:"#000011"},backgroundImageUrl:{},onBackgroundImageLoaded:{},showNavInfo:{default:!0},skyRadius:{default:5e4},objects:{default:[]},lights:{default:[]},enablePointerInteraction:{default:!0,onChange:function(e,t){t.hoverObj=null,t.toolTipElem&&(t.toolTipElem.innerHTML="")},triggerUpdate:!1},lineHoverPrecision:{default:1,triggerUpdate:!1},hoverOrderComparator:{default:function(){return-1},triggerUpdate:!1},hoverFilter:{default:function(){return!0},triggerUpdate:!1},tooltipContent:{triggerUpdate:!1},hoverDuringDrag:{default:!1,triggerUpdate:!1},clickAfterDrag:{default:!1,triggerUpdate:!1},onHover:{default:function(){},triggerUpdate:!1},onClick:{default:function(){},triggerUpdate:!1},onRightClick:{triggerUpdate:!1}},methods:{tick:function(e){if(e.initialised){if(e.controls.update&&e.controls.update(e.clock.getDelta()),e.postProcessingComposer?e.postProcessingComposer.render():e.renderer.render(e.scene,e.camera),e.extraRenderers.forEach(function(t){return t.render(e.scene,e.camera)}),e.enablePointerInteraction){var t=null;if(e.hoverDuringDrag||!e.isPointerDragging){var n=this.intersectingObjects(e.pointerPos.x,e.pointerPos.y).filter(function(t){return e.hoverFilter(t.object)}).sort(function(t,n){return e.hoverOrderComparator(t.object,n.object)}),r=n.length?n[0]:null;t=r?r.object:null,e.intersectionPoint=r?r.point:null}t!==e.hoverObj&&(e.onHover(t,e.hoverObj),e.toolTipElem.innerHTML=t&&dj(e.tooltipContent)(t)||"",e.hoverObj=t)}hz()}return this},getPointerPos:function(e){var t=e.pointerPos;return{x:t.x,y:t.y}},cameraPosition:function(e,t,n,r){var i=e.camera;if(t&&e.initialised){var a=t,o=n||{x:0,y:0,z:0};if(r){var s=Object.assign({},i.position),c=f();new uz(s).to(a,r).easing(iz.Quadratic.Out).onUpdate(l).start(),new uz(c).to(o,r/3).easing(iz.Quadratic.Out).onUpdate(u).start()}else l(a),u(o);return this}return Object.assign({},i.position,{lookAt:f()});function l(e){var t=e.x,n=e.y,r=e.z;void 0!==t&&(i.position.x=t),void 0!==n&&(i.position.y=n),void 0!==r&&(i.position.z=r)}function u(t){var n=new bz.Vector3(t.x,t.y,t.z);e.controls.target?e.controls.target=n:i.lookAt(n)}function f(){return Object.assign(new bz.Vector3(0,0,-1e3).applyQuaternion(i.quaternion).add(i.position))}},zoomToFit:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length,i=new Array(r>3?r-3:0),a=3;a2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,i=e.camera;if(t){var a=new bz.Vector3(0,0,0),o=2*Math.max.apply(Math,dz(Object.entries(t).map(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||pz(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),n=t[0],r=t[1];return Math.max.apply(Math,dz(r.map(function(e){return Math.abs(a[n]-e)})))}))),s=(1-2*r/e.height)*i.fov,c=o/Math.atan(s*Math.PI/180),l=c/i.aspect,u=Math.max(c,l);if(u>0){var f=a.clone().sub(i.position).normalize().multiplyScalar(-u);this.cameraPosition(f,a,n)}}return this},getBbox:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=new bz.Box3(new bz.Vector3(0,0,0),new bz.Vector3(0,0,0)),r=e.objects.filter(t);return r.length?(r.forEach(function(e){return n.expandByObject(e)}),Object.assign.apply(Object,dz(["x","y","z"].map(function(e){return function(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},e,[n.min[e],n.max[e]])})))):null},getScreenCoords:function(e,t,n,r){var i=new bz.Vector3(t,n,r);return i.project(this.camera()),{x:(i.x+1)*e.width/2,y:-(i.y-1)*e.height/2}},getSceneCoords:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=new bz.Vector2(t/e.width*2-1,-n/e.height*2+1),a=new bz.Raycaster;return a.setFromCamera(i,e.camera),Object.assign({},a.ray.at(r,new bz.Vector3))},intersectingObjects:function(e,t,n){var r=new bz.Vector2(t/e.width*2-1,-n/e.height*2+1),i=new bz.Raycaster;return i.params.Line.threshold=e.lineHoverPrecision,i.setFromCamera(r,e.camera),i.intersectObjects(e.objects,!0)},renderer:function(e){return e.renderer},scene:function(e){return e.scene},camera:function(e){return e.camera},postProcessingComposer:function(e){return e.postProcessingComposer},controls:function(e){return e.controls},tbControls:function(e){return e.controls}},stateInit:function(){return{scene:new bz.Scene,camera:new bz.PerspectiveCamera,clock:new bz.Clock}},init:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.controlType,i=void 0===r?"trackball":r,a=n.rendererConfig,o=void 0===a?{}:a,s=n.extraRenderers,c=void 0===s?[]:s,l=n.waitForLoadComplete,u=void 0===l||l;e.innerHTML="",e.appendChild(t.container=document.createElement("div")),t.container.className="scene-container",t.container.style.position="relative",t.container.appendChild(t.navInfo=document.createElement("div")),t.navInfo.className="scene-nav-info",t.navInfo.textContent={orbit:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",trackball:"Left-click: rotate, Mouse-wheel/middle-click: zoom, Right-click: pan",fly:"WASD: move, R|F: up | down, Q|E: roll, up|down: pitch, left|right: yaw"}[i]||"",t.navInfo.style.display=t.showNavInfo?null:"none",t.toolTipElem=document.createElement("div"),t.toolTipElem.classList.add("scene-tooltip"),t.container.appendChild(t.toolTipElem),t.pointerPos=new bz.Vector2,t.pointerPos.x=-2,t.pointerPos.y=-2,["pointermove","pointerdown"].forEach(function(e){return t.container.addEventListener(e,function(n){if("pointerdown"===e&&(t.isPointerPressed=!0),!t.isPointerDragging&&"pointermove"===n.type&&(n.pressure>0||t.isPointerPressed)&&("touch"!==n.pointerType||void 0===n.movementX||[n.movementX,n.movementY].some(function(e){return Math.abs(e)>1}))&&(t.isPointerDragging=!0),t.enablePointerInteraction){var r=(i=t.container.getBoundingClientRect(),a=window.pageXOffset||document.documentElement.scrollLeft,o=window.pageYOffset||document.documentElement.scrollTop,{top:i.top+o,left:i.left+a});t.pointerPos.x=n.pageX-r.left,t.pointerPos.y=n.pageY-r.top,t.toolTipElem.style.top="".concat(t.pointerPos.y,"px"),t.toolTipElem.style.left="".concat(t.pointerPos.x,"px"),t.toolTipElem.style.transform="translate(-".concat(t.pointerPos.x/t.width*100,"%, ").concat(t.height-t.pointerPos.y<100?"calc(-100% - 8px)":"21px",")")}var i,a,o},{passive:!0})}),t.container.addEventListener("pointerup",function(e){t.isPointerPressed=!1,t.isPointerDragging&&(t.isPointerDragging=!1,!t.clickAfterDrag)||requestAnimationFrame(function(){0===e.button&&t.onClick(t.hoverObj||null,e,t.intersectionPoint),2===e.button&&t.onRightClick&&t.onRightClick(t.hoverObj||null,e,t.intersectionPoint)})},{passive:!0,capture:!0}),t.container.addEventListener("contextmenu",function(e){t.onRightClick&&e.preventDefault()}),t.renderer=new bz.WebGLRenderer(Object.assign({antialias:!0,alpha:!0},o)),t.renderer.setPixelRatio(Math.min(2,window.devicePixelRatio)),t.container.appendChild(t.renderer.domElement),t.extraRenderers=c,t.extraRenderers.forEach(function(e){e.domElement.style.position="absolute",e.domElement.style.top="0px",e.domElement.style.pointerEvents="none",t.container.appendChild(e.domElement)}),t.postProcessingComposer=new IB(t.renderer),t.postProcessingComposer.addPass(new OB(t.scene,t.camera)),t.controls=new{trackball:hB,orbit:vB,fly:EB}[i](t.camera,t.renderer.domElement),"fly"===i&&(t.controls.movementSpeed=300,t.controls.rollSpeed=Math.PI/6,t.controls.dragToLook=!0),"trackball"!==i&&"orbit"!==i||(t.controls.minDistance=.1,t.controls.maxDistance=t.skyRadius,t.controls.addEventListener("start",function(){t.controlsEngaged=!0}),t.controls.addEventListener("change",function(){t.controlsEngaged&&(t.controlsDragging=!0)}),t.controls.addEventListener("end",function(){t.controlsEngaged=!1,t.controlsDragging=!1})),[t.renderer,t.postProcessingComposer].concat(dz(t.extraRenderers)).forEach(function(e){return e.setSize(t.width,t.height)}),t.camera.aspect=t.width/t.height,t.camera.updateProjectionMatrix(),t.camera.position.z=1e3,t.scene.add(t.skysphere=new bz.Mesh),t.skysphere.visible=!1,t.loadComplete=t.scene.visible=!u,window.scene=t.scene},update:function(e,t){if(e.width&&e.height&&(t.hasOwnProperty("width")||t.hasOwnProperty("height"))&&(e.container.style.width="".concat(e.width,"px"),e.container.style.height="".concat(e.height,"px"),[e.renderer,e.postProcessingComposer].concat(dz(e.extraRenderers)).forEach(function(t){return t.setSize(e.width,e.height)}),e.camera.aspect=e.width/e.height,e.camera.updateProjectionMatrix()),t.hasOwnProperty("skyRadius")&&e.skyRadius&&(e.controls.hasOwnProperty("maxDistance")&&t.skyRadius&&(e.controls.maxDistance=Math.min(e.controls.maxDistance,e.skyRadius)),e.camera.far=2.5*e.skyRadius,e.camera.updateProjectionMatrix(),e.skysphere.geometry=new bz.SphereGeometry(e.skyRadius)),t.hasOwnProperty("backgroundColor")){var n=YB(e.backgroundColor).alpha;void 0===n&&(n=1),e.renderer.setClearColor(new bz.Color(rz(1,e.backgroundColor)),n)}function r(){e.loadComplete=e.scene.visible=!0}t.hasOwnProperty("backgroundImageUrl")&&(e.backgroundImageUrl?(new bz.TextureLoader).load(e.backgroundImageUrl,function(t){t.colorSpace=bz.SRGBColorSpace,e.skysphere.material=new bz.MeshBasicMaterial({map:t,side:bz.BackSide}),e.skysphere.visible=!0,e.onBackgroundImageLoaded&&setTimeout(e.onBackgroundImageLoaded),!e.loadComplete&&r()}):(e.skysphere.visible=!1,e.skysphere.material.map=null,!e.loadComplete&&r())),t.hasOwnProperty("showNavInfo")&&(e.navInfo.style.display=e.showNavInfo?null:"none"),t.hasOwnProperty("lights")&&((t.lights||[]).forEach(function(t){return e.scene.remove(t)}),e.lights.forEach(function(t){return e.scene.add(t)})),t.hasOwnProperty("objects")&&((t.objects||[]).forEach(function(t){return e.scene.remove(t)}),e.objects.forEach(function(t){return e.scene.add(t)}))}});function wz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vz(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?i-1:0),o=1;o3?i-3:0),o=3;o1?t-1:0),r=1;r0==e?"Direct":e<=2?"Strong":e>=7?"Weak":"Average",zz=e=>0===e?"darkgreen":e<=2?"#93C54B":e>=7?"Red":"Orange",$z=(t,n,r)=>{let i=n[r].start.id;return e.createElement("div",{key:t.end.id,style:{marginBottom:".25em",fontWeight:"bold"}},e.createElement("a",{href:Ym(t.end),target:"_blank",rel:"noopener noreferrer"},e.createElement(gx,{wide:"very",size:"large",style:{textAlign:"center"},hoverable:!0,position:"right center",trigger:e.createElement("span",null,Wm(t.end,!0)," ")},e.createElement(gx.Content,null,Wm(n[r].start,!0),t.path.map(t=>{const{text:n,nextID:r}=((t,n)=>{var r,i,a;let o=t.end,s=t.end.id,c=e.createElement(xg,{name:"arrow down"});return n!==t.start.id&&(o=t.start,s=t.start.id,c=e.createElement(xg,{name:"arrow up"})),{text:e.createElement(e.Fragment,null,e.createElement("br",null),c," ",e.createElement("span",{style:{textTransform:"capitalize"}},t.relationship.replace("_"," ").toLowerCase()," ",t.score>0&&e.createElement(e.Fragment,null," (+",t.score,")")),e.createElement("br",null)," ",Wm(o,!0)," ",null!==(r=o.section)&&void 0!==r?r:""," ",null!==(i=o.subsection)&&void 0!==i?i:""," ",null!==(a=o.description)&&void 0!==a?a:""),nextID:s}})(t,i);return i=r,n}))),e.createElement(gx,{wide:"very",size:"large",style:{textAlign:"center"},hoverable:!0,position:"right center",trigger:e.createElement("b",{style:{color:zz(t.score)}},"(",Bz(t.score),":",t.score,")")},e.createElement(gx.Content,null,e.createElement("b",null,"Generally: lower is better"),e.createElement("br",null),e.createElement("b",{style:{color:zz(0)}},Bz(0)),": Directly Linked",e.createElement("br",null),e.createElement("b",{style:{color:zz(2)}},Bz(2)),": Closely connected likely to have majority overlap",e.createElement("br",null),e.createElement("b",{style:{color:zz(6)}},Bz(6)),": Connected likely to have partial overlap",e.createElement("br",null),e.createElement("b",{style:{color:zz(7)}},Bz(7)),": Weakly connected likely to have small or no overlap"))))},Hz=()=>{var t,n;const r=[{key:"",text:"",value:void 0}],i=function(){const{search:t}=tt();return e.useMemo(()=>new URLSearchParams(t),[t])}(),[a,o]=(0,e.useState)(r),[s,c]=(0,e.useState)(null!==(t=i.get("base"))&&void 0!==t?t:""),[l,u]=(0,e.useState)(null!==(n=i.get("compare"))&&void 0!==n?n:""),[f,h]=(0,e.useState)(""),[d,p]=(0,e.useState)(),[g,b]=(0,e.useState)(!1),[m,w]=(0,e.useState)(!1),[v,y]=(0,e.useState)(null),{apiUrl:E}=jg(),_=(0,e.useRef)();(0,e.useEffect)(()=>{b(!0),jz(void 0,void 0,void 0,function*(){const e=yield rn().get(`${E}/ga_standards`);b(!1),o(r.concat(e.data.sort().map(e=>({key:e,text:e,value:e}))))}).catch(e=>{var t;b(!1),y(null!==(t=e.response.data.message)&&void 0!==t?t:e.message)})},[o,b,y]),(0,e.useEffect)(()=>{const e=()=>{clearInterval(_.current)};return f?(console.log("started polling"),_.current=setInterval(()=>{f&&jz(void 0,void 0,void 0,function*(){const e=yield rn().get(`${E}/ma_job_results?id=`+f,{headers:{"Cache-Control":"no-cache",Pragma:"no-cache",Expires:"0"}});e.data.result&&(w(!1),p(e.data.result),h(""))}).catch(e=>{var t;w(!1),y(null!==(t=e.response.data.message)&&void 0!==t?t:e.message)})},1e4)):(console.log("stoped polling"),e()),()=>{e()}},[f]),(0,e.useEffect)(()=>{s&&l&&s!==l&&(p(void 0),w(!0),jz(void 0,void 0,void 0,function*(){const e=yield rn().get(`${E}/map_analysis?standard=${s}&standard=${l}`);e.data.result?(w(!1),p(e.data.result)):e.data.job_id&&h(e.data.job_id)}).catch(e=>{var t;w(!1),y(null!==(t=e.response.data.message)&&void 0!==t?t:e.message)}))},[s,l,p,w,y]);const S=(0,e.useCallback)(e=>jz(void 0,void 0,void 0,function*(){if(!d)return;const t=yield rn().get(`${E}/map_analysis_weak_links?standard=${s}&standard=${l}&key=${e}`);t.data.result&&p(n=>n?Object.assign(Object.assign({},n),{[e]:Object.assign(Object.assign({},n[e]),{weakLinks:t.data.result.paths})}):n)}),[d,p]);return e.createElement("main",{id:"gap-analysis"},e.createElement("h1",{className:"standard-page__heading"},"Map Analysis"),e.createElement(Dg,{loading:m||g,error:v}),e.createElement(Fx,{celled:!0,padded:!0,compact:!0},e.createElement(Fx.Header,null,e.createElement(Fx.Row,null,e.createElement(Fx.HeaderCell,null,e.createElement("span",{className:"name"},"Base:"),e.createElement(zE,{placeholder:"Base Standard",search:!0,selection:!0,options:a,onChange:(e,{value:t})=>c(null==t?void 0:t.toString()),value:s})),e.createElement(Fx.HeaderCell,null,e.createElement("span",{className:"name"},"Compare:"),e.createElement(zE,{placeholder:"Compare Standard",search:!0,selection:!0,options:a,onChange:(e,{value:t})=>u(null==t?void 0:t.toString()),value:l}),d&&e.createElement("div",{style:{float:"right"}},e.createElement(Zw,{onClick:()=>{navigator.clipboard.writeText(`${window.location.origin}/map_analysis?base=${encodeURIComponent(s||"")}&compare=${encodeURIComponent(l||"")}`)},target:"_blank"},e.createElement(xg,{name:"share square"})," Copy link to analysis"))))),e.createElement(Fx.Body,null,d&&e.createElement(e.Fragment,null,Object.keys(d).sort((e,t)=>Wm(d[e].start,!0).localeCompare(Wm(d[t].start,!0))).map(t=>e.createElement(Fx.Row,{key:t},e.createElement(Fx.Cell,{textAlign:"left",verticalAlign:"top",selectable:!0},e.createElement("a",{href:Ym(d[t].start),target:"_blank",rel:"noopener noreferrer"},e.createElement("p",null,e.createElement("b",null,Wm(d[t].start,!0))))),e.createElement(Fx.Cell,{style:{minWidth:"35vw"}},Object.values(d[t].paths).sort((e,t)=>e.score-t.score).map(e=>$z(e,d,t)),d[t].weakLinks&&Object.values(d[t].weakLinks).sort((e,t)=>e.score-t.score).map(e=>$z(e,d,t)),d[t].extra>0&&!d[t].weakLinks&&e.createElement(Zw,{onClick:()=>jz(void 0,void 0,void 0,function*(){return yield S(t)})},"Show average and weak links (",d[t].extra,")"),0===Object.keys(d[t].paths).length&&0===d[t].extra&&e.createElement("i",null,"No links Found"))))))))};var Gz=n(3789);i()(Gz.A,{insert:"head",singleton:!1}),Gz.A.locals;const Vz=()=>e.createElement("div",{className:"membership-required"},e.createElement(vy,{as:"h1",className:"membership-required__heading"},"OWASP Membership Required"),e.createElement("p",null,"A OWASP Membership account is needed to login"),e.createElement(Zw,{primary:!0,href:"https://owasp.org/membership/"},"Sign up"));var Wz=n(6129);i()(Wz.A,{insert:"head",singleton:!1}),Wz.A.locals;var qz=function(e,t,n,r){return new(n||(n=Promise))(function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})};const Xz=()=>{var t,n;const{apiUrl:r}=jg(),i="/rest/v1"!==r,[a,o]=(0,e.useState)(null),[s,c]=(0,e.useState)(!1),[l,u]=(0,e.useState)(null),[f,h]=(0,e.useState)(null),[d,p]=(0,e.useState)(null),[g,b]=(0,e.useState)(null),[m,w]=(0,e.useState)(!1),v=(0,e.useRef)(null);return e.createElement(Ey,{className:"myopencre-container"},e.createElement(vy,{as:"h1"},"MyOpenCRE"),e.createElement("p",null,"MyOpenCRE allows you to map your own security standard (e.g. SOC2) to OpenCRE Common Requirements using a CSV spreadsheet."),e.createElement("p",null,"Start by downloading the CRE catalogue below, then map your standard's controls or sections to CRE IDs in the spreadsheet."),e.createElement("div",{className:"myopencre-section"},e.createElement(Zw,{primary:!0,onClick:()=>qz(void 0,void 0,void 0,function*(){try{const e=r||window.location.origin,t=e.includes("localhost")?"http://127.0.0.1:5000":e,n=yield fetch(`${t}/cre_csv`,{method:"GET",headers:{Accept:"text/csv"}});if(!n.ok)throw new Error(`HTTP error ${n.status}`);const i=yield n.blob(),a=window.URL.createObjectURL(i),o=document.createElement("a");o.href=a,o.download="opencre-cre-mapping.csv",document.body.appendChild(o),o.click(),document.body.removeChild(o),window.URL.revokeObjectURL(a)}catch(e){console.error("CSV download failed:",e),alert("Failed to download CRE CSV")}})},"Download CRE Catalogue (CSV)")),e.createElement("div",{className:"myopencre-section myopencre-upload"},e.createElement(vy,{as:"h3"},"Upload Mapping CSV"),e.createElement(Lg,{info:!0,className:"cursor-pointer"},e.createElement("details",null,e.createElement("summary",null,e.createElement("strong",null,"How to prepare your CSV")),e.createElement("ul",null,e.createElement("li",null,"Start from the downloaded CRE Catalogue CSV."),e.createElement("li",null,"Fill ",e.createElement("code",null,"standard|name")," and ",e.createElement("code",null,"standard|id")," for your standard."),e.createElement("li",null,"Map your controls using CRE columns (",e.createElement("code",null,"CRE 0"),", ",e.createElement("code",null,"CRE 1"),", …)."),e.createElement("li",null,"CRE values must be in the format ",e.createElement("code",null,"|"),e.createElement("br",null),e.createElement("em",null,"Example:")," ",e.createElement("code",null,"616-305|Development processes for security"))))),!i&&e.createElement(Lg,{info:!0,className:"myopencre-disabled"},"CSV upload is disabled on hosted environments due to resource constraints.",e.createElement("br",null),"Please run OpenCRE locally to enable standard imports."),l?l.errors&&l.errors.length>0?e.createElement(Lg,{negative:!0},e.createElement("strong",null,"Import failed due to validation errors"),e.createElement("ul",null,l.errors.map((t,n)=>e.createElement("li",{key:n},e.createElement("strong",null,"Row ",t.row,":")," ",t.message)))):e.createElement(Lg,{negative:!0},l.message||"Import failed"):null,d&&e.createElement(Lg,{info:!0},d),f&&e.createElement(Lg,{positive:!0},e.createElement("strong",null,"Import successful"),e.createElement("ul",null,e.createElement("li",null,"New CREs added: ",null!==(n=null===(t=f.new_cres)||void 0===t?void 0:t.length)&&void 0!==n?n:0),e.createElement("li",null,"Standards imported: ",f.new_standards))),m&&!s&&!f&&!l&&e.createElement(Lg,{positive:!0},"CSV validated successfully. Click ",e.createElement("strong",null,"Upload CSV")," to start importing."),g&&e.createElement(Lg,{info:!0,className:"myopencre-preview"},e.createElement("strong",null,"Import Preview"),e.createElement("ul",null,e.createElement("li",null,"Rows detected: ",g.rows),e.createElement("li",null,"CRE mappings found: ",g.creMappings),e.createElement("li",null,"Unique standard sections: ",g.uniqueSections),e.createElement("li",null,"CRE columns detected: ",g.creColumns.join(", "))),e.createElement(Zw,{primary:!0,size:"small",onClick:()=>{b(null),w(!0)}},"Confirm Import"),e.createElement(Zw,{size:"small",onClick:()=>{b(null),w(!1),o(null),v.current&&(v.current.value="")}},"Cancel")),e.createElement(s_,null,e.createElement(s_.Field,null,e.createElement("input",{ref:v,type:"file",accept:".csv",disabled:!i||s||!!g,onChange:e=>{if(u(null),h(null),p(null),b(null),w(!1),!e.target.files||0===e.target.files.length)return;const t=e.target.files[0];if(!t.name.toLowerCase().endsWith(".csv"))return u({success:!1,type:"FILE_ERROR",message:"Please upload a valid CSV file."}),e.target.value="",void o(null);o(t),(e=>{qz(void 0,void 0,void 0,function*(){const t=(yield e.text()).split("\n").filter(Boolean);if(t.length<2)return void b(null);const n=t[0].split(",").map(e=>e.trim()),r=t.slice(1),i=n.filter(e=>e.startsWith("CRE"));let a=0;const o=new Set;r.forEach(e=>{const t=e.split(","),r={};n.forEach((e,n)=>{r[e]=(t[n]||"").trim()});const s=(r["standard|name"]||"").trim(),c=(r["standard|id"]||"").trim();(s||c)&&o.add(`${s}|${c}`),i.forEach(e=>{r[e]&&(a+=1)})}),b({rows:r.length,creMappings:a,uniqueSections:o.size,creColumns:i})})})(t)}})),e.createElement(Zw,{primary:!0,loading:s,disabled:!i||!a||!m||s,onClick:()=>qz(void 0,void 0,void 0,function*(){if(!a||!m)return;c(!0),u(null),h(null),p(null);const e=new FormData;e.append("cre_csv",a);try{const t=yield fetch(`${r}/cre_csv_import`,{method:"POST",body:e});if(403===t.status)throw new Error("CSV import is disabled on hosted environments. Run OpenCRE locally with CRE_ALLOW_IMPORT=true.");const n=yield t.json();if(!t.ok)return void u(n);"noop"===n.import_type?p("Import completed successfully, but no new CREs or standards were added because all mappings already exist."):"empty"===n.import_type?p("The uploaded CSV did not contain any importable rows. No changes were made."):h(n),w(!1),b(null),v.current&&(v.current.value="")}catch(e){u({success:!1,type:"CLIENT_ERROR",message:e.message||"Unexpected error during import"}),b(null),w(!1)}finally{c(!1)}})},"Upload CSV"))))},Yz=["Standard","Tool","Code"],Kz=()=>{const{searchTerm:t}=nt(),{apiUrl:n}=jg(),[r,i]=(0,e.useState)(!1),[a,o]=(0,e.useState)([]),[s,c]=(0,e.useState)(null);(0,e.useEffect)(()=>{i(!0),rn().get(`${n}/text_search`,{params:{text:t}}).then(function(e){c(null),o(e.data)}).catch(function(e){404===e.response.status?c("No results match your search term"):c(e.response)}).finally(()=>{i(!1)})},[t]);const l=Xm(a,e=>e.doctype);Object.keys(l).forEach(e=>{l[e]=l[e].sort((e,t)=>(e.name+e.section).localeCompare(t.name+t.section))});const u=l.CRE;let f;for(var h of Yz)l[h]&&(f=f?f.concat(l[h]):l[h]);return e.createElement("div",{className:"cre-page"},e.createElement("h1",{className:"standard-page__heading"},"Results matching : ",e.createElement("i",null,t)),e.createElement(Dg,{loading:r,error:s}),!r&&!s&&e.createElement("div",{className:"ui grid"},e.createElement("div",{className:"eight wide column"},e.createElement("h1",{className:"standard-page__heading"},"Matching CREs"),u&&e.createElement(lv,{results:u})),e.createElement("div",{className:"eight wide column"},e.createElement("h1",{className:"standard-page__heading"},"Matching sources"),f&&e.createElement(lv,{results:f}))))},Zz=()=>{const{id:t,section:n,sectionID:r,subsection:i}=nt(),{apiUrl:a}=jg(),[o,s]=(0,e.useState)(1),[c,l]=(0,e.useState)(!1),[u,f]=(0,e.useState)(null),[h,d]=(0,e.useState)();(0,e.useEffect)(()=>{window.scrollTo(0,0),l(!0),rn().get(`${a}/standard/${t}?page=${o}${n?`§ion=${encodeURIComponent(n)}`:""}${r?`§ionID=${encodeURIComponent(r)}`:""}${i?`&subsection=${encodeURIComponent(i)}`:""}`).then(function(e){f(null),d(e.data)}).catch(function(e){404===e.response.status?f("Standard does not exist in the DB, please check your search parameters"):f(e.response)}).finally(()=>{l(!1)})},[t,n,r,o,i]);const p=((null==h?void 0:h.standards)||[])[0],g=(0,e.useMemo)(()=>p?qm(p):{},[p]);return null==p||p.version,e.createElement(e.Fragment,null,e.createElement("div",{className:"standard-page section-page"},e.createElement("h5",{className:"standard-page__heading"},Wm(p)),p&&p.hyperlink&&e.createElement(e.Fragment,null,e.createElement("span",null,"Reference: "),e.createElement("a",{href:null==p?void 0:p.hyperlink,target:"_blank",rel:"noopener noreferrer"}," ",p.hyperlink)),e.createElement(Dg,{loading:c,error:u}),!c&&!u&&e.createElement("div",{className:"cre-page__links-container"},Object.keys(g).length>0?Object.entries(g).map(([t,n])=>e.createElement("div",{className:"cre-page__links",key:t},e.createElement("div",{className:"cre-page__links-header"},e.createElement("b",null,"Which ",Zm(t,n[0].document.doctype,p.doctype)),":"),n.sort((e,t)=>Wm(e.document).localeCompare(Wm(t.document))).map((n,r)=>e.createElement("div",{key:r,className:"accordion ui fluid styled cre-page__links-container"},e.createElement(iv,{node:n.document,linkType:t}))))):e.createElement("b",null,'"This document has no links yet, please open a ticket at https://github.com/OWASP/common-requirement-enumeration with your suggested mapping"')),h&&h.total_pages>0&&e.createElement("div",{className:"pagination-container"},e.createElement(_m,{defaultActivePage:1,onPageChange:(e,t)=>s(t.activePage),totalPages:h.total_pages}))))},Qz=$x(()=>{const{dataLoading:t,dataTree:n,dataStore:r,hasMore:i,isLoadingMore:a,loadNextPage:o,dataLoadError:s}=_x(),[c,l]=(0,e.useState)(!1),[u,f]=(0,e.useState)(""),[h,d]=(0,e.useState)(),[p,g]=(0,e.useState)(!1),b=e.useRef(null),m=(t,n)=>{if(!n)return t;let r=t.toLowerCase().indexOf(n);return r>=0?e.createElement(e.Fragment,null,t.substring(0,r),e.createElement("span",{className:"highlight"},t.substring(r,r+n.length)),t.substring(r+n.length)):t},w=(e,t)=>{var n,r;return(null===(n=null==e?void 0:e.displayName)||void 0===n?void 0:n.toLowerCase().includes(t))||(null===(r=null==e?void 0:e.name)||void 0===r?void 0:r.toLowerCase().includes(t))},v=(e,t)=>{var n;if(e.links){const n=[];e.links.forEach(e=>{const r=v(e.document,t);(w(e.document,t)||r)&&n.push({ltype:e.ltype,document:r||e.document})}),e.links=n}return w(e,t)||(null===(n=e.links)||void 0===n?void 0:n.length)?e:null},[y,E]=(0,e.useState)([]),_=e=>y.includes(e);function S(t){var n,r,i;if(!t)return e.createElement(e.Fragment,null);t.displayName=null!==(n=t.displayName)&&void 0!==n?n:Km(t),t.url=null!==(r=t.url)&&void 0!==r?r:Ym(t),t.links=null!==(i=t.links)&&void 0!==i?i:[];const a=t.links.filter(e=>e.ltype===mt),o=t.links.filter(e=>e.ltype===gt),s=t.id,c=Km(t);return e.createElement(I_.Item,{key:Math.random()},e.createElement(I_.Content,null,e.createElement(I_.Header,null,a.length>0&&e.createElement("div",{className:"arrow "+(_(t.id)?"":"active"),onClick:()=>(e=>{y.includes(e)?E(y.filter(t=>t!==e)):E([...y,e])})(t.id)},e.createElement("i",{"aria-hidden":"true",className:"dropdown icon"})),e.createElement(lt,{to:t.url},e.createElement("span",{className:"cre-name"},m(c,u)))),e.createElement(Bx,{linkedTo:o,applyHighlight:m,creCode:s,filter:u}),a.length>0&&!_(t.id)&&e.createElement(I_.List,null,a.map(e=>S(e.document)))))}return(0,e.useEffect)(()=>{if(n.length){const e=structuredClone(n),t=[];e.map(e=>v(e,u)).forEach(e=>{e&&t.push(e)}),d(t)}},[u,n,d]),(0,e.useEffect)(()=>{l(t)},[t]),(0,e.useEffect)(()=>{const e=b.current;if(!e||!i)return;const t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&o()},{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[i,o,h]),e.createElement(e.Fragment,null,e.createElement("main",{id:"explorer-content"},e.createElement("h1",null,"Open CRE Explorer"),e.createElement("p",null,"A visual explorer of Open Common Requirement Enumerations (CREs). Originally created by:"," ",e.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://zeljkoobrenovic.github.io/opencre-explorer/"},"Zeljko Obrenovic"),"."),e.createElement("div",{id:"explorer-wrapper"},e.createElement("div",{className:"search-field"},e.createElement("input",{id:"filter",type:"text",placeholder:"Search Explorer...",onKeyUp:function(e){f(e.target.value.toLowerCase())}}),e.createElement("div",{id:"search-summary"})),e.createElement("div",{id:"graphs-menu"},e.createElement("h4",{className:"menu-title"},"Explore visually:"),e.createElement("ul",null,e.createElement("li",null,e.createElement("a",{href:"/explorer/force_graph"},"Dependency Graph")),e.createElement("li",null,e.createElement("a",{href:"/explorer/circles"},"Zoomable circles")))),e.createElement("div",{id:"debug-toggle",style:{display:"flex",alignItems:"center",gap:"8px"}},e.createElement(Ty,{toggle:!0,label:"Debug mode",checked:p,onChange:()=>g(!p)}),e.createElement(gx,{content:"Debug mode shows graph connectivity stats and link type details for each CRE node.",trigger:e.createElement("span",{style:{cursor:"help",color:"#666",fontSize:"14px",border:"1px solid #666",borderRadius:"50%",padding:"0 4px",fontWeight:"bold"}},"?")}))),p&&e.createElement(Ux,{dataStore:r}),e.createElement(Dg,{loading:c||t,error:s}),e.createElement(I_,null,null==h?void 0:h.map(e=>S(e))),e.createElement("div",{ref:b,style:{height:1}}),a&&i&&e.createElement("p",{className:"explorer-load-more"},"Loading more requirements…")))}),Jz=$x(()=>{const{height:t,width:n}=function(){const[t,n]=(0,e.useState)(Gx());return(0,e.useEffect)(()=>{function e(){n(Gx())}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),t}(),[r,i]=(0,e.useState)(!1),{dataLoading:a,dataTree:o,ensureFullExplorerData:s,fullLoadProgress:c,dataLoadError:l}=_x(),[u,f]=(0,e.useState)([]),h=e.useRef(null),d=e.useRef(null),p=e.useRef(null),g=e.useRef(null),b=e.useRef(null),m=e.useRef(null),w=20;(0,e.useEffect)(()=>{let e=!0;return s().catch(t=>{e&&console.error("Failed to load explorer graph data",t)}),()=>{e=!1}},[s]);const v=r?n:n>t?t-100:n;return(0,e.useEffect)(()=>{if(!h.current)return;var e=jM(h.current);e.selectAll("*").remove();var t=v,n=e.append("g").attr("transform","translate("+t/2+","+t/2+")"),r=UM([-1,5],["hsl(152,80%,80%)","hsl(228,30%,40%)"]).interpolate(QC),i=CC().size([t-w,t-w]).padding(2);const a=e=>{e.children=[],e.links&&(e.children=e.links.filter(e=>e.document&&"Related"!==e.ltype).map(e=>e.document)),e.children.forEach(e=>a(e)),e.children.forEach(e=>{0===e.children.length&&(e.size=1)})},s=structuredClone(o);s.forEach(e=>a(e));let c={displayName:"OpenCRE",children:s};c=sC(c).sum(function(e){return e.size}).sort(function(e,t){return t.value-e.value});var l,u=c,y=i(c).descendants();const E=jM("body").append("div").attr("class","circle-tooltip").style("position","absolute").style("visibility","hidden").style("background-color","white").style("padding","5px").style("border-radius","3px").style("border","1px solid #ccc").style("pointer-events","none").style("z-index","10"),_=e=>{if(e===c)return void f(["OpenCRE"]);let t=[],n=e;for(;n&&n!==c;){if(n.data.displayName&&"OpenCRE"!==n.data.displayName){const e=n.data.displayName.replace(/^CRE: /,"");t.unshift(e)}n=n.parent}t.unshift("OpenCRE"),f(t)};var S=n.selectAll("circle").data(y).enter().append("circle").attr("class",function(e){return e.parent?e.children?"node":"node node--leaf":"node node--root"}).style("fill",function(e){return e.children?r(e.depth):e.data.color?e.data.color:null}).style("cursor",function(e){return!e.children&&e.data.hyperlink?"pointer":"default"}).on("mouseover",function(e,t){const n=t.data.displayName?t.data.displayName.replace(/^CRE: /,""):t.data.id?t.data.id:"";n&&E.html(n).style("visibility","visible").style("top",e.pageY-10+"px").style("left",e.pageX+10+"px")}).on("mousemove",function(e){E.style("top",e.pageY-10+"px").style("left",e.pageX+10+"px")}).on("mouseout",function(){E.style("visibility","hidden")}).on("click",function(e,t){if(t.children)u!==t&&(_(t),k(e,t),e.stopPropagation());else{e.stopPropagation();const n=t.data.hyperlink;n?(console.log("URL found:",n),window.open(n,"_blank")):console.log("This leaf node does not have a hyperlink.")}});let x=!0;const T=y.filter(function(e){return e.children});var A=n.selectAll(".label-group").data(T).enter().append("g").attr("class","label-group").style("opacity",function(e){return e.parent===u?1:0}).style("display",function(e){return e.parent===u?"inline":"none"});function k(e,t){u=t;var n=Zk().duration(e.altKey?7500:750).tween("zoom",function(){var e=RC(l,[u.x,u.y,2*u.r+w]);return function(t){C(e(t))}});x&&n.selectAll(".label-group").filter(function(e){return e&&e.parent===u||"inline"===this.style.display}).style("opacity",function(e){return e&&e.parent===u?1:0}).on("start",function(e){e&&e.parent===u&&(this.style.display="inline")}).on("end",function(e){e&&e.parent!==u&&(this.style.display="none")})}function C(e){var n=t/e[2];l=e,b.current=e,S.attr("transform",function(t){return"translate("+(t.x-e[0])*n+","+(t.y-e[1])*n+")"}),A.attr("transform",function(t){return"translate("+(t.x-e[0])*n+","+((t.y-e[1])*n-(t.r*n+5))+")"}),S.attr("r",function(e){return e.r*n})}return A.append("text").attr("class","label").style("text-anchor","middle").style("text-decoration","underline").text(function(e){if(!e.data.displayName)return"";let t=e.data.displayName;return t=t.replace(/^CRE\s*:\s*\d+-\d+\s*:\s*/,""),t}),A.append("line").attr("class","label-tick").style("stroke","black").style("stroke-width",1).attr("x1",0).attr("y1",2).attr("x2",0).attr("y2",8),e.style("background",r(-1)).on("click",function(e){_(c),k(e,c)}),C([c.x,c.y,2*c.r+w]),f(["OpenCRE"]),d.current=c,p.current=k,g.current=_,m.current=C,()=>{jM(".circle-tooltip").remove()}},[v,o]),e.createElement("div",{style:{position:"relative",width:"100vw",minHeight:v+80}},u.length>0&&e.createElement("div",{className:"breadcrumb-container",style:{margin:0,marginBottom:0,textAlign:"center",borderRadius:"8px 8px 0 0",width:"100vw",maxWidth:"100vw",background:"#f8f8f8",boxSizing:"border-box",position:"relative",zIndex:10}},u.map((t,n)=>e.createElement(e.Fragment,{key:n},n>0&&e.createElement("span",{className:"separator"}," "),e.createElement("span",{className:"breadcrumb-item",style:{cursor:n===u.length-1?"default":"pointer",color:n===u.length-1?"#333":"#2185d0",fontWeight:n===u.length-1?"bold":500,textDecoration:n===u.length-1?"none":"underline"},onClick:()=>{if(ne.data.displayName&&e.data.displayName.replace(/^CRE: /,"")===u[t]),e);t++);e&&(g.current(e),p.current({altKey:!1},e))}}},t)))),e.createElement("div",{style:{position:"absolute",left:"50%",top:60,transform:"translateX(-50%)",width:v,height:v,background:"rgb(163, 245, 207)",borderRadius:8,zIndex:1}},e.createElement("div",{style:{position:"absolute",right:0,top:0,display:"flex",flexDirection:"column",gap:"5px",zIndex:21}},e.createElement(Zw,{icon:!0,onClick:()=>i(!r),className:"screen-size-button"},e.createElement(xg,{name:r?"compress":"expand"}))),e.createElement("div",{style:{position:"absolute",right:20,bottom:20,display:"flex",flexDirection:"row",gap:"10px",zIndex:20}},e.createElement(Zw,{icon:!0,className:"screen-size-button",onClick:()=>{if(!m.current||!d.current)return;const e=b.current?b.current:[d.current.x,d.current.y,2*d.current.r+w],t=[e[0],e[1],e[2]/2.4],n=RC(e,t);jM("svg").transition().duration(350).tween("zoom",()=>e=>m.current(n(e)))}},e.createElement(xg,{name:"plus"})),e.createElement(Zw,{icon:!0,className:"screen-size-button",onClick:()=>{if(!m.current||!d.current)return;const e=b.current?b.current:[d.current.x,d.current.y,2*d.current.r+w],t=[e[0],e[1],2.4*e[2]],n=RC(e,t);jM("svg").transition().duration(350).tween("zoom",()=>e=>m.current(n(e)))}},e.createElement(xg,{name:"minus"}))),e.createElement("svg",{ref:h,width:v,height:v,style:{background:"transparent",display:"block",margin:"auto"}},e.createElement("g",{transform:`translate(${v/2},${v/2})`}))),e.createElement(Dg,{loading:a||!!c,error:l}),c&&e.createElement("p",{className:"explorer-full-load-progress"},"Loading graph data (",c,")…"))}),e$=$x(()=>{const[t,n]=(0,e.useState)(),[r,i]=(0,e.useState)(["same"]),[a,o]=(0,e.useState)(0),[s,c]=(0,e.useState)(0),{dataLoading:l,dataTree:u,getStoreKey:f,dataStore:h,ensureFullExplorerData:d,fullLoadProgress:p,dataLoadError:g}=_x(),b=(0,e.useRef)(),[m,w]=(0,e.useState)(""),[v,y]=(0,e.useState)(""),[E,_]=(0,e.useState)([]),[S,x]=(0,e.useState)([]);(0,e.useEffect)(()=>{let e=!0;return d().catch(t=>{e&&console.error("Failed to load explorer graph data",t)}),()=>{e=!1}},[d]);const[T,A]=(0,e.useState)(!0),k=e=>e.split(":")[0],C=e=>`grouped_${e}`,M=e=>e.replace("grouped_","");(0,e.useEffect)(()=>{const e=Object.values(h).filter(e=>"CRE"===e.doctype).map(e=>({key:e.id,text:e.displayName,value:e.id}));_([{key:"none_typeA",text:"None",value:""},{key:"all_cre",text:"ALL CREs",value:"all_cre"},...e])},[h]),(0,e.useEffect)(()=>{const e={nodes:[],links:[]};function t(e,n=[]){return e.doctype&&"standard"===e.doctype.toLowerCase()&&n.push(e),e.links&&Array.isArray(e.links)&&e.links.forEach(e=>{e.document&&t(e.document,n)}),n}Object.values(h);let i=[];u.forEach(e=>{i=i.concat(t(e))});const a=new Map;i.forEach(e=>{const t=k(e.id);a.has(t)||a.set(t,[]),a.get(t).push(e)});const s=new Map;a.forEach((e,t)=>{const n=C(t);e.forEach(e=>{s.set(e.id,n)})});const l=i.map(e=>e.id);console.log("Standard IDs from JSON data:",l),console.log("Grouped standards:",Array.from(a.keys()));const d=Array.from(a.entries()).map(([e,t])=>({key:C(e),text:`${e} (${t.length})`,value:C(e)})),p=(e,t)=>{var n,r,i;if(!t||""===t)return!0;if((i=t)&&i.startsWith("all_")){const r=(e=>e.replace("all_",""))(t);return(null===(n=e.doctype)||void 0===n?void 0:n.toLowerCase())===r.toLowerCase()}if((e=>e&&e.startsWith("grouped_"))(t)){const n=M(t);return"standard"===(null===(r=e.doctype)||void 0===r?void 0:r.toLowerCase())&&k(e.id)===n}return e.id===t},g=t=>{t.links&&Array.isArray(t.links)&&t.links.forEach(n=>{var i,a;if(n.document&&!r.includes(n.ltype.toLowerCase())){const r="standard"===(null===(i=t.doctype)||void 0===i?void 0:i.toLowerCase())&&s.get(t.id)||f(t),o="standard"===(null===(a=n.document.doctype)||void 0===a?void 0:a.toLowerCase())&&s.get(n.document.id)||f(n.document);e.links.push({source:r,target:o,count:"Contains"===n.ltype?2:1,type:n.ltype}),g(n.document)}})};u.forEach(e=>g(e)),T||!m&&!v||(e.links=e.links.filter(e=>{let t=h[e.source],n=h[e.target];if(e.source.startsWith("grouped_")){const n=M(e.source);t={id:e.source,doctype:"standard",displayName:n,links:[],url:"",name:n}}if(e.target.startsWith("grouped_")){const t=M(e.target);n={id:e.target,doctype:"standard",displayName:t,links:[],url:"",name:t}}if(!t||!n)return!1;const r=p(t,m),i=p(t,v),a=p(n,m),o=p(n,v);return r||i||a||o}));const b={},w=function(t){if(b[t])b[t].size+=1;else{if(t.startsWith("grouped_")){const e=M(t),n=a.get(e)||[],r=n.length;b[t]={id:t,size:r,name:e,doctype:"standard",originalNodes:n}}else{const e=h[t];b[t]={id:t,size:1,name:e?e.displayName:t,doctype:e?e.doctype:"Unknown"}}e.nodes.push(b[t])}};e.links.forEach(e=>{w(e.source),w(e.target)});const y=[{key:"none_typeB",text:"None",value:""},{key:"all_standard",text:"ALL Standards",value:"all_standard"},{key:"separator1",text:"─ Standards ─",value:"",disabled:!0},...d,{key:"separator2",text:"─ CREs ─",value:"",disabled:!0},{key:"all_cre_right",text:"ALL CREs",value:"all_cre"},...Object.values(h).filter(e=>"CRE"===e.doctype).map(e=>({key:`${e.id}_right`,text:e.displayName,value:e.id}))];x(y),c(e.nodes.map(e=>e.size).reduce((e,t)=>Math.max(e,t),0)),o(e.links.map(e=>e.count).reduce((e,t)=>Math.max(e,t),0)),e.links=e.links.map(e=>({source:e.target,target:e.source,count:e.count,type:e.type})),n(e)},[r,u,m,v,T,h]);const I=e=>{const t=structuredClone(r);if(t.includes(e)){const n=t.indexOf(e);t.splice(n,1),i(t)}else t.push(e),i(t)};return(0,e.useEffect)(()=>{var e;t&&b.current&&(null===(e=b.current.d3Force("charge"))||void 0===e||e.strength(-55),setTimeout(()=>{var e,t,n;null===(t=null===(e=b.current)||void 0===e?void 0:e.d3Force("charge"))||void 0===t||t.strength(-75),null===(n=b.current)||void 0===n||n.d3ReheatSimulation()},200),setTimeout(()=>{var e,t;null===(t=null===(e=b.current)||void 0===e?void 0:e.d3Force("charge"))||void 0===t||t.strength(-95)},600))},[t]),(0,e.useEffect)(()=>{b.current&&t&&setTimeout(()=>{var e;null===(e=b.current)||void 0===e||e.cameraPosition({x:1100,y:0,z:800},{x:-50,y:-100,z:-200},800)},1200)},[t]),e.createElement("div",null,e.createElement(Dg,{loading:l||!!p,error:g}),p&&e.createElement("p",{className:"explorer-full-load-progress"},"Loading graph data (",p,")…"),e.createElement(Ty,{label:"Contains",checked:!r.includes("contains"),onChange:()=>I("contains")})," | ",e.createElement(Ty,{label:"Related",checked:!r.includes("related"),onChange:()=>I("related")})," | ",e.createElement(Ty,{label:"Linked To",checked:!r.includes("linked to"),onChange:()=>I("linked to")})," | ",e.createElement(Ty,{label:"Same",checked:!r.includes("same"),onChange:()=>I("same")}),e.createElement("div",{style:{marginBottom:"10px",marginTop:"10px",marginLeft:"10px"}},e.createElement(zE,{placeholder:"Select CRE",options:E,value:m,onChange:(e,t)=>{var n;return w(null!==(n=t.value)&&void 0!==n?n:"")},style:{marginRight:"10px"},selection:!0,search:!0}),e.createElement(zE,{placeholder:"Select Standard or CRE",options:S,value:v,onChange:(e,t)=>{var n;return y(null!==(n=t.value)&&void 0!==n?n:"")},selection:!0,search:!0})," | ",e.createElement(Ty,{label:"Show All",checked:T,onChange:()=>A(!T)})),T||m||v?t&&e.createElement(Fz,{ref:b,graphData:t,backgroundColor:"#06080f",nodeRelSize:6.32,nodeVal:e=>Math.max(14*e.size/s,.8),nodeLabel:e=>`${e.name} (${e.size})`,nodeColor:e=>(e=>{switch(e.toLowerCase()){case"cre":return"lightblue";case"standard":return"orange";case"tool":return"lightgreen";case"linked to":return"red";default:return"purple"}})(e.doctype),linkOpacity:.25,linkWidth:()=>5,linkColor:e=>(e=>{switch(e.toLowerCase()){case"related":return"skyblue";case"linked to":return"gray";case"same":return"red";default:return"white"}})(e.type),warmupTicks:0,cooldownTicks:120}):e.createElement("div",{style:{marginTop:"20px",color:"gray"}},'Please select at least one filter to view the graph or check "Show All".'))}),t$=e=>[...e.myopencre?[{path:"/myopencre",component:Xz,showFilter:!1}]:[],{path:"/",component:tn,showFilter:!1},{path:"/map_analysis",component:Hz,showFilter:!1},{path:`/node${_t}/:id${St}/:section${Tt}/:subsection`,component:Zz,showFilter:!0},{path:`/node${_t}/:id${xt}/:sectionID${Tt}/:subsection`,component:Zz,showFilter:!0},{path:`/node${_t}/:id${St}/:section`,component:Zz,showFilter:!0},{path:`/node${_t}/:id${xt}/:sectionID`,component:Zz,showFilter:!0},{path:"/node/:type/:id",component:av,showFilter:!0},{path:`${kt}/:id`,component:sv,showFilter:!0},{path:"/graph/:id",component:$g,showFilter:!1},{path:`${At}/:searchTerm`,component:Kz,showFilter:!0},{path:"/chatbot",component:g_,showFilter:!1},{path:"/members_required",component:Vz,showFilter:!1},{path:"/root_cres",component:uv,showFilter:!1},{path:`${Ct}/circles`,component:Jz,showFilter:!1},{path:`${Ct}/force_graph`,component:e$,showFilter:!1},{path:`${Ct}`,component:Qz,showFilter:!1}],n$=({capabilities:t})=>{const n=t$(t);return e.createElement(Qe,null,n.map(({path:t,component:n})=>{if(!n)return null;const r=n;return e.createElement(Ze,{key:t,path:t,exact:"/"===t,render:()=>e.createElement(r,null)})}),e.createElement(Ze,{component:a$}))},r$=()=>{const{capabilities:t,loading:n}=(()=>{const{apiUrl:t}=jg(),[n,r]=(0,e.useState)(null),[i,a]=(0,e.useState)(!0);return(0,e.useEffect)(()=>{const e=t.replace("/rest/v1","");fetch(`${e}/api/capabilities`).then(e=>e.json()).then(r).catch(()=>r({myopencre:!1})).finally(()=>a(!1))},[t]),{capabilities:n,loading:i}})();return n||!t?null:e.createElement(e.Fragment,null,e.createElement(f$,{capabilities:t}),e.createElement(n$,{capabilities:t}))};var i$=n(8035);i()(i$.A,{insert:"head",singleton:!1}),i$.A.locals;const a$=()=>e.createElement(Ey,{className:"no-route__container"},e.createElement(vy,{icon:!0},e.createElement(xg,{name:"search"}),"That page does not exist"));var o$=n(5963);i()(o$.A,{insert:"head",singleton:!1}),o$.A.locals;const s$=Bt("menu",[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]]);var c$=n(3101);i()(c$.A,{insert:"head",singleton:!1}),c$.A.locals;const l$={term:"",error:""},u$=()=>{const[t,n]=(0,e.useState)(l$),r=et(),i="navbar-search-input",a="navbar-search-error";return e.createElement("div",{className:"navbar__search"},e.createElement("form",{onSubmit:e=>{e.preventDefault();const{term:i}=t;i.trim()?(n(l$),r.push(`${At}/${i}`)):n(Object.assign(Object.assign({},t),{error:"Search term cannot be blank"}))}},e.createElement("label",{htmlFor:i,className:"visually-hidden"},"Search OpenCRE"),e.createElement($t,{className:"search-icon","aria-hidden":"true"}),e.createElement("input",{id:i,type:"text",placeholder:"Search...",value:t.term,"aria-label":"Search OpenCRE","aria-invalid":Boolean(t.error),"aria-describedby":t.error?a:void 0,onChange:e=>n(Object.assign(Object.assign({},t),{term:e.target.value}))})),t.error&&e.createElement("p",{id:a,className:"search-error",role:"alert"},t.error))},f$=({capabilities:t})=>{const n=t$(t);let r=new URLSearchParams(window.location.search);const i=et(),a=()=>{r.set("applyFilters","true"),i.push(window.location.pathname+"?"+r.toString())},{showFilter:o}=(e=>{const{pathname:t}=tt(),n=e.map(({path:e,showFilter:n})=>Object.assign(Object.assign({},Ke(t,{path:e,exact:!0,strict:!1})),{showFilter:n})).find(e=>null==e?void 0:e.isExact);return{params:(null==n?void 0:n.params)||{},url:(null==n?void 0:n.url)||"",showFilter:(null==n?void 0:n.showFilter)||!1}})(n),[s,c]=(0,e.useState)(!1);(0,e.useEffect)(()=>{const e=window.matchMedia("(min-width: 768px)"),t=e=>{e.matches&&c(!1)};return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}},[]);const l=()=>{c(!1)};return e.createElement(e.Fragment,null,e.createElement("nav",{className:"navbar"},e.createElement("div",{className:"navbar__container"},e.createElement("div",{className:"navbar__content"},e.createElement(lt,{to:"/",className:"navbar__logo"},e.createElement("img",{src:"/logo.svg",alt:"Logo"})),e.createElement("div",{className:"navbar__desktop-links"},e.createElement(ht,{to:"/",exact:!0,className:"nav-link",activeClassName:"nav-link--active"},"Home"),e.createElement(ht,{to:"/root_cres",className:"nav-link",activeClassName:"nav-link--active"},"Browse"),e.createElement(ht,{to:"/chatbot",className:"nav-link",activeClassName:"nav-link--active"},"Chat"),e.createElement(ht,{to:"/map_analysis",className:"nav-link",activeClassName:"nav-link--active"},"Map Analysis"),e.createElement(ht,{to:"/explorer",className:"nav-link",activeClassName:"nav-link--active"},"Explorer"),t.myopencre&&e.createElement(ht,{to:"/myopencre",className:"nav-link",activeClassName:"nav-link--active"},"MyOpenCRE")),e.createElement("div",null,e.createElement(u$,null),o&&r.has("showButtons")?e.createElement("div",{className:"foo"},e.createElement(Zw,{onClick:()=>{a()},content:"Apply Filters"}),e.createElement(Qw,null)):""),e.createElement("div",{className:"navbar__actions"},e.createElement("button",{className:"navbar__mobile-menu-toggle",onClick:()=>c(!0)},e.createElement(s$,{className:"icon"}),e.createElement("span",{className:"sr-only"},"Toggle menu")))))),e.createElement("div",{className:"navbar__overlay "+(s?"is-open":""),onClick:l}),e.createElement("div",{className:"navbar__mobile-menu "+(s?"is-open":"")},e.createElement("div",{className:"mobile-search-container"},e.createElement(u$,null)),o&&r.has("showButtons")?e.createElement("div",{className:"foo"},e.createElement(Zw,{onClick:()=>{a()},content:"Apply Filters"}),e.createElement(Qw,null)):"",e.createElement("div",{className:"mobile-nav-links"},e.createElement(ht,{to:"/",exact:!0,className:"nav-link",activeClassName:"nav-link--active",onClick:l},"Home"),e.createElement(ht,{to:"/root_cres",className:"nav-link",activeClassName:"nav-link--active",onClick:l},"Browse"),e.createElement(ht,{to:"/chatbot",className:"nav-link",activeClassName:"nav-link--active",onClick:l},"Chat"),e.createElement(ht,{to:"/map_analysis",className:"nav-link",activeClassName:"nav-link--active",onClick:l},"Map Analysis"),e.createElement(ht,{to:"/explorer",className:"nav-link",activeClassName:"nav-link--active",onClick:l},"Explorer"),t.myopencre&&e.createElement(ht,{to:"/myopencre",className:"nav-link",activeClassName:"nav-link--active",onClick:l},"MyOpenCRE")),e.createElement("div",{className:"mobile-auth"})))},h$=new be.QueryClient,d$=()=>e.createElement("div",{className:"app"},e.createElement(Nt.Provider,{value:Ot},e.createElement(be.QueryClientProvider,{client:h$},e.createElement(rt,null,e.createElement(ge,null),e.createElement(r$,null)))));document.addEventListener("DOMContentLoaded",()=>{t.render(e.createElement(d$,null),document.getElementById("mount"))})})()})(); \ No newline at end of file diff --git a/application/frontend/www/index.html b/application/frontend/www/index.html index 193341b7a..99d5f92cf 100644 --- a/application/frontend/www/index.html +++ b/application/frontend/www/index.html @@ -1 +1 @@ -Open CRE
\ No newline at end of file +Open CRE
\ No newline at end of file diff --git a/application/tests/db_test.py b/application/tests/db_test.py index a5dd688d7..b9fcbe248 100644 --- a/application/tests/db_test.py +++ b/application/tests/db_test.py @@ -2531,7 +2531,16 @@ def test_all_cres_with_pagination_hydrates_full_link_graph(self) -> None: for paginated_cre in paginated_cres: expected = collection.get_CREs(external_id=paginated_cre.id)[0] - self.assertEqual(expected.todict(), paginated_cre.todict()) + expected_dict = expected.todict() + actual_dict = paginated_cre.todict() + self.assertEqual(expected_dict["id"], actual_dict["id"]) + self.assertEqual(expected_dict["name"], actual_dict["name"]) + self.assertEqual( + expected_dict.get("description"), actual_dict.get("description") + ) + self.assertCountEqual( + expected_dict.get("links", []), actual_dict.get("links", []) + ) child1_paginated = next(c for c in paginated_cres if c.id == "101-101") link_types = {link.ltype for link in child1_paginated.links} From 13d2f041ec5454dceec3cacd6906e5821355a415 Mon Sep 17 00:00:00 2001 From: Saatwik kumar Yadav <66209756+skypank-coder@users.noreply.github.com> Date: Sat, 20 Jun 2026 19:54:12 +0530 Subject: [PATCH 25/37] feat(api): add feature-flagged /rest/v1/health endpoint (#936) * feat(api): add feature-flagged /rest/v1/health endpoint Adds a lightweight deploy/uptime health probe at GET /rest/v1/health, gated behind the CRE_ENABLE_HEALTH feature flag (off by default). Behavior: - Flag off (default): endpoint returns 404, as if it does not exist. - Flag on, healthy: 200 with {ok, db_reachable, cre_count, standards_count} when the serving DB is reachable and holds a non-empty dataset. - Flag on, unhealthy: 503 when the DB is unreachable or the dataset is empty/broken (reason explains which). Node_collection.health_check() runs cheap COUNT queries over CRE and Node, never raises (connectivity errors are reported as ok=False), and treats a zero count for either as an empty dataset. Scope is intentionally limited to DB reachability + data sanity. Deeper checks (gap-analysis completeness, mapping coverage, Neo4j, Redis) are deliberately excluded by design and belong in ops tooling. * fix: load .env in feature_flags and document CRE_ENABLE_HEALTH flag * Modified the .env issue --- .env.example | 7 ++++ README.md | 1 + application/database/db.py | 48 +++++++++++++++++++++++ application/feature_flags.py | 11 ++++++ application/tests/web_main_test.py | 63 ++++++++++++++++++++++++++++++ application/web/web_main.py | 23 ++++++++++- 6 files changed, 152 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index a4a9a6b65..6e3efc0fb 100644 --- a/.env.example +++ b/.env.example @@ -24,6 +24,13 @@ REDIS_NO_SSL=false FLASK_CONFIG=development INSECURE_REQUESTS=false +# Feature Flags +# Enable the deploy/uptime health probe at GET /rest/v1/health. +# Set to one of 1, true, yes (case-insensitive) to enable; any other value +# (including unset or false) leaves it off and the endpoint returns 404. + +CRE_ENABLE_HEALTH=false + # Embeddings NO_GEN_EMBEDDINGS=false diff --git a/README.md b/README.md index 02fb3e9dd..642e9002c 100644 --- a/README.md +++ b/README.md @@ -289,6 +289,7 @@ Then edit `.env` and provide values appropriate for your environment. * Google Auth: `GOOGLE_CLIENT_ID`, `GOOGLE_CLIENT_SECRET`, `GOOGLE_SECRET_JSON`, `LOGIN_ALLOWED_DOMAINS` * GCP: `GCP_NATIVE` * Spreadsheet Auth: `OpenCRE_gspread_Auth` +* Feature flags: `CRE_ENABLE_HEALTH` (enable the `GET /rest/v1/health` deploy/uptime probe; off by default, returns 404 when unset) See `.env.example` for full list and defaults. diff --git a/application/database/db.py b/application/database/db.py index 25ece0be7..50528c22e 100644 --- a/application/database/db.py +++ b/application/database/db.py @@ -2264,6 +2264,54 @@ def get_root_cres(self): ) return self._hydrate_cres_batch(list(cres)) + def health_check(self) -> Dict[str, Any]: + """Lightweight liveness/readiness probe for the serving database. + + Intended for use by a deploy/uptime health endpoint, NOT for deep + operational checks (GA completeness, mapping coverage, etc.) which are + slow and belong in ops tooling. Performs cheap COUNT queries and never + raises: connectivity failures are reported as ``ok=False`` so the caller + can return an appropriate status code. + + Returns a dict with: + - ``ok``: True only if the DB is reachable AND holds a non-empty + dataset (at least one CRE and one standard/node). + - ``db_reachable``: True if the COUNT queries executed. + - ``cre_count`` / ``standards_count``: populated when reachable. + - ``reason``: short human-readable explanation when ``ok`` is False. + """ + try: + cre_count = self.session.query(func.count(CRE.id)).scalar() or 0 + standards_count = self.session.query(func.count(Node.id)).scalar() or 0 + except OperationalError: + return { + "ok": False, + "db_reachable": False, + "reason": "database unreachable", + } + except Exception: # pragma: no cover - defensive, never fail open + return { + "ok": False, + "db_reachable": False, + "reason": "database health query failed", + } + + if cre_count == 0 or standards_count == 0: + return { + "ok": False, + "db_reachable": True, + "cre_count": cre_count, + "standards_count": standards_count, + "reason": "empty dataset", + } + + return { + "ok": True, + "db_reachable": True, + "cre_count": cre_count, + "standards_count": standards_count, + } + def get_embeddings_by_doc_type(self, doc_type: str) -> Dict[str, List[float]]: res = {} embeddings = ( diff --git a/application/feature_flags.py b/application/feature_flags.py index 464e3238a..fe1aae2dc 100644 --- a/application/feature_flags.py +++ b/application/feature_flags.py @@ -1,7 +1,18 @@ import os +try: + from dotenv import load_dotenv # type: ignore + + load_dotenv() +except ImportError: + pass + TRUE_VALUES = {"1", "true", "yes"} def is_cre_import_allowed() -> bool: return os.getenv("CRE_ALLOW_IMPORT", "").strip().lower() in TRUE_VALUES + + +def is_health_endpoint_enabled() -> bool: + return os.getenv("CRE_ENABLE_HEALTH", "").strip().lower() in TRUE_VALUES diff --git a/application/tests/web_main_test.py b/application/tests/web_main_test.py index c0547ed83..e112c2aad 100644 --- a/application/tests/web_main_test.py +++ b/application/tests/web_main_test.py @@ -1360,3 +1360,66 @@ def test_get_cre_csv(self) -> None: data.getvalue(), response.data.decode(), ) + + def test_health_disabled_by_default_returns_404(self) -> None: + os.environ.pop("CRE_ENABLE_HEALTH", None) + with self.app.test_client() as client: + response = client.get("/rest/v1/health") + self.assertEqual(404, response.status_code) + + def test_health_enabled_empty_dataset_returns_503(self) -> None: + os.environ["CRE_ENABLE_HEALTH"] = "1" + try: + with self.app.test_client() as client: + response = client.get("/rest/v1/health") + self.assertEqual(503, response.status_code) + body = json.loads(response.data.decode()) + self.assertFalse(body["ok"]) + self.assertTrue(body["db_reachable"]) + self.assertEqual("empty dataset", body["reason"]) + finally: + os.environ.pop("CRE_ENABLE_HEALTH", None) + + def test_health_enabled_populated_returns_200(self) -> None: + os.environ["CRE_ENABLE_HEALTH"] = "1" + try: + collection = db.Node_collection() + collection.add_cre( + defs.CRE(id="111-115", description="CA", name="CA", tags=["ta"]) + ) + collection.add_node( + defs.Standard( + name="s1", section="s11", subsection="s111", version="1.1.1" + ) + ) + with self.app.test_client() as client: + response = client.get("/rest/v1/health") + self.assertEqual(200, response.status_code) + body = json.loads(response.data.decode()) + self.assertTrue(body["ok"]) + self.assertTrue(body["db_reachable"]) + self.assertGreaterEqual(body["cre_count"], 1) + self.assertGreaterEqual(body["standards_count"], 1) + finally: + os.environ.pop("CRE_ENABLE_HEALTH", None) + + def test_health_db_unreachable_returns_503(self) -> None: + os.environ["CRE_ENABLE_HEALTH"] = "1" + try: + with patch.object( + db.Node_collection, + "health_check", + return_value={ + "ok": False, + "db_reachable": False, + "reason": "database unreachable", + }, + ): + with self.app.test_client() as client: + response = client.get("/rest/v1/health") + self.assertEqual(503, response.status_code) + body = json.loads(response.data.decode()) + self.assertFalse(body["ok"]) + self.assertFalse(body["db_reachable"]) + finally: + os.environ.pop("CRE_ENABLE_HEALTH", None) diff --git a/application/web/web_main.py b/application/web/web_main.py index df2dac79f..cfe93c548 100644 --- a/application/web/web_main.py +++ b/application/web/web_main.py @@ -22,7 +22,7 @@ from application.cmd import cre_main from application.defs import cre_defs as defs from application.defs import cre_exceptions -from application.feature_flags import is_cre_import_allowed +from application.feature_flags import is_cre_import_allowed, is_health_endpoint_enabled from application.utils import spreadsheet as sheet_utils from application.utils import mdutils, redirectors, gap_analysis @@ -584,6 +584,27 @@ def text_search() -> Any: abort(404, "No object matches the given search terms") +@app.route("/rest/v1/health", methods=["GET"]) +def health() -> Any: + """Deploy/uptime health probe (feature-flagged, off by default). + + Enable with CRE_ENABLE_HEALTH=1. Scope is intentionally narrow and fast so + it can gate deploys without failing for the wrong reason: + - 200: app up, serving DB reachable, dataset non-empty (CREs and + standards present). + - 503: DB unreachable or dataset empty/broken. + Deeper checks (gap-analysis completeness, mapping coverage, Neo4j/Redis) + are deliberately excluded and live in ops tooling instead. + """ + if not is_health_endpoint_enabled(): + abort(404) + + database = db.Node_collection() + result = database.health_check() + status_code = 200 if result.get("ok") else 503 + return jsonify(result), status_code + + @app.route("/rest/v1/root_cres", methods=["GET"]) def find_root_cres() -> Any: """ From 2fbfb074f559a9d739bea82fa529eb7cd5203370 Mon Sep 17 00:00:00 2001 From: bornunique911 Date: Tue, 24 Mar 2026 23:04:55 +0530 Subject: [PATCH 26/37] Add OWASP Top 10 and API importer support --- .../tests/owasp_api_top10_2023_parser_test.py | 43 ++++++++++ .../tests/owasp_top10_2025_parser_test.py | 80 +++++++++++++++++++ .../data/owasp_api_top10_2023.json | 62 ++++++++++++++ .../data/owasp_top10_2025.json | 62 ++++++++++++++ .../parsers/owasp_api_top10_2023.py | 47 +++++++++++ .../parsers/owasp_top10_2025.py | 47 +++++++++++ cre.py | 30 +++++++ 7 files changed, 371 insertions(+) create mode 100644 application/tests/owasp_api_top10_2023_parser_test.py create mode 100644 application/tests/owasp_top10_2025_parser_test.py create mode 100644 application/utils/external_project_parsers/data/owasp_api_top10_2023.json create mode 100644 application/utils/external_project_parsers/data/owasp_top10_2025.json create mode 100644 application/utils/external_project_parsers/parsers/owasp_api_top10_2023.py create mode 100644 application/utils/external_project_parsers/parsers/owasp_top10_2025.py diff --git a/application/tests/owasp_api_top10_2023_parser_test.py b/application/tests/owasp_api_top10_2023_parser_test.py new file mode 100644 index 000000000..806d11bed --- /dev/null +++ b/application/tests/owasp_api_top10_2023_parser_test.py @@ -0,0 +1,43 @@ +import unittest + +from application import create_app, sqla # type: ignore +from application.database import db +from application.defs import cre_defs as defs +from application.prompt_client import prompt_client +from application.utils.external_project_parsers.parsers import owasp_api_top10_2023 + + +class TestOwaspApiTop10_2023Parser(unittest.TestCase): + def tearDown(self) -> None: + sqla.session.remove() + sqla.drop_all() + self.app_context.pop() + + def setUp(self) -> None: + self.app = create_app(mode="test") + self.app_context = self.app.app_context() + self.app_context.push() + sqla.create_all() + self.collection = db.Node_collection() + + def test_parse(self) -> None: + for cre_id, name in [ + ("304-667", "Protect API against unauthorized access/modification (IDOR)"), + ("724-770", "Technical application access control"), + ("715-223", "Ensure trusted origin of third party resources"), + ]: + self.collection.add_cre(defs.CRE(id=cre_id, name=name, description="")) + + result = owasp_api_top10_2023.OwaspApiTop10_2023().parse( + self.collection, prompt_client.PromptHandler(database=self.collection) + ) + + entries = result.results["OWASP API Security Top 10 2023"] + self.assertEqual(10, len(entries)) + self.assertEqual("API1", entries[0].sectionID) + self.assertEqual("Broken Object Level Authorization", entries[0].section) + self.assertEqual( + ["304-667", "724-770"], [l.document.id for l in entries[0].links] + ) + self.assertEqual("API10", entries[-1].sectionID) + self.assertEqual(["715-223"], [l.document.id for l in entries[-1].links]) diff --git a/application/tests/owasp_top10_2025_parser_test.py b/application/tests/owasp_top10_2025_parser_test.py new file mode 100644 index 000000000..de4f86a9f --- /dev/null +++ b/application/tests/owasp_top10_2025_parser_test.py @@ -0,0 +1,80 @@ +import unittest + +from application import create_app, sqla # type: ignore +from application.database import db +from application.defs import cre_defs as defs +from application.prompt_client import prompt_client +from application.utils.external_project_parsers.parsers import owasp_top10_2025 + + +class TestOwaspTop10_2025Parser(unittest.TestCase): + def tearDown(self) -> None: + sqla.session.remove() + sqla.drop_all() + self.app_context.pop() + + def setUp(self) -> None: + self.app = create_app(mode="test") + self.app_context = self.app.app_context() + self.app_context.push() + sqla.create_all() + self.collection = db.Node_collection() + + def test_parse(self) -> None: + self.collection.add_cre( + defs.CRE(id="177-260", name="Session management", description="") + ) + self.collection.add_cre( + defs.CRE( + id="117-371", + name="Use a centralized access control mechanism", + description="", + ) + ) + self.collection.add_cre( + defs.CRE( + id="724-770", + name="Technical application access control", + description="", + ) + ) + self.collection.add_cre( + defs.CRE( + id="031-447", name="Whitelist all external (HTTP) input", description="" + ) + ) + self.collection.add_cre( + defs.CRE( + id="064-808", name="Encode output context-specifically", description="" + ) + ) + self.collection.add_cre( + defs.CRE(id="760-764", name="Injection protection", description="") + ) + self.collection.add_cre( + defs.CRE(id="513-183", name="Error handling", description="") + ) + + result = owasp_top10_2025.OwaspTop10_2025().parse( + self.collection, + prompt_client.PromptHandler(database=self.collection), + ) + + entries = result.results["OWASP Top 10 2025"] + self.assertEqual(10, len(entries)) + self.assertEqual("A01", entries[0].sectionID) + self.assertEqual("Broken Access Control", entries[0].section) + self.assertEqual( + "https://owasp.org/Top10/2025/A01_2025-Broken_Access_Control/", + entries[0].hyperlink, + ) + self.assertEqual( + ["117-371", "177-260", "724-770"], + [link.document.id for link in entries[0].links], + ) + self.assertEqual( + ["031-447", "064-808", "760-764"], + [link.document.id for link in entries[4].links], + ) + self.assertEqual("A10", entries[-1].sectionID) + self.assertEqual(["513-183"], [link.document.id for link in entries[-1].links]) diff --git a/application/utils/external_project_parsers/data/owasp_api_top10_2023.json b/application/utils/external_project_parsers/data/owasp_api_top10_2023.json new file mode 100644 index 000000000..7a8df0ed0 --- /dev/null +++ b/application/utils/external_project_parsers/data/owasp_api_top10_2023.json @@ -0,0 +1,62 @@ +[ + { + "section_id": "API1", + "section": "Broken Object Level Authorization", + "hyperlink": "https://owasp.org/API-Security/editions/2023/en/0xa1-broken-object-level-authorization/", + "cre_ids": ["304-667", "724-770"] + }, + { + "section_id": "API2", + "section": "Broken Authentication", + "hyperlink": "https://owasp.org/API-Security/editions/2023/en/0xa2-broken-authentication/", + "cre_ids": ["177-260", "586-842", "633-428"] + }, + { + "section_id": "API3", + "section": "Broken Object Property Level Authorization", + "hyperlink": "https://owasp.org/API-Security/editions/2023/en/0xa3-broken-object-property-level-authorization/", + "cre_ids": ["538-770", "724-770", "128-128"] + }, + { + "section_id": "API4", + "section": "Unrestricted Resource Consumption", + "hyperlink": "https://owasp.org/API-Security/editions/2023/en/0xa4-unrestricted-resource-consumption/", + "cre_ids": ["623-550"] + }, + { + "section_id": "API5", + "section": "Broken Function Level Authorization", + "hyperlink": "https://owasp.org/API-Security/editions/2023/en/0xa5-broken-function-level-authorization/", + "cre_ids": ["650-560", "724-770"] + }, + { + "section_id": "API6", + "section": "Unrestricted Access to Sensitive Business Flows", + "hyperlink": "https://owasp.org/API-Security/editions/2023/en/0xa6-unrestricted-access-to-sensitive-business-flows/", + "cre_ids": ["534-605", "630-573"] + }, + { + "section_id": "API7", + "section": "Server Side Request Forgery", + "hyperlink": "https://owasp.org/API-Security/editions/2023/en/0xa7-server-side-request-forgery/", + "cre_ids": ["028-728", "657-084"] + }, + { + "section_id": "API8", + "section": "Security Misconfiguration", + "hyperlink": "https://owasp.org/API-Security/editions/2023/en/0xa8-security-misconfiguration/", + "cre_ids": ["486-813"] + }, + { + "section_id": "API9", + "section": "Improper Inventory Management", + "hyperlink": "https://owasp.org/API-Security/editions/2023/en/0xa9-improper-inventory-management/", + "cre_ids": ["162-655", "863-521"] + }, + { + "section_id": "API10", + "section": "Unsafe Consumption of APIs", + "hyperlink": "https://owasp.org/API-Security/editions/2023/en/0xaa-unsafe-consumption-of-apis/", + "cre_ids": ["715-223"] + } +] diff --git a/application/utils/external_project_parsers/data/owasp_top10_2025.json b/application/utils/external_project_parsers/data/owasp_top10_2025.json new file mode 100644 index 000000000..7e19d1a4e --- /dev/null +++ b/application/utils/external_project_parsers/data/owasp_top10_2025.json @@ -0,0 +1,62 @@ +[ + { + "section_id": "A01", + "section": "Broken Access Control", + "hyperlink": "https://owasp.org/Top10/2025/A01_2025-Broken_Access_Control/", + "cre_ids": ["117-371", "177-260", "724-770"] + }, + { + "section_id": "A02", + "section": "Security Misconfiguration", + "hyperlink": "https://owasp.org/Top10/2025/A02_2025-Security_Misconfiguration/", + "cre_ids": ["486-813"] + }, + { + "section_id": "A03", + "section": "Software Supply Chain Failures", + "hyperlink": "https://owasp.org/Top10/2025/A03_2025-Software_Supply_Chain_Failures/", + "cre_ids": ["613-286", "613-287", "715-223", "863-521"] + }, + { + "section_id": "A04", + "section": "Cryptographic Failures", + "hyperlink": "https://owasp.org/Top10/2025/A04_2025-Cryptographic_Failures/", + "cre_ids": ["170-772", "227-045"] + }, + { + "section_id": "A05", + "section": "Injection", + "hyperlink": "https://owasp.org/Top10/2025/A05_2025-Injection/", + "cre_ids": ["031-447", "064-808", "760-764"] + }, + { + "section_id": "A06", + "section": "Insecure Design", + "hyperlink": "https://owasp.org/Top10/2025/A06_2025-Insecure_Design/", + "cre_ids": ["126-668", "155-155"] + }, + { + "section_id": "A07", + "section": "Authentication Failures", + "hyperlink": "https://owasp.org/Top10/2025/A07_2025-Authentication_Failures/", + "cre_ids": ["002-630", "177-260", "586-842", "633-428"] + }, + { + "section_id": "A08", + "section": "Software or Data Integrity Failures", + "hyperlink": "https://owasp.org/Top10/2025/A08_2025-Software_or_Data_Integrity_Failures/", + "cre_ids": ["613-287", "836-068"] + }, + { + "section_id": "A09", + "section": "Security Logging and Alerting Failures", + "hyperlink": "https://owasp.org/Top10/2025/A09_2025-Security_Logging_and_Alerting_Failures/", + "cre_ids": ["067-050", "148-420", "402-706", "843-841"] + }, + { + "section_id": "A10", + "section": "Mishandling of Exceptional Conditions", + "hyperlink": "https://owasp.org/Top10/2025/A10_2025-Mishandling_of_Exceptional_Conditions/", + "cre_ids": ["513-183"] + } +] diff --git a/application/utils/external_project_parsers/parsers/owasp_api_top10_2023.py b/application/utils/external_project_parsers/parsers/owasp_api_top10_2023.py new file mode 100644 index 000000000..08157a1e9 --- /dev/null +++ b/application/utils/external_project_parsers/parsers/owasp_api_top10_2023.py @@ -0,0 +1,47 @@ +import json +from pathlib import Path + +from application.database import db +from application.defs import cre_defs as defs +from application.prompt_client import prompt_client +from application.utils.external_project_parsers.base_parser_defs import ( + ParseResult, + ParserInterface, +) + + +class OwaspApiTop10_2023(ParserInterface): + name = "OWASP API Security Top 10 2023" + data_file = ( + Path(__file__).resolve().parent.parent / "data" / "owasp_api_top10_2023.json" + ) + + def parse(self, cache: db.Node_collection, ph: prompt_client.PromptHandler): + with self.data_file.open("r", encoding="utf-8") as handle: + raw_entries = json.load(handle) + + entries = [] + for entry in raw_entries: + standard = defs.Standard( + name=self.name, + sectionID=entry["section_id"], + section=entry["section"], + hyperlink=entry["hyperlink"], + ) + for cre_id in entry.get("cre_ids", []): + cres = cache.get_CREs(external_id=cre_id) + if not cres: + continue + standard.add_link( + defs.Link( + ltype=defs.LinkTypes.LinkedTo, + document=cres[0].shallow_copy(), + ) + ) + entries.append(standard) + + return ParseResult( + results={self.name: entries}, + calculate_gap_analysis=False, + calculate_embeddings=False, + ) diff --git a/application/utils/external_project_parsers/parsers/owasp_top10_2025.py b/application/utils/external_project_parsers/parsers/owasp_top10_2025.py new file mode 100644 index 000000000..070f869af --- /dev/null +++ b/application/utils/external_project_parsers/parsers/owasp_top10_2025.py @@ -0,0 +1,47 @@ +import json +from pathlib import Path + +from application.database import db +from application.defs import cre_defs as defs +from application.prompt_client import prompt_client +from application.utils.external_project_parsers.base_parser_defs import ( + ParseResult, + ParserInterface, +) + + +class OwaspTop10_2025(ParserInterface): + name = "OWASP Top 10 2025" + data_file = ( + Path(__file__).resolve().parent.parent / "data" / "owasp_top10_2025.json" + ) + + def parse(self, cache: db.Node_collection, ph: prompt_client.PromptHandler): + with self.data_file.open("r", encoding="utf-8") as handle: + raw_entries = json.load(handle) + + entries = [] + for entry in raw_entries: + standard = defs.Standard( + name=self.name, + sectionID=entry["section_id"], + section=entry["section"], + hyperlink=entry["hyperlink"], + ) + for cre_id in entry.get("cre_ids", []): + cres = cache.get_CREs(external_id=cre_id) + if not cres: + continue + standard.add_link( + defs.Link( + ltype=defs.LinkTypes.LinkedTo, + document=cres[0].shallow_copy(), + ) + ) + entries.append(standard) + + return ParseResult( + results={self.name: entries}, + calculate_gap_analysis=False, + calculate_embeddings=False, + ) diff --git a/cre.py b/cre.py index 559e595e4..60f6c171a 100644 --- a/cre.py +++ b/cre.py @@ -167,6 +167,36 @@ def main() -> None: action="store_true", help="import owasp secure headers", ) + parser.add_argument( + "--owasp_top10_2025_in", + action="store_true", + help="import OWASP Top 10 2025", + ) + parser.add_argument( + "--owasp_api_top10_2023_in", + action="store_true", + help="import OWASP API Security Top 10 2023", + ) + parser.add_argument( + "--owasp_kubernetes_top10_2022_in", + action="store_true", + help="import OWASP Kubernetes Top Ten 2022", + ) + parser.add_argument( + "--owasp_kubernetes_top10_2025_in", + action="store_true", + help="import OWASP Kubernetes Top Ten 2025 draft", + ) + parser.add_argument( + "--owasp_llm_top10_2025_in", + action="store_true", + help="import OWASP Top 10 for LLM and Gen AI Apps 2025", + ) + parser.add_argument( + "--owasp_aisvs_in", + action="store_true", + help="import OWASP AI Security Verification Standard (AISVS)", + ) parser.add_argument( "--pci_dss_3_2_in", action="store_true", From 43a9e0f0b353eb434c2c66a30adcbf1cd7e9f1ba Mon Sep 17 00:00:00 2001 From: bornunique911 Date: Wed, 1 Apr 2026 16:13:04 +0530 Subject: [PATCH 27/37] Fix cheat sheet parser test expectations on importer branches --- application/tests/cheatsheets_parser_test.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/application/tests/cheatsheets_parser_test.py b/application/tests/cheatsheets_parser_test.py index 1a3ba4bf0..e2c0910d6 100644 --- a/application/tests/cheatsheets_parser_test.py +++ b/application/tests/cheatsheets_parser_test.py @@ -34,7 +34,13 @@ class Repo: repo.working_dir = loc cre = defs.CRE(name="blah", id="223-780") self.collection.add_cre(cre) - with open(os.path.join(os.path.join(loc, "cheatsheets"), "cs.md"), "w") as mdf: + with open( + os.path.join( + os.path.join(loc, "cheatsheets"), + "Secrets_Management_Cheat_Sheet.md", + ), + "w", + ) as mdf: mdf.write(cs) mock_clone.return_value = repo entries = cheatsheets_parser.Cheatsheets().parse( @@ -45,22 +51,26 @@ class Repo: # verify the external tagging convention, not just enum wiring. expected = defs.Standard( name="OWASP Cheat Sheets", - hyperlink="https://github.com/foo/bar/tree/master/cs.md", + hyperlink="https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html", section="Secrets Management Cheat Sheet", - links=[defs.Link(document=cre, ltype=defs.LinkTypes.LinkedTo)], + links=[ + defs.Link( + document=cre, ltype=defs.LinkTypes.AutomaticallyLinkedTo + ) + ], tags=[ "family:guidance", "subtype:cheatsheet", - "source:owasp_cheatsheets", "audience:developer", "maturity:stable", + "source:owasp_cheatsheets", ], ) self.maxDiff = None for name, nodes in entries.results.items(): self.assertEqual(name, parser.name) self.assertEqual(len(nodes), 1) - self.assertCountEqual(expected.todict(), nodes[0].todict()) + self.assertEqual(expected.todict(), nodes[0].todict()) cheatsheets_md = """ # Secrets Management Cheat Sheet From eae44eb7f2d3bc3a3be9d0abf677f86c5809b3ef Mon Sep 17 00:00:00 2001 From: bornunique911 Date: Wed, 1 Apr 2026 16:14:21 +0530 Subject: [PATCH 28/37] Use official OWASP cheat sheet URLs in importer branches --- .../external_project_parsers/parsers/cheatsheets_parser.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/application/utils/external_project_parsers/parsers/cheatsheets_parser.py b/application/utils/external_project_parsers/parsers/cheatsheets_parser.py index e695414d8..e234dadda 100644 --- a/application/utils/external_project_parsers/parsers/cheatsheets_parser.py +++ b/application/utils/external_project_parsers/parsers/cheatsheets_parser.py @@ -15,6 +15,7 @@ class Cheatsheets(ParserInterface): name = "OWASP Cheat Sheets" + cheatsheetseries_base_url = "https://cheatsheetseries.owasp.org/cheatsheets" def cheatsheet( self, section: str, hyperlink: str, tags: List[str] @@ -33,6 +34,10 @@ def cheatsheet( hyperlink=hyperlink, ) + def official_cheatsheet_url(self, markdown_filename: str) -> str: + html_name = os.path.splitext(markdown_filename)[0] + ".html" + return f"{self.cheatsheetseries_base_url}/{html_name}" + def parse(self, cache: db.Node_collection, ph: prompt_client.PromptHandler): c_repo = "https://github.com/OWASP/CheatSheetSeries.git" cheatsheets_path = "cheatsheets/" @@ -65,7 +70,7 @@ def register_cheatsheets( name = title.group("title") cre_id = cre.group("cre") cres = cache.get_CREs(external_id=cre_id) - hyperlink = f"{repo_path.replace('.git','')}/tree/master/{cheatsheets_path}{mdfile}" + hyperlink = self.official_cheatsheet_url(mdfile) cs = self.cheatsheet(section=name, hyperlink=hyperlink, tags=[]) for cre in cres: cs.add_link( From 9f51787a32a902d8e5569933c245cc75a4962399 Mon Sep 17 00:00:00 2001 From: bornunique911 Date: Tue, 24 Mar 2026 23:04:55 +0530 Subject: [PATCH 29/37] Add OWASP AI resource importer support --- application/tests/owasp_aisvs_parser_test.py | 62 +++++++++++++ .../tests/owasp_llm_top10_2025_parser_test.py | 45 ++++++++++ .../data/owasp_aisvs_1_0.json | 86 +++++++++++++++++++ .../data/owasp_llm_top10_2025.json | 62 +++++++++++++ .../parsers/owasp_aisvs.py | 45 ++++++++++ .../parsers/owasp_llm_top10_2025.py | 47 ++++++++++ 6 files changed, 347 insertions(+) create mode 100644 application/tests/owasp_aisvs_parser_test.py create mode 100644 application/tests/owasp_llm_top10_2025_parser_test.py create mode 100644 application/utils/external_project_parsers/data/owasp_aisvs_1_0.json create mode 100644 application/utils/external_project_parsers/data/owasp_llm_top10_2025.json create mode 100644 application/utils/external_project_parsers/parsers/owasp_aisvs.py create mode 100644 application/utils/external_project_parsers/parsers/owasp_llm_top10_2025.py diff --git a/application/tests/owasp_aisvs_parser_test.py b/application/tests/owasp_aisvs_parser_test.py new file mode 100644 index 000000000..461b2d68d --- /dev/null +++ b/application/tests/owasp_aisvs_parser_test.py @@ -0,0 +1,62 @@ +import unittest + +from application import create_app, sqla # type: ignore +from application.database import db +from application.defs import cre_defs as defs +from application.prompt_client import prompt_client +from application.utils.external_project_parsers.parsers import owasp_aisvs + + +class TestOwaspAisvsParser(unittest.TestCase): + def tearDown(self) -> None: + sqla.session.remove() + sqla.drop_all() + self.app_context.pop() + + def setUp(self) -> None: + self.app = create_app(mode="test") + self.app_context = self.app.app_context() + self.app_context.push() + sqla.create_all() + self.collection = db.Node_collection() + + def test_parse(self) -> None: + for cre_id, name in [ + ("227-045", "Identify sensitive data and subject it to a policy"), + ( + "307-507", + "Allow only trusted sources both build time and runtime; therefore perform integrity checks on all resources and code", + ), + ( + "162-655", + "Documentation of all components' business or security function", + ), + ]: + self.collection.add_cre(defs.CRE(id=cre_id, name=name, description="")) + + result = owasp_aisvs.OwaspAisvs().parse( + self.collection, prompt_client.PromptHandler(database=self.collection) + ) + + entries = result.results["OWASP AI Security Verification Standard (AISVS)"] + self.assertEqual(14, len(entries)) + self.assertEqual("AISVS1", entries[0].sectionID) + self.assertEqual( + "Training Data Governance & Bias Management", entries[0].section + ) + self.assertEqual( + "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C01-Training-Data-Governance.md", + entries[0].hyperlink, + ) + self.assertEqual( + ["227-045", "307-507"], [l.document.id for l in entries[0].links] + ) + self.assertEqual("AISVS14", entries[-1].sectionID) + self.assertEqual( + "Human Oversight, Accountability & Governance", entries[-1].section + ) + self.assertEqual( + "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C14-Human-Oversight.md", + entries[-1].hyperlink, + ) + self.assertEqual(["162-655"], [l.document.id for l in entries[-1].links]) diff --git a/application/tests/owasp_llm_top10_2025_parser_test.py b/application/tests/owasp_llm_top10_2025_parser_test.py new file mode 100644 index 000000000..75b282c34 --- /dev/null +++ b/application/tests/owasp_llm_top10_2025_parser_test.py @@ -0,0 +1,45 @@ +import unittest + +from application import create_app, sqla # type: ignore +from application.database import db +from application.defs import cre_defs as defs +from application.prompt_client import prompt_client +from application.utils.external_project_parsers.parsers import owasp_llm_top10_2025 + + +class TestOwaspLlmTop10_2025Parser(unittest.TestCase): + def tearDown(self) -> None: + sqla.session.remove() + sqla.drop_all() + self.app_context.pop() + + def setUp(self) -> None: + self.app = create_app(mode="test") + self.app_context = self.app.app_context() + self.app_context.push() + sqla.create_all() + self.collection = db.Node_collection() + + def test_parse(self) -> None: + for cre_id, name in [ + ("161-451", "Output encoding and injection prevention"), + ("064-808", "Encode output context-specifically"), + ("760-764", "Injection protection"), + ("623-550", "Denial Of Service protection"), + ]: + self.collection.add_cre(defs.CRE(id=cre_id, name=name, description="")) + + result = owasp_llm_top10_2025.OwaspLlmTop10_2025().parse( + self.collection, prompt_client.PromptHandler(database=self.collection) + ) + + entries = result.results["OWASP Top 10 for LLM and Gen AI Apps 2025"] + self.assertEqual(10, len(entries)) + self.assertEqual("LLM01", entries[0].sectionID) + self.assertEqual("Prompt Injection", entries[0].section) + self.assertEqual( + ["161-451", "760-764"], [l.document.id for l in entries[0].links] + ) + self.assertEqual(["064-808"], [l.document.id for l in entries[4].links]) + self.assertEqual("LLM10", entries[-1].sectionID) + self.assertEqual(["623-550"], [l.document.id for l in entries[-1].links]) diff --git a/application/utils/external_project_parsers/data/owasp_aisvs_1_0.json b/application/utils/external_project_parsers/data/owasp_aisvs_1_0.json new file mode 100644 index 000000000..c4880546f --- /dev/null +++ b/application/utils/external_project_parsers/data/owasp_aisvs_1_0.json @@ -0,0 +1,86 @@ +[ + { + "section_id": "AISVS1", + "section": "Training Data Governance & Bias Management", + "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C01-Training-Data-Governance.md", + "cre_ids": ["227-045", "307-507"] + }, + { + "section_id": "AISVS2", + "section": "User Input Validation", + "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C02-User-Input-Validation.md", + "cre_ids": ["031-447", "760-764"] + }, + { + "section_id": "AISVS3", + "section": "Model Lifecycle Management & Change Control", + "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C03-Model-Lifecycle-Management.md", + "cre_ids": ["148-853", "613-285"] + }, + { + "section_id": "AISVS4", + "section": "Infrastructure, Configuration & Deployment Security", + "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C04-Infrastructure.md", + "cre_ids": ["233-748", "486-813"] + }, + { + "section_id": "AISVS5", + "section": "Access Control & Identity for AI Components & Users", + "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C05-Access-Control-and-Identity.md", + "cre_ids": ["633-428", "724-770"] + }, + { + "section_id": "AISVS6", + "section": "Supply Chain Security for Models, Frameworks & Data", + "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C06-Supply-Chain.md", + "cre_ids": ["613-285", "613-287", "863-521"] + }, + { + "section_id": "AISVS7", + "section": "Model Behavior, Output Control & Safety Assurance", + "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C07-Model-Behavior.md", + "cre_ids": ["064-808", "141-555"] + }, + { + "section_id": "AISVS8", + "section": "Memory, Embeddings & Vector Database Security", + "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C08-Memory-Embeddings-and-Vector-Database.md", + "cre_ids": ["126-668", "538-770"] + }, + { + "section_id": "AISVS9", + "section": "Autonomous Orchestration & Agentic Action Security", + "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C09-Orchestration-and-Agentic-Action.md", + "cre_ids": ["117-371", "650-560"] + }, + { + "section_id": "AISVS10", + "section": "Model Context Protocol (MCP) Security", + "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C10-MCP-Security.md", + "cre_ids": ["307-507", "715-223"] + }, + { + "section_id": "AISVS11", + "section": "Adversarial Robustness & Privacy Defense", + "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C11-Adversarial-Robustness.md", + "cre_ids": ["141-555", "623-550"] + }, + { + "section_id": "AISVS12", + "section": "Privacy Protection & Personal Data Management", + "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C12-Privacy.md", + "cre_ids": ["126-668", "227-045", "482-866"] + }, + { + "section_id": "AISVS13", + "section": "Monitoring, Logging & Anomaly Detection", + "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C13-Monitoring-and-Logging.md", + "cre_ids": ["058-083", "148-420", "402-706", "843-841"] + }, + { + "section_id": "AISVS14", + "section": "Human Oversight, Accountability & Governance", + "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C14-Human-Oversight.md", + "cre_ids": ["162-655", "766-162"] + } +] diff --git a/application/utils/external_project_parsers/data/owasp_llm_top10_2025.json b/application/utils/external_project_parsers/data/owasp_llm_top10_2025.json new file mode 100644 index 000000000..b761d5e09 --- /dev/null +++ b/application/utils/external_project_parsers/data/owasp_llm_top10_2025.json @@ -0,0 +1,62 @@ +[ + { + "section_id": "LLM01", + "section": "Prompt Injection", + "hyperlink": "https://genai.owasp.org/llmrisk/llm01-prompt-injection/", + "cre_ids": ["161-451", "760-764"] + }, + { + "section_id": "LLM02", + "section": "Sensitive Information Disclosure", + "hyperlink": "https://genai.owasp.org/llmrisk/llm022025-sensitive-information-disclosure/", + "cre_ids": ["126-668", "227-045"] + }, + { + "section_id": "LLM03", + "section": "Supply Chain", + "hyperlink": "https://genai.owasp.org/llmrisk/llm032025-supply-chain/", + "cre_ids": ["613-285", "613-287"] + }, + { + "section_id": "LLM04", + "section": "Data and Model Poisoning", + "hyperlink": "https://genai.owasp.org/llmrisk/llm042025-data-and-model-poisoning/", + "cre_ids": ["307-507", "613-287"] + }, + { + "section_id": "LLM05", + "section": "Improper Output Handling", + "hyperlink": "https://genai.owasp.org/llmrisk/llm052025-improper-output-handling/", + "cre_ids": ["064-808"] + }, + { + "section_id": "LLM06", + "section": "Excessive Agency", + "hyperlink": "https://genai.owasp.org/llmrisk/llm062025-excessive-agency/", + "cre_ids": ["117-371", "650-560"] + }, + { + "section_id": "LLM07", + "section": "System Prompt Leakage", + "hyperlink": "https://genai.owasp.org/llmrisk/llm072025-system-prompt-leakage/", + "cre_ids": ["126-668", "227-045"] + }, + { + "section_id": "LLM08", + "section": "Vector and Embedding Weaknesses", + "hyperlink": "https://genai.owasp.org/llmrisk/llm082025-vector-and-embedding-weaknesses/", + "cre_ids": ["126-668", "538-770"] + }, + { + "section_id": "LLM09", + "section": "Misinformation", + "hyperlink": "https://genai.owasp.org/llmrisk/llm092025-misinformation/", + "cre_ids": ["141-555"] + }, + { + "section_id": "LLM10", + "section": "Unbounded Consumption", + "hyperlink": "https://genai.owasp.org/llmrisk/llm102025-unbounded-consumption/", + "cre_ids": ["267-031", "623-550"] + } +] diff --git a/application/utils/external_project_parsers/parsers/owasp_aisvs.py b/application/utils/external_project_parsers/parsers/owasp_aisvs.py new file mode 100644 index 000000000..cec4abad9 --- /dev/null +++ b/application/utils/external_project_parsers/parsers/owasp_aisvs.py @@ -0,0 +1,45 @@ +import json +from pathlib import Path + +from application.database import db +from application.defs import cre_defs as defs +from application.prompt_client import prompt_client +from application.utils.external_project_parsers.base_parser_defs import ( + ParseResult, + ParserInterface, +) + + +class OwaspAisvs(ParserInterface): + name = "OWASP AI Security Verification Standard (AISVS)" + data_file = Path(__file__).resolve().parent.parent / "data" / "owasp_aisvs_1_0.json" + + def parse(self, cache: db.Node_collection, ph: prompt_client.PromptHandler): + with self.data_file.open("r", encoding="utf-8") as handle: + raw_entries = json.load(handle) + + entries = [] + for entry in raw_entries: + standard = defs.Standard( + name=self.name, + sectionID=entry["section_id"], + section=entry["section"], + hyperlink=entry["hyperlink"], + ) + for cre_id in entry.get("cre_ids", []): + cres = cache.get_CREs(external_id=cre_id) + if not cres: + continue + standard.add_link( + defs.Link( + ltype=defs.LinkTypes.LinkedTo, + document=cres[0].shallow_copy(), + ) + ) + entries.append(standard) + + return ParseResult( + results={self.name: entries}, + calculate_gap_analysis=False, + calculate_embeddings=False, + ) diff --git a/application/utils/external_project_parsers/parsers/owasp_llm_top10_2025.py b/application/utils/external_project_parsers/parsers/owasp_llm_top10_2025.py new file mode 100644 index 000000000..3971b9e6b --- /dev/null +++ b/application/utils/external_project_parsers/parsers/owasp_llm_top10_2025.py @@ -0,0 +1,47 @@ +import json +from pathlib import Path + +from application.database import db +from application.defs import cre_defs as defs +from application.prompt_client import prompt_client +from application.utils.external_project_parsers.base_parser_defs import ( + ParseResult, + ParserInterface, +) + + +class OwaspLlmTop10_2025(ParserInterface): + name = "OWASP Top 10 for LLM and Gen AI Apps 2025" + data_file = ( + Path(__file__).resolve().parent.parent / "data" / "owasp_llm_top10_2025.json" + ) + + def parse(self, cache: db.Node_collection, ph: prompt_client.PromptHandler): + with self.data_file.open("r", encoding="utf-8") as handle: + raw_entries = json.load(handle) + + entries = [] + for entry in raw_entries: + standard = defs.Standard( + name=self.name, + sectionID=entry["section_id"], + section=entry["section"], + hyperlink=entry["hyperlink"], + ) + for cre_id in entry.get("cre_ids", []): + cres = cache.get_CREs(external_id=cre_id) + if not cres: + continue + standard.add_link( + defs.Link( + ltype=defs.LinkTypes.LinkedTo, + document=cres[0].shallow_copy(), + ) + ) + entries.append(standard) + + return ParseResult( + results={self.name: entries}, + calculate_gap_analysis=False, + calculate_embeddings=False, + ) From 6440ab55797728a7df8c0aa69e8a70703430480f Mon Sep 17 00:00:00 2001 From: bornunique911 Date: Tue, 24 Mar 2026 23:04:55 +0530 Subject: [PATCH 30/37] Add OWASP Kubernetes importer support --- ...owasp_kubernetes_top10_2022_parser_test.py | 45 ++++++++ ...owasp_kubernetes_top10_2025_parser_test.py | 102 ++++++++++++++++++ .../data/owasp_kubernetes_top10_2022.json | 62 +++++++++++ .../data/owasp_kubernetes_top10_2025.json | 72 +++++++++++++ .../parsers/owasp_kubernetes_top10_2022.py | 49 +++++++++ .../parsers/owasp_kubernetes_top10_2025.py | 78 ++++++++++++++ 6 files changed, 408 insertions(+) create mode 100644 application/tests/owasp_kubernetes_top10_2022_parser_test.py create mode 100644 application/tests/owasp_kubernetes_top10_2025_parser_test.py create mode 100644 application/utils/external_project_parsers/data/owasp_kubernetes_top10_2022.json create mode 100644 application/utils/external_project_parsers/data/owasp_kubernetes_top10_2025.json create mode 100644 application/utils/external_project_parsers/parsers/owasp_kubernetes_top10_2022.py create mode 100644 application/utils/external_project_parsers/parsers/owasp_kubernetes_top10_2025.py diff --git a/application/tests/owasp_kubernetes_top10_2022_parser_test.py b/application/tests/owasp_kubernetes_top10_2022_parser_test.py new file mode 100644 index 000000000..30b0922c9 --- /dev/null +++ b/application/tests/owasp_kubernetes_top10_2022_parser_test.py @@ -0,0 +1,45 @@ +import unittest + +from application import create_app, sqla # type: ignore +from application.database import db +from application.defs import cre_defs as defs +from application.prompt_client import prompt_client +from application.utils.external_project_parsers.parsers import ( + owasp_kubernetes_top10_2022, +) + + +class TestOwaspKubernetesTop10_2022Parser(unittest.TestCase): + def tearDown(self) -> None: + sqla.session.remove() + sqla.drop_all() + self.app_context.pop() + + def setUp(self) -> None: + self.app = create_app(mode="test") + self.app_context = self.app.app_context() + self.app_context.push() + sqla.create_all() + self.collection = db.Node_collection() + + def test_parse(self) -> None: + for cre_id, name in [ + ("233-748", "Configuration hardening"), + ("486-813", "Configuration"), + ("053-751", "Force build pipeline to check outdated/insecure components"), + ]: + self.collection.add_cre(defs.CRE(id=cre_id, name=name, description="")) + + result = owasp_kubernetes_top10_2022.OwaspKubernetesTop10_2022().parse( + self.collection, prompt_client.PromptHandler(database=self.collection) + ) + + entries = result.results["OWASP Kubernetes Top Ten 2022"] + self.assertEqual(10, len(entries)) + self.assertEqual("K01", entries[0].sectionID) + self.assertEqual("Insecure Workload Configurations", entries[0].section) + self.assertEqual( + ["233-748", "486-813"], [l.document.id for l in entries[0].links] + ) + self.assertEqual("K10", entries[-1].sectionID) + self.assertEqual(["053-751"], [l.document.id for l in entries[-1].links]) diff --git a/application/tests/owasp_kubernetes_top10_2025_parser_test.py b/application/tests/owasp_kubernetes_top10_2025_parser_test.py new file mode 100644 index 000000000..6f444c9a9 --- /dev/null +++ b/application/tests/owasp_kubernetes_top10_2025_parser_test.py @@ -0,0 +1,102 @@ +import unittest +import tempfile +from pathlib import Path + +from application import create_app, sqla # type: ignore +from application.database import db +from application.defs import cre_defs as defs +from application.prompt_client import prompt_client +from application.utils.external_project_parsers.parsers import ( + owasp_kubernetes_top10_2025, +) + + +class TestOwaspKubernetesTop10_2025Parser(unittest.TestCase): + def tearDown(self) -> None: + sqla.session.remove() + sqla.drop_all() + self.app_context.pop() + + def setUp(self) -> None: + self.app = create_app(mode="test") + self.app_context = self.app.app_context() + self.app_context.push() + sqla.create_all() + self.collection = db.Node_collection() + + def test_parse(self) -> None: + for cre_id, name in [ + ("233-748", "Configuration hardening"), + ("486-813", "Configuration"), + ("148-420", "Log integrity"), + ("402-706", "Log relevant"), + ("843-841", "Log discretely"), + ]: + self.collection.add_cre(defs.CRE(id=cre_id, name=name, description="")) + + result = owasp_kubernetes_top10_2025.OwaspKubernetesTop10_2025().parse( + self.collection, prompt_client.PromptHandler(database=self.collection) + ) + + entries = result.results["OWASP Kubernetes Top Ten 2025 (Draft)"] + self.assertEqual(10, len(entries)) + self.assertEqual("K01", entries[0].sectionID) + self.assertEqual("Insecure Workload Configurations", entries[0].section) + self.assertEqual( + ["233-748", "486-813"], [l.document.id for l in entries[0].links] + ) + self.assertEqual("K10", entries[-1].sectionID) + self.assertEqual( + ["148-420", "402-706", "843-841"], + [l.document.id for l in entries[-1].links], + ) + + def test_parse_falls_back_to_2022_mapping_when_2025_links_missing(self) -> None: + self.collection.add_cre( + defs.CRE(id="148-420", name="Log integrity", description="") + ) + + with tempfile.TemporaryDirectory() as tmpdir: + tmp_path = Path(tmpdir) + current_file = tmp_path / "k8s_2025.json" + fallback_file = tmp_path / "k8s_2022.json" + current_file.write_text( + """ +[ + { + "section_id": "K10", + "section": "Inadequate Logging And Monitoring", + "hyperlink": "https://example.com/k10", + "cre_ids": ["999-999"], + "fallback_section_ids": ["K05"] + } +] + """.strip(), + encoding="utf-8", + ) + fallback_file.write_text( + """ +[ + { + "section_id": "K05", + "section": "Inadequate Logging and Monitoring", + "hyperlink": "https://example.com/k05", + "cre_ids": ["148-420"] + } +] + """.strip(), + encoding="utf-8", + ) + + parser = owasp_kubernetes_top10_2025.OwaspKubernetesTop10_2025() + parser.data_file = current_file + parser.fallback_data_file = fallback_file + + result = parser.parse( + self.collection, + prompt_client.PromptHandler(database=self.collection), + ) + + entries = result.results["OWASP Kubernetes Top Ten 2025 (Draft)"] + self.assertEqual(1, len(entries)) + self.assertEqual(["148-420"], [link.document.id for link in entries[0].links]) diff --git a/application/utils/external_project_parsers/data/owasp_kubernetes_top10_2022.json b/application/utils/external_project_parsers/data/owasp_kubernetes_top10_2022.json new file mode 100644 index 000000000..c4eb3d6fd --- /dev/null +++ b/application/utils/external_project_parsers/data/owasp_kubernetes_top10_2022.json @@ -0,0 +1,62 @@ +[ + { + "section_id": "K01", + "section": "Insecure Workload Configurations", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/2022/en/src/K01-insecure-workload-configurations", + "cre_ids": ["233-748", "486-813"] + }, + { + "section_id": "K02", + "section": "Supply Chain Vulnerabilities", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/2022/en/src/K02-supply-chain-vulnerabilities", + "cre_ids": ["613-285", "613-287"] + }, + { + "section_id": "K03", + "section": "Overly Permissive RBAC Configurations", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/2022/en/src/K03-overly-permissive-rbac-configurations", + "cre_ids": ["128-128", "724-770"] + }, + { + "section_id": "K04", + "section": "Lack of Centralized Policy Enforcement", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/2022/en/src/K04-lack-of-centralized-policy-enforcement", + "cre_ids": ["117-371"] + }, + { + "section_id": "K05", + "section": "Inadequate Logging and Monitoring", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/2022/en/src/K05-inadequate-logging-and-monitoring", + "cre_ids": ["058-083", "148-420", "402-706", "843-841"] + }, + { + "section_id": "K06", + "section": "Broken Authentication Mechanisms", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/2022/en/src/K06-broken-authentication-mechanisms", + "cre_ids": ["177-260", "586-842", "633-428"] + }, + { + "section_id": "K07", + "section": "Missing Network Segmentation Controls", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/2022/en/src/K07-missing-network-segmentation-controls", + "cre_ids": ["132-146", "467-784", "515-021"] + }, + { + "section_id": "K08", + "section": "Secrets Management Failures", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/2022/en/src/K08-secrets-management-failures", + "cre_ids": ["340-375", "774-888", "813-610"] + }, + { + "section_id": "K09", + "section": "Misconfigured Cluster Components", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/2022/en/src/K09-misconfigured-cluster-components", + "cre_ids": ["233-748", "486-813"] + }, + { + "section_id": "K10", + "section": "Outdated and Vulnerable Kubernetes Components", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/2022/en/src/K10-outdated-and-vulnerable-kubernetes-components", + "cre_ids": ["053-751", "715-334", "863-521"] + } +] diff --git a/application/utils/external_project_parsers/data/owasp_kubernetes_top10_2025.json b/application/utils/external_project_parsers/data/owasp_kubernetes_top10_2025.json new file mode 100644 index 000000000..c55afb059 --- /dev/null +++ b/application/utils/external_project_parsers/data/owasp_kubernetes_top10_2025.json @@ -0,0 +1,72 @@ +[ + { + "section_id": "K01", + "section": "Insecure Workload Configurations", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/", + "cre_ids": ["233-748", "486-813"], + "fallback_section_ids": ["K01"] + }, + { + "section_id": "K02", + "section": "Overly Permissive Authorization Configurations", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/", + "cre_ids": ["128-128", "724-770"], + "fallback_section_ids": ["K03"] + }, + { + "section_id": "K03", + "section": "Secrets Management Failures", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/", + "cre_ids": ["340-375", "774-888", "813-610"], + "fallback_section_ids": ["K08"] + }, + { + "section_id": "K04", + "section": "Lack Of Cluster Level Policy Enforcement", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/", + "cre_ids": ["117-371"], + "fallback_section_ids": ["K04"] + }, + { + "section_id": "K05", + "section": "Missing Network Segmentation Controls", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/", + "cre_ids": ["132-146", "467-784", "515-021"], + "fallback_section_ids": ["K07"] + }, + { + "section_id": "K06", + "section": "Overly Exposed Kubernetes Components", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/", + "cre_ids": ["152-725", "640-364"], + "fallback_section_ids": ["K09"] + }, + { + "section_id": "K07", + "section": "Misconfigured And Vulnerable Cluster Components", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/", + "cre_ids": ["053-751", "233-748", "486-813", "715-334"], + "fallback_section_ids": ["K09", "K10"] + }, + { + "section_id": "K08", + "section": "Cluster To Cloud Lateral Movement", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/", + "cre_ids": ["132-146", "640-364", "724-770"], + "fallback_section_ids": ["K03", "K07"] + }, + { + "section_id": "K09", + "section": "Broken Authentication Mechanisms", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/", + "cre_ids": ["177-260", "586-842", "633-428"], + "fallback_section_ids": ["K06"] + }, + { + "section_id": "K10", + "section": "Inadequate Logging And Monitoring", + "hyperlink": "https://owasp.org/www-project-kubernetes-top-ten/", + "cre_ids": ["058-083", "148-420", "402-706", "843-841"], + "fallback_section_ids": ["K05"] + } +] diff --git a/application/utils/external_project_parsers/parsers/owasp_kubernetes_top10_2022.py b/application/utils/external_project_parsers/parsers/owasp_kubernetes_top10_2022.py new file mode 100644 index 000000000..9d3822ab7 --- /dev/null +++ b/application/utils/external_project_parsers/parsers/owasp_kubernetes_top10_2022.py @@ -0,0 +1,49 @@ +import json +from pathlib import Path + +from application.database import db +from application.defs import cre_defs as defs +from application.prompt_client import prompt_client +from application.utils.external_project_parsers.base_parser_defs import ( + ParseResult, + ParserInterface, +) + + +class OwaspKubernetesTop10_2022(ParserInterface): + name = "OWASP Kubernetes Top Ten 2022" + data_file = ( + Path(__file__).resolve().parent.parent + / "data" + / "owasp_kubernetes_top10_2022.json" + ) + + def parse(self, cache: db.Node_collection, ph: prompt_client.PromptHandler): + with self.data_file.open("r", encoding="utf-8") as handle: + raw_entries = json.load(handle) + + entries = [] + for entry in raw_entries: + standard = defs.Standard( + name=self.name, + sectionID=entry["section_id"], + section=entry["section"], + hyperlink=entry["hyperlink"], + ) + for cre_id in entry.get("cre_ids", []): + cres = cache.get_CREs(external_id=cre_id) + if not cres: + continue + standard.add_link( + defs.Link( + ltype=defs.LinkTypes.LinkedTo, + document=cres[0].shallow_copy(), + ) + ) + entries.append(standard) + + return ParseResult( + results={self.name: entries}, + calculate_gap_analysis=False, + calculate_embeddings=False, + ) diff --git a/application/utils/external_project_parsers/parsers/owasp_kubernetes_top10_2025.py b/application/utils/external_project_parsers/parsers/owasp_kubernetes_top10_2025.py new file mode 100644 index 000000000..31deed8da --- /dev/null +++ b/application/utils/external_project_parsers/parsers/owasp_kubernetes_top10_2025.py @@ -0,0 +1,78 @@ +import json +from pathlib import Path + +from application.database import db +from application.defs import cre_defs as defs +from application.prompt_client import prompt_client +from application.utils.external_project_parsers.base_parser_defs import ( + ParseResult, + ParserInterface, +) + + +class OwaspKubernetesTop10_2025(ParserInterface): + name = "OWASP Kubernetes Top Ten 2025 (Draft)" + data_file = ( + Path(__file__).resolve().parent.parent + / "data" + / "owasp_kubernetes_top10_2025.json" + ) + fallback_data_file = ( + Path(__file__).resolve().parent.parent + / "data" + / "owasp_kubernetes_top10_2022.json" + ) + + def parse(self, cache: db.Node_collection, ph: prompt_client.PromptHandler): + with self.data_file.open("r", encoding="utf-8") as handle: + raw_entries = json.load(handle) + with self.fallback_data_file.open("r", encoding="utf-8") as handle: + fallback_entries = { + entry["section_id"]: entry for entry in json.load(handle) + } + + entries = [] + for entry in raw_entries: + standard = defs.Standard( + name=self.name, + sectionID=entry["section_id"], + section=entry["section"], + hyperlink=entry["hyperlink"], + ) + linked_cre_ids = [] + for cre_id in entry.get("cre_ids", []): + cres = cache.get_CREs(external_id=cre_id) + if not cres: + continue + linked_cre_ids.append(cre_id) + standard.add_link( + defs.Link( + ltype=defs.LinkTypes.LinkedTo, + document=cres[0].shallow_copy(), + ) + ) + if not linked_cre_ids: + for section_id in entry.get("fallback_section_ids", []): + fallback_entry = fallback_entries.get(section_id) + if not fallback_entry: + continue + for cre_id in fallback_entry.get("cre_ids", []): + if cre_id in linked_cre_ids: + continue + cres = cache.get_CREs(external_id=cre_id) + if not cres: + continue + linked_cre_ids.append(cre_id) + standard.add_link( + defs.Link( + ltype=defs.LinkTypes.LinkedTo, + document=cres[0].shallow_copy(), + ) + ) + entries.append(standard) + + return ParseResult( + results={self.name: entries}, + calculate_gap_analysis=False, + calculate_embeddings=False, + ) From eea9415e398e80c69e9dfdfa3d3f8e3c6e7a9d58 Mon Sep 17 00:00:00 2001 From: bornunique911 Date: Tue, 24 Mar 2026 23:04:55 +0530 Subject: [PATCH 31/37] Normalize OWASP cheat sheet references --- application/tests/cheatsheets_parser_test.py | 33 +++++++++- .../data/owasp_cheatsheets_supplement.json | 47 ++++++++++++++ .../parsers/cheatsheets_parser.py | 62 +++++++++++++++++-- 3 files changed, 136 insertions(+), 6 deletions(-) create mode 100644 application/utils/external_project_parsers/data/owasp_cheatsheets_supplement.json diff --git a/application/tests/cheatsheets_parser_test.py b/application/tests/cheatsheets_parser_test.py index e2c0910d6..fb2a9c277 100644 --- a/application/tests/cheatsheets_parser_test.py +++ b/application/tests/cheatsheets_parser_test.py @@ -69,8 +69,37 @@ class Repo: self.maxDiff = None for name, nodes in entries.results.items(): self.assertEqual(name, parser.name) - self.assertEqual(len(nodes), 1) - self.assertEqual(expected.todict(), nodes[0].todict()) + sections = {node.section for node in nodes} + self.assertIn("Secrets Management Cheat Sheet", sections) + secret_entry = [ + node + for node in nodes + if node.section == "Secrets Management Cheat Sheet" + ][0] + self.assertEqual(expected.todict(), secret_entry.todict()) + + def test_register_supplemental_cheatsheets(self) -> None: + for cre_id, name in [ + ("118-110", "API/web services"), + ("724-770", "Technical application access control"), + ("623-550", "Denial Of Service protection"), + ]: + self.collection.add_cre(defs.CRE(name=name, id=cre_id)) + + entries = cheatsheets_parser.Cheatsheets().register_supplemental_cheatsheets( + cache=self.collection + ) + rest = [ + entry for entry in entries if entry.section == "REST Security Cheat Sheet" + ][0] + self.assertEqual( + "https://cheatsheetseries.owasp.org/cheatsheets/REST_Security_Cheat_Sheet.html", + rest.hyperlink, + ) + self.assertEqual( + ["118-110", "724-770", "623-550"], + [link.document.id for link in rest.links], + ) cheatsheets_md = """ # Secrets Management Cheat Sheet diff --git a/application/utils/external_project_parsers/data/owasp_cheatsheets_supplement.json b/application/utils/external_project_parsers/data/owasp_cheatsheets_supplement.json new file mode 100644 index 000000000..4e06bee8c --- /dev/null +++ b/application/utils/external_project_parsers/data/owasp_cheatsheets_supplement.json @@ -0,0 +1,47 @@ +[ + { + "section": "Authorization Cheat Sheet", + "hyperlink": "https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html", + "cre_ids": ["128-128", "117-371"] + }, + { + "section": "REST Security Cheat Sheet", + "hyperlink": "https://cheatsheetseries.owasp.org/cheatsheets/REST_Security_Cheat_Sheet.html", + "cre_ids": ["118-110", "724-770", "623-550"] + }, + { + "section": "Server Side Request Forgery Prevention Cheat Sheet", + "hyperlink": "https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html", + "cre_ids": ["028-728", "657-084"] + }, + { + "section": "Docker Security Cheat Sheet", + "hyperlink": "https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html", + "cre_ids": ["233-748", "486-813"] + }, + { + "section": "Kubernetes Security Cheat Sheet", + "hyperlink": "https://cheatsheetseries.owasp.org/cheatsheets/Kubernetes_Security_Cheat_Sheet.html", + "cre_ids": ["467-784", "233-748", "486-813"] + }, + { + "section": "Secure Cloud Architecture Cheat Sheet", + "hyperlink": "https://cheatsheetseries.owasp.org/cheatsheets/Secure_Cloud_Architecture_Cheat_Sheet.html", + "cre_ids": ["155-155", "467-784"] + }, + { + "section": "LLM Prompt Injection Prevention Cheat Sheet", + "hyperlink": "https://cheatsheetseries.owasp.org/cheatsheets/LLM_Prompt_Injection_Prevention_Cheat_Sheet.html", + "cre_ids": ["161-451", "760-764"] + }, + { + "section": "AI Agent Security Cheat Sheet", + "hyperlink": "https://cheatsheetseries.owasp.org/cheatsheets/AI_Agent_Security_Cheat_Sheet.html", + "cre_ids": ["117-371", "650-560", "126-668"] + }, + { + "section": "Secure AI Model Ops Cheat Sheet", + "hyperlink": "https://cheatsheetseries.owasp.org/cheatsheets/Secure_AI_Model_Ops_Cheat_Sheet.html", + "cre_ids": ["148-853", "613-285", "613-287"] + } +] diff --git a/application/utils/external_project_parsers/parsers/cheatsheets_parser.py b/application/utils/external_project_parsers/parsers/cheatsheets_parser.py index e234dadda..02003b7bd 100644 --- a/application/utils/external_project_parsers/parsers/cheatsheets_parser.py +++ b/application/utils/external_project_parsers/parsers/cheatsheets_parser.py @@ -6,6 +6,9 @@ import os import re from application.utils.external_project_parsers import base_parser_defs +import json +from pathlib import Path +import logging from application.utils.external_project_parsers.base_parser_defs import ( ParserInterface, ParseResult, @@ -16,6 +19,12 @@ class Cheatsheets(ParserInterface): name = "OWASP Cheat Sheets" cheatsheetseries_base_url = "https://cheatsheetseries.owasp.org/cheatsheets" + supplement_data_file = ( + Path(__file__).resolve().parent.parent + / "data" + / "owasp_cheatsheets_supplement.json" + ) + logger = logging.getLogger(__name__) def cheatsheet( self, section: str, hyperlink: str, tags: List[str] @@ -41,10 +50,22 @@ def official_cheatsheet_url(self, markdown_filename: str) -> str: def parse(self, cache: db.Node_collection, ph: prompt_client.PromptHandler): c_repo = "https://github.com/OWASP/CheatSheetSeries.git" cheatsheets_path = "cheatsheets/" - repo = git.clone(c_repo, sparse_paths=["cheatsheets"], sparse_cone=True) - cheatsheets = self.register_cheatsheets( - repo=repo, cache=cache, cheatsheets_path=cheatsheets_path, repo_path=c_repo - ) + cheatsheets = [] + try: + repo = git.clone(c_repo, sparse_paths=["cheatsheets"], sparse_cone=True) + cheatsheets = self.register_cheatsheets( + repo=repo, + cache=cache, + cheatsheets_path=cheatsheets_path, + repo_path=c_repo, + ) + except Exception as exc: + self.logger.warning( + "Unable to clone OWASP CheatSheetSeries, continuing with supplemental cheat sheets only: %s", + exc, + ) + cheatsheets.extend(self.register_supplemental_cheatsheets(cache=cache)) + cheatsheets = self.deduplicate_entries(cheatsheets) results = {self.name: cheatsheets} base_parser_defs.validate_classification_tags(results) return ParseResult(results=results) @@ -80,3 +101,36 @@ def register_cheatsheets( ) standard_entries.append(cs) return standard_entries + + def register_supplemental_cheatsheets(self, cache: db.Node_collection): + with self.supplement_data_file.open("r", encoding="utf-8") as handle: + supplement_entries = json.load(handle) + + standard_entries = [] + for entry in supplement_entries: + cs = self.cheatsheet( + section=entry["section"], + hyperlink=entry["hyperlink"], + tags=[], + ) + for cre_id in entry.get("cre_ids", []): + cres = cache.get_CREs(external_id=cre_id) + for cre in cres: + try: + cs.add_link( + defs.Link( + document=cre.shallow_copy(), + ltype=defs.LinkTypes.AutomaticallyLinkedTo, + ) + ) + except Exception: + continue + if cs.links: + standard_entries.append(cs) + return standard_entries + + def deduplicate_entries(self, entries: List[defs.Standard]) -> List[defs.Standard]: + deduped = {} + for entry in entries: + deduped[(entry.section, entry.hyperlink)] = entry + return list(deduped.values()) From 3851d1dc7b949fbf5c8c06f64e562a9fa1921c87 Mon Sep 17 00:00:00 2001 From: bornunique911 Date: Fri, 1 May 2026 00:47:38 +0530 Subject: [PATCH 32/37] Refactor links definition in cheatsheets parser test for improved readability --- application/tests/cheatsheets_parser_test.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/application/tests/cheatsheets_parser_test.py b/application/tests/cheatsheets_parser_test.py index fb2a9c277..202f7b59e 100644 --- a/application/tests/cheatsheets_parser_test.py +++ b/application/tests/cheatsheets_parser_test.py @@ -53,11 +53,7 @@ class Repo: name="OWASP Cheat Sheets", hyperlink="https://cheatsheetseries.owasp.org/cheatsheets/Secrets_Management_Cheat_Sheet.html", section="Secrets Management Cheat Sheet", - links=[ - defs.Link( - document=cre, ltype=defs.LinkTypes.AutomaticallyLinkedTo - ) - ], + links=[defs.Link(document=cre, ltype=defs.LinkTypes.AutomaticallyLinkedTo)], tags=[ "family:guidance", "subtype:cheatsheet", From 5a62823686c5389091c8888644f750110bbd8181 Mon Sep 17 00:00:00 2001 From: bornunique911 Date: Tue, 2 Jun 2026 23:42:03 +0530 Subject: [PATCH 33/37] Update hyperlinks and normalize link access in OWASP parser tests and data --- application/tests/owasp_aisvs_parser_test.py | 8 +- .../tests/owasp_api_top10_2023_parser_test.py | 4 +- ...owasp_kubernetes_top10_2022_parser_test.py | 4 +- ...owasp_kubernetes_top10_2025_parser_test.py | 4 +- .../tests/owasp_llm_top10_2025_parser_test.py | 6 +- .../data/owasp_aisvs_1_0.json | 102 +++++++++++++----- 6 files changed, 87 insertions(+), 41 deletions(-) diff --git a/application/tests/owasp_aisvs_parser_test.py b/application/tests/owasp_aisvs_parser_test.py index 461b2d68d..a0bcec225 100644 --- a/application/tests/owasp_aisvs_parser_test.py +++ b/application/tests/owasp_aisvs_parser_test.py @@ -45,18 +45,18 @@ def test_parse(self) -> None: "Training Data Governance & Bias Management", entries[0].section ) self.assertEqual( - "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C01-Training-Data-Governance.md", + "https://github.com/OWASP/AISVS/blob/main/1.0/en/0x10-C01-Training-Data-Governance.md", entries[0].hyperlink, ) self.assertEqual( - ["227-045", "307-507"], [l.document.id for l in entries[0].links] + ["227-045", "307-507"], [link.document.id for link in entries[0].links] ) self.assertEqual("AISVS14", entries[-1].sectionID) self.assertEqual( "Human Oversight, Accountability & Governance", entries[-1].section ) self.assertEqual( - "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C14-Human-Oversight.md", + "https://github.com/OWASP/AISVS/blob/main/1.0/en/0x10-C14-Human-Oversight.md", entries[-1].hyperlink, ) - self.assertEqual(["162-655"], [l.document.id for l in entries[-1].links]) + self.assertEqual(["162-655"], [link.document.id for link in entries[-1].links]) diff --git a/application/tests/owasp_api_top10_2023_parser_test.py b/application/tests/owasp_api_top10_2023_parser_test.py index 806d11bed..6d8551bc4 100644 --- a/application/tests/owasp_api_top10_2023_parser_test.py +++ b/application/tests/owasp_api_top10_2023_parser_test.py @@ -37,7 +37,7 @@ def test_parse(self) -> None: self.assertEqual("API1", entries[0].sectionID) self.assertEqual("Broken Object Level Authorization", entries[0].section) self.assertEqual( - ["304-667", "724-770"], [l.document.id for l in entries[0].links] + ["304-667", "724-770"], [link.document.id for link in entries[0].links] ) self.assertEqual("API10", entries[-1].sectionID) - self.assertEqual(["715-223"], [l.document.id for l in entries[-1].links]) + self.assertEqual(["715-223"], [link.document.id for link in entries[-1].links]) diff --git a/application/tests/owasp_kubernetes_top10_2022_parser_test.py b/application/tests/owasp_kubernetes_top10_2022_parser_test.py index 30b0922c9..a0c657c14 100644 --- a/application/tests/owasp_kubernetes_top10_2022_parser_test.py +++ b/application/tests/owasp_kubernetes_top10_2022_parser_test.py @@ -39,7 +39,7 @@ def test_parse(self) -> None: self.assertEqual("K01", entries[0].sectionID) self.assertEqual("Insecure Workload Configurations", entries[0].section) self.assertEqual( - ["233-748", "486-813"], [l.document.id for l in entries[0].links] + ["233-748", "486-813"], [link.document.id for link in entries[0].links] ) self.assertEqual("K10", entries[-1].sectionID) - self.assertEqual(["053-751"], [l.document.id for l in entries[-1].links]) + self.assertEqual(["053-751"], [link.document.id for link in entries[-1].links]) diff --git a/application/tests/owasp_kubernetes_top10_2025_parser_test.py b/application/tests/owasp_kubernetes_top10_2025_parser_test.py index 6f444c9a9..d0a46c26b 100644 --- a/application/tests/owasp_kubernetes_top10_2025_parser_test.py +++ b/application/tests/owasp_kubernetes_top10_2025_parser_test.py @@ -43,12 +43,12 @@ def test_parse(self) -> None: self.assertEqual("K01", entries[0].sectionID) self.assertEqual("Insecure Workload Configurations", entries[0].section) self.assertEqual( - ["233-748", "486-813"], [l.document.id for l in entries[0].links] + ["233-748", "486-813"], [link.document.id for link in entries[0].links] ) self.assertEqual("K10", entries[-1].sectionID) self.assertEqual( ["148-420", "402-706", "843-841"], - [l.document.id for l in entries[-1].links], + [link.document.id for link in entries[-1].links], ) def test_parse_falls_back_to_2022_mapping_when_2025_links_missing(self) -> None: diff --git a/application/tests/owasp_llm_top10_2025_parser_test.py b/application/tests/owasp_llm_top10_2025_parser_test.py index 75b282c34..f31e4316e 100644 --- a/application/tests/owasp_llm_top10_2025_parser_test.py +++ b/application/tests/owasp_llm_top10_2025_parser_test.py @@ -38,8 +38,8 @@ def test_parse(self) -> None: self.assertEqual("LLM01", entries[0].sectionID) self.assertEqual("Prompt Injection", entries[0].section) self.assertEqual( - ["161-451", "760-764"], [l.document.id for l in entries[0].links] + ["161-451", "760-764"], [link.document.id for link in entries[0].links] ) - self.assertEqual(["064-808"], [l.document.id for l in entries[4].links]) + self.assertEqual(["064-808"], [link.document.id for link in entries[4].links]) self.assertEqual("LLM10", entries[-1].sectionID) - self.assertEqual(["623-550"], [l.document.id for l in entries[-1].links]) + self.assertEqual(["623-550"], [link.document.id for link in entries[-1].links]) diff --git a/application/utils/external_project_parsers/data/owasp_aisvs_1_0.json b/application/utils/external_project_parsers/data/owasp_aisvs_1_0.json index c4880546f..c0ad0a876 100644 --- a/application/utils/external_project_parsers/data/owasp_aisvs_1_0.json +++ b/application/utils/external_project_parsers/data/owasp_aisvs_1_0.json @@ -2,85 +2,131 @@ { "section_id": "AISVS1", "section": "Training Data Governance & Bias Management", - "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C01-Training-Data-Governance.md", - "cre_ids": ["227-045", "307-507"] + "hyperlink": "https://github.com/OWASP/AISVS/blob/main/1.0/en/0x10-C01-Training-Data-Governance.md", + "cre_ids": [ + "227-045", + "307-507" + ] }, { "section_id": "AISVS2", "section": "User Input Validation", - "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C02-User-Input-Validation.md", - "cre_ids": ["031-447", "760-764"] + "hyperlink": "https://github.com/OWASP/AISVS/blob/main/1.0/en/0x10-C02-User-Input-Validation.md", + "cre_ids": [ + "031-447", + "760-764" + ] }, { "section_id": "AISVS3", "section": "Model Lifecycle Management & Change Control", - "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C03-Model-Lifecycle-Management.md", - "cre_ids": ["148-853", "613-285"] + "hyperlink": "https://github.com/OWASP/AISVS/blob/main/1.0/en/0x10-C03-Model-Lifecycle-Management.md", + "cre_ids": [ + "148-853", + "613-285" + ] }, { "section_id": "AISVS4", "section": "Infrastructure, Configuration & Deployment Security", - "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C04-Infrastructure.md", - "cre_ids": ["233-748", "486-813"] + "hyperlink": "https://github.com/OWASP/AISVS/blob/main/1.0/en/0x10-C04-Infrastructure.md", + "cre_ids": [ + "233-748", + "486-813" + ] }, { "section_id": "AISVS5", "section": "Access Control & Identity for AI Components & Users", - "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C05-Access-Control-and-Identity.md", - "cre_ids": ["633-428", "724-770"] + "hyperlink": "https://github.com/OWASP/AISVS/blob/main/1.0/en/0x10-C05-Access-Control-and-Identity.md", + "cre_ids": [ + "633-428", + "724-770" + ] }, { "section_id": "AISVS6", "section": "Supply Chain Security for Models, Frameworks & Data", - "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C06-Supply-Chain.md", - "cre_ids": ["613-285", "613-287", "863-521"] + "hyperlink": "https://github.com/OWASP/AISVS/blob/main/1.0/en/0x10-C06-Supply-Chain.md", + "cre_ids": [ + "613-285", + "613-287", + "863-521" + ] }, { "section_id": "AISVS7", "section": "Model Behavior, Output Control & Safety Assurance", - "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C07-Model-Behavior.md", - "cre_ids": ["064-808", "141-555"] + "hyperlink": "https://github.com/OWASP/AISVS/blob/main/1.0/en/0x10-C07-Model-Behavior.md", + "cre_ids": [ + "064-808", + "141-555" + ] }, { "section_id": "AISVS8", "section": "Memory, Embeddings & Vector Database Security", - "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C08-Memory-Embeddings-and-Vector-Database.md", - "cre_ids": ["126-668", "538-770"] + "hyperlink": "https://github.com/OWASP/AISVS/blob/main/1.0/en/0x10-C08-Memory-Embeddings-and-Vector-Database.md", + "cre_ids": [ + "126-668", + "538-770" + ] }, { "section_id": "AISVS9", "section": "Autonomous Orchestration & Agentic Action Security", - "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C09-Orchestration-and-Agentic-Action.md", - "cre_ids": ["117-371", "650-560"] + "hyperlink": "https://github.com/OWASP/AISVS/blob/main/1.0/en/0x10-C09-Orchestration-and-Agentic-Action.md", + "cre_ids": [ + "117-371", + "650-560" + ] }, { "section_id": "AISVS10", "section": "Model Context Protocol (MCP) Security", - "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C10-MCP-Security.md", - "cre_ids": ["307-507", "715-223"] + "hyperlink": "https://github.com/OWASP/AISVS/blob/main/1.0/en/0x10-C10-MCP-Security.md", + "cre_ids": [ + "307-507", + "715-223" + ] }, { "section_id": "AISVS11", "section": "Adversarial Robustness & Privacy Defense", - "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C11-Adversarial-Robustness.md", - "cre_ids": ["141-555", "623-550"] + "hyperlink": "https://github.com/OWASP/AISVS/blob/main/1.0/en/0x10-C11-Adversarial-Robustness.md", + "cre_ids": [ + "141-555", + "623-550" + ] }, { "section_id": "AISVS12", "section": "Privacy Protection & Personal Data Management", - "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C12-Privacy.md", - "cre_ids": ["126-668", "227-045", "482-866"] + "hyperlink": "https://github.com/OWASP/AISVS/blob/main/1.0/en/0x10-C12-Privacy.md", + "cre_ids": [ + "126-668", + "227-045", + "482-866" + ] }, { "section_id": "AISVS13", "section": "Monitoring, Logging & Anomaly Detection", - "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C13-Monitoring-and-Logging.md", - "cre_ids": ["058-083", "148-420", "402-706", "843-841"] + "hyperlink": "https://github.com/OWASP/AISVS/blob/main/1.0/en/0x10-C13-Monitoring-and-Logging.md", + "cre_ids": [ + "058-083", + "148-420", + "402-706", + "843-841" + ] }, { "section_id": "AISVS14", "section": "Human Oversight, Accountability & Governance", - "hyperlink": "https://github.com/OWASP/AISVS/tree/main/1.0/en/0x10-C14-Human-Oversight.md", - "cre_ids": ["162-655", "766-162"] + "hyperlink": "https://github.com/OWASP/AISVS/blob/main/1.0/en/0x10-C14-Human-Oversight.md", + "cre_ids": [ + "162-655", + "766-162" + ] } ] From d966a5c3f72abbcbe8c8b597ca1e2f2491ac97a6 Mon Sep 17 00:00:00 2001 From: bornunique911 Date: Tue, 2 Jun 2026 23:56:20 +0530 Subject: [PATCH 34/37] Enhance error handling and deduplication logic in Cheatsheets parser --- .../parsers/cheatsheets_parser.py | 38 ++++++++++++++----- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/application/utils/external_project_parsers/parsers/cheatsheets_parser.py b/application/utils/external_project_parsers/parsers/cheatsheets_parser.py index 02003b7bd..16c925d3d 100644 --- a/application/utils/external_project_parsers/parsers/cheatsheets_parser.py +++ b/application/utils/external_project_parsers/parsers/cheatsheets_parser.py @@ -51,19 +51,21 @@ def parse(self, cache: db.Node_collection, ph: prompt_client.PromptHandler): c_repo = "https://github.com/OWASP/CheatSheetSeries.git" cheatsheets_path = "cheatsheets/" cheatsheets = [] + repo = None try: repo = git.clone(c_repo, sparse_paths=["cheatsheets"], sparse_cone=True) + except Exception as exc: + self.logger.warning( + "Unable to clone OWASP CheatSheetSeries, continuing with supplemental cheat sheets only: %s", + exc, + ) + if repo: cheatsheets = self.register_cheatsheets( repo=repo, cache=cache, cheatsheets_path=cheatsheets_path, repo_path=c_repo, ) - except Exception as exc: - self.logger.warning( - "Unable to clone OWASP CheatSheetSeries, continuing with supplemental cheat sheets only: %s", - exc, - ) cheatsheets.extend(self.register_supplemental_cheatsheets(cache=cache)) cheatsheets = self.deduplicate_entries(cheatsheets) results = {self.name: cheatsheets} @@ -113,6 +115,7 @@ def register_supplemental_cheatsheets(self, cache: db.Node_collection): hyperlink=entry["hyperlink"], tags=[], ) + add_link_failures = False for cre_id in entry.get("cre_ids", []): cres = cache.get_CREs(external_id=cre_id) for cre in cres: @@ -123,14 +126,31 @@ def register_supplemental_cheatsheets(self, cache: db.Node_collection): ltype=defs.LinkTypes.AutomaticallyLinkedTo, ) ) - except Exception: - continue - if cs.links: + except Exception as exc: + self.logger.warning( + "Failed to add link for cre_id %s to cheatsheet %s: %s", + cre_id, + entry.get("section", ""), + exc, + ) + add_link_failures = True + if cs.links and not add_link_failures: standard_entries.append(cs) return standard_entries def deduplicate_entries(self, entries: List[defs.Standard]) -> List[defs.Standard]: deduped = {} for entry in entries: - deduped[(entry.section, entry.hyperlink)] = entry + key = (entry.section, entry.hyperlink) + if key in deduped: + # Merge duplicates: union links into existing entry + existing_entry = deduped[key] + existing_link_ids = {link.document.id for link in existing_entry.links} + for link in entry.links: + if link.document.id not in existing_link_ids: + existing_entry.add_link(link) + existing_link_ids.add(link.document.id) + else: + # First occurrence: store the entry + deduped[key] = entry return list(deduped.values()) From fa5893b2a46d50a4d592998b46e1e2826325c6ab Mon Sep 17 00:00:00 2001 From: bornunique911 Date: Wed, 3 Jun 2026 00:17:45 +0530 Subject: [PATCH 35/37] Add assertions for K09 and K10 in OWASP Kubernetes Top Ten 2022 parser tests --- .../tests/owasp_kubernetes_top10_2022_parser_test.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/application/tests/owasp_kubernetes_top10_2022_parser_test.py b/application/tests/owasp_kubernetes_top10_2022_parser_test.py index a0c657c14..e5215657b 100644 --- a/application/tests/owasp_kubernetes_top10_2022_parser_test.py +++ b/application/tests/owasp_kubernetes_top10_2022_parser_test.py @@ -41,5 +41,14 @@ def test_parse(self) -> None: self.assertEqual( ["233-748", "486-813"], [link.document.id for link in entries[0].links] ) + + # K09 intentionally shares the same CRE ids as K01 for this version. + # In OWASP Kubernetes 2025, K07 aggregates 2022 K09 and K10, so K09 maps + # to the same configuration-focused CREs while K10 covers outdated/vulnerable components. + self.assertEqual("K09", entries[8].sectionID) + self.assertEqual( + ["233-748", "486-813"], [link.document.id for link in entries[8].links] + ) + self.assertEqual("K10", entries[-1].sectionID) self.assertEqual(["053-751"], [link.document.id for link in entries[-1].links]) From a59e9143c7531a9f6ee173b03198aa7f18478a8f Mon Sep 17 00:00:00 2001 From: bornunique911 Date: Tue, 9 Jun 2026 00:31:33 +0530 Subject: [PATCH 36/37] Refactor secret entry retrieval in cheatsheets parser test for clarity and add validation --- application/tests/cheatsheets_parser_test.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/tests/cheatsheets_parser_test.py b/application/tests/cheatsheets_parser_test.py index 202f7b59e..323e789ad 100644 --- a/application/tests/cheatsheets_parser_test.py +++ b/application/tests/cheatsheets_parser_test.py @@ -67,11 +67,11 @@ class Repo: self.assertEqual(name, parser.name) sections = {node.section for node in nodes} self.assertIn("Secrets Management Cheat Sheet", sections) - secret_entry = [ - node - for node in nodes - if node.section == "Secrets Management Cheat Sheet" - ][0] + secret_entry = next( + (node for node in nodes if node.section == "Secrets Management Cheat Sheet"), + None, + ) + self.assertIsNotNone(secret_entry) self.assertEqual(expected.todict(), secret_entry.todict()) def test_register_supplemental_cheatsheets(self) -> None: From 8b80b4da5eb5d01c0ef91b60199515bdb41577c5 Mon Sep 17 00:00:00 2001 From: bornunique911 Date: Tue, 9 Jun 2026 00:40:32 +0530 Subject: [PATCH 37/37] Refactor secret entry retrieval for improved readability in cheatsheets parser test --- application/tests/cheatsheets_parser_test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/application/tests/cheatsheets_parser_test.py b/application/tests/cheatsheets_parser_test.py index 323e789ad..8afa57045 100644 --- a/application/tests/cheatsheets_parser_test.py +++ b/application/tests/cheatsheets_parser_test.py @@ -68,7 +68,11 @@ class Repo: sections = {node.section for node in nodes} self.assertIn("Secrets Management Cheat Sheet", sections) secret_entry = next( - (node for node in nodes if node.section == "Secrets Management Cheat Sheet"), + ( + node + for node in nodes + if node.section == "Secrets Management Cheat Sheet" + ), None, ) self.assertIsNotNone(secret_entry)